---
updatedAt: 2025-09-24T02:01:47.000Z
agentTools:
  projectIndex: https://developers.waitwhile.com/llms.txt
---

# Import visits

# OpenAPI definition

```json
{
  "security": [
    {
      "api_key": []
    }
  ],
  "servers": [
    {
      "url": "https://api.waitwhile.com/v2",
      "description": "Waitwhile API"
    }
  ],
  "info": {
    "title": "Waitwhile API",
    "version": "2",
    "description": "\nThe Waitwhile API is organized around the REST methodology, and it uses resource-oriented URLs, and common HTTP response codes.\nJSON is consumed and returned by all API responses, including errors unless a specific input or response format has been requested. All requests are authenticated using an API key which can be obtained\nfrom your Integration Settings page. Provide your API key as value for the header \"apikey\" with each request.\nAll API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.\n",
    "termsOfService": "https://waitwhile.com/terms/",
    "contact": {
      "name": "Waitwhile Support",
      "email": "support@waitwhile.com",
      "url": "https://waitwhile.com"
    }
  },
  "x-readme": {
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Visits",
      "description": "\nVisits contain operations for retrieving and updating visits.\nA Visit is a record of someone being on a location or having made booking.\nIt can be in one of four different states \"waiting\", \"booked\", \"serving\" and \"complete\" and contains all information about a customer.\n            "
    }
  ],
  "openapi": "3.0.0",
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "apikey",
        "in": "header"
      }
    },
    "schemas": {
      "errorCode": {
        "type": "string",
        "description": "Error code if response was a 4xx or 5xx",
        "enum": [
          "access_blocked",
          "account_already_exists_but_belongs_elsewhere",
          "account_already_merged",
          "account_creation_disabled",
          "account_creation_disallowed_for_domain",
          "account_disabled",
          "account_does_not_allow_api_keys",
          "account_forbidden",
          "account_is_missing_stripe_customer",
          "account_messaging_provisioned",
          "account_migrated",
          "account_must_contain_at_least_one_location",
          "account_not_available",
          "account_not_configured_to_use_saml",
          "account_not_found",
          "account_not_verified",
          "account_subscription_missing",
          "action_requires_reauthentication",
          "advanced_location_directory_not_enabled",
          "all_ids_limit_exceeded",
          "anonymization_should_not_be_less_than_24hours",
          "api_key_access_not_allowed",
          "api_key_not_found",
          "asset_already_exists",
          "asset_create_forbidden",
          "asset_delete_forbidden",
          "asset_list_forbidden",
          "asset_not_found",
          "asset_update_forbidden",
          "attribute_is_immutable",
          "audit_logs_not_enabled",
          "auth_persistence_not_enabled",
          "auth_user_has_no_valid_provider",
          "auth_user_not_found",
          "authentication_token_failed_provider_missing",
          "authentication_token_failed",
          "availability_cannot_contain_session_services",
          "backup_files_not_found",
          "bigquery_client_not_initialized",
          "booking_not_enabled",
          "booking_not_public",
          "booking_to_waitlist_sync_not_enabled",
          "cannot_assign_non_category_parent",
          "cannot_assign_non_existing_locations",
          "cannot_assign_non_existing_shortname",
          "cannot_assign_parent_to_category",
          "cannot_change_is_category",
          "cannot_copy_location_settings",
          "cannot_delete_organization_with_accounts_assigned",
          "cannot_deprovision_type",
          "cannot_download_report_with_multiple_accounts",
          "cannot_enable_active_booking",
          "cannot_enable_active_waitlist",
          "cannot_move_account_owner",
          "cannot_provision_local_toll_free_number",
          "cannot_provision_type",
          "cannot_remove_last_owner",
          "cannot_resolve_account_for_location",
          "cannot_update_non_pending_visit",
          "capacity_management_not_enabled",
          "card_cvc_incorrect",
          "card_declined",
          "card_error_occurred",
          "card_number_incorrect",
          "card_purchase_not_supported",
          "circular_parentid",
          "client_config_not_found",
          "custom_alert_texts_not_enabled",
          "custom_billing_settings_not_enabled",
          "custom_messaging_not_enabled",
          "custom_reply_triggers_not_enabled",
          "custom_roles_not_enabled",
          "custom_styles_not_enabled",
          "custom_support_message_not_enabled",
          "customer_already_booked",
          "customer_already_waitlisted_1",
          "customer_already_waitlisted",
          "customer_data_export_not_enabled",
          "customer_import_not_enabled",
          "customer_maxed_allowed_upcoming_bookings",
          "customer_not_allowed",
          "customer_not_found",
          "customer_session_overlap",
          "customer_visit_not_found",
          "access_logging_not_enabled",
          "data_anonymization_not_enabled",
          "date_missing",
          "unknown_error",
          "default_value_cannot_be_greater_than_max",
          "default_value_cannot_be_less_than_min",
          "domain_assignment_forbidden",
          "domain_is_not_allowed",
          "domains_already_assigned_to_org",
          "duration_missing",
          "emaiL_already_accepted_to_account",
          "email_already_accepted_to_other_account",
          "email_already_invited_to_account",
          "email_already_invited_to_other_account",
          "email_already_invited",
          "email_domain_already_associated",
          "email_domain_already_in_use",
          "email_domain_not_allowed_for_account",
          "email_domain_not_allowed",
          "email_missing",
          "email_must_match_auth_provider",
          "export_not_enabled",
          "export_result_too_large",
          "external_authentication_not_found",
          "external_calendar_authorization_failed",
          "external_calendar_connections_exceeded",
          "external_calendar_location_limit_exceeded",
          "external_calendar_not_connected",
          "external_calendar_not_enabled_on_any_locations",
          "external_calendar_not_enabled",
          "failed_to_allocate_link_id",
          "failed_to_allocate_shortname",
          "field_cannot_be_both_copied_and_assigned",
          "field_graph_references_missing_parent",
          "field_must_be_assigned_at_least_one_location",
          "field_not_found",
          "field_property_not_allowed",
          "file_content_disallowed",
          "file_content_does_not_match_content_type",
          "file_not_found",
          "filter_criteria_too_broad",
          "goals_not_enabled",
          "https_required",
          "impersonated_user_not_allowed_auth_token_creation",
          "incoming_messages_disallowed",
          "incorrect_product_price",
          "initiate_customer_chat_not_enabled",
          "insufficient_permissions_for_roles",
          "insufficient_permissions_to_manage_calendar_block",
          "insufficient_permissions_to_alert_visit",
          "insufficient_permissions_to_create_customer_note",
          "insufficient_permissions_to_move_visit",
          "insufficient_permissions_to_remove_visit",
          "insufficient_permissions_to_reschedule_booking",
          "insufficient_permissions_to_update_customer_note",
          "insufficient_permissions",
          "intercom_signature_verification_failed",
          "invalid_account",
          "invalid_api_key",
          "invalid_billing_account",
          "invalid_channel",
          "invalid_coupon",
          "invalid_date_range",
          "invalid_default_location_id",
          "invalid_entity_type",
          "invalid_external_customer_id",
          "invalid_message_channel",
          "invalid_message_provider",
          "invalid_plan",
          "invalid_qr_code_action",
          "invalid_queries",
          "invalid_roles",
          "invalid_template",
          "invite_cannot_be_resolved_by_user",
          "invite_for_email_not_found",
          "invite_for_user_not_found",
          "invite_not_found",
          "invoice_not_found",
          "label_update_forbidden",
          "labels_not_enabled",
          "last_visit_not_found",
          "location_directory_not_enabled",
          "location_does_not_match_visit_location",
          "location_forbidden",
          "location_id_missing",
          "location_ids_required",
          "location_inactive",
          "location_not_found",
          "location_status_not_found",
          "location_too_busy",
          "location_with_short_name_already_exists_belongs_elsewhere",
          "locations_not_found_on_account",
          "mailgun_signature_verification_failed",
          "manual_availability_slot_mode_not_allowed",
          "max_availability_exceeded",
          "max_metadata_keys_exceeded",
          "max_num_api_keys_exceeded",
          "max_num_rows_exceeded",
          "max_number_of_active_locations_exceeded",
          "max_number_of_report_templates_exceeded",
          "max_number_of_visits_exceeded",
          "party_size_exceeded",
          "max_serving_capacity_exceeded",
          "max_serving_exceeded",
          "max_surveys_per_location_exceeded",
          "max_visits_per_request_exceeded",
          "max_waiting_capacity_exceeded",
          "max_waiting_exceeded",
          "message_block_not_found",
          "message_body_empty",
          "message_config_cannot_be_deleted",
          "message_config_not_found",
          "message_not_found",
          "message_quota_out_of_range",
          "message_template_not_found",
          "message_usage_out_of_range",
          "messaging_already_provisioned_using_different_number_setting",
          "messaging_already_provisioned_using_different_provider",
          "messaging_already_provisioned_using_different_sender",
          "messaging_already_provisioned_using_different_toll_free_number_setting",
          "method_not_allowed",
          "missing_information",
          "locationid_missing",
          "missing_location_ids_or_shortnames",
          "missing_or_invalid_recaptcha",
          "state_missing",
          "multiple_accounts_not_allowed",
          "must_be_super_user_to_migrate_to_target_account",
          "must_provision_phone_number",
          "no_available_numbers_can_be_provisioned",
          "no_available_numbers_found",
          "no_available_spots_for_resource",
          "no_available_spots",
          "no_card_or_default_payment_registered",
          "no_card_registered",
          "no_recipients_for_channel",
          "no_upcoming_invoice",
          "no_waitlists_found_for_v1",
          "non_owner_cannot_assign_owner_role",
          "note_not_found",
          "oidc_invalid_id_token",
          "oidc_invalid_provider_id",
          "only_sso_user_can_be_provisioned",
          "operation_not_found",
          "org_already_exists",
          "org_assignment_forbidden",
          "org_not_found",
          "override_default_account_forbidden",
          "owner_not_found",
          "parent_must_be_category",
          "password_does_not_meet_requirements",
          "performance_reports_not_enabled",
          "phone_number_not_found",
          "plan_requires_quantity",
          "plan_self_service_is_disabled",
          "plugin_not_found",
          "preset_question_not_found",
          "price_id_not_found",
          "provided_location_shortname_prefix_does_not_match",
          "provided_locations_do_not_belong_to_one_account",
          "provision_messaging_unsupported",
          "public_config_update_forbidden",
          "query_size_too_large",
          "recaptcha_verification_failed_no_token",
          "recaptcha_verification_failed",
          "recipient_email_invalid",
          "recepient_phone_invalid",
          "referring_account_not_found",
          "rejected_by_external_plugin",
          "report_date_range_too_large",
          "report_exceeds_max_analytics_historical_days",
          "report_run_data_unavailable",
          "report_run_in_progress",
          "report_run_not_found",
          "report_template_forbidden",
          "report_template_invalid_default_template_name",
          "report_template_invalid_relative_range",
          "report_template_missing_required_fields",
          "report_template_multiple_accounts_disallowed",
          "report_template_not_found",
          "reporting_not_enabled",
          "request_limit_exceeded",
          "resource_already_connected_to_user",
          "resource_category_has_no_resource_supporting_services",
          "resource_category_has_no_resources",
          "resourceids_contains_invalid_resource",
          "resource_must_belong_to_category",
          "resource_not_found",
          "role_assignment_forbidden",
          "role_forbidden",
          "saml_invalid_logout_request",
          "saml_sso_logout_url_missing",
          "sandbox_mode_not_enabled",
          "search_not_enabled",
          "search_unsupported_entity_type",
          "server_implementation_error",
          "serviceids_contains_invalid_service",
          "service_not_supported_by_any_resource",
          "service_not_supported_by_resources",
          "service_session_date_not_found",
          "service_session_id_cannot_be_chosen",
          "service_session_id_not_found",
          "service_with_sessions_not_allowed_on_waitlist",
          "short_name_not_available",
          "shortened_link_not_found",
          "sms_provider_api_key_required",
          "sms_provider_change_not_allowed",
          "sms_signup_not_enabled",
          "source_account_not_found",
          "source_location_not_found",
          "sso_not_available_for_provider",
          "sso_provider_missing_data",
          "sso_provider_not_allowed",
          "sso_type_not_enabled",
          "start_after_must_be_date",
          "start_after_must_be_datetime",
          "start_after_must_be_identifier",
          "start_after_must_be_integer",
          "subscription_does_not_have_plan_item",
          "survey_answer_not_found",
          "survey_name_required",
          "survey_not_active",
          "survey_not_found_for_location",
          "survey_not_found",
          "survey_preset_not_found",
          "surveys_not_enabled",
          "target_location_not_found",
          "throughput_controls_not_enabled",
          "toll_free_verification_invalid_payload",
          "toll_free_verification_not_found",
          "too_many_active_locations",
          "too_many_concurrent_queries",
          "too_many_requests_for_provided_email",
          "twilio_signature_verification_failed",
          "type_must_match_parent",
          "unauthorized_to_assign_locations",
          "unauthorized_to_edit_note",
          "unauthorized_to_unassign_locations",
          "unauthorized",
          "unknown_message_trigger",
          "uploaded_file_too_large",
          "uploaded_file_type_not_allowed",
          "user_cannot_connect_with_resource_category",
          "user_cannot_remove_themself",
          "user_connect_with_resource_forbidden",
          "user_does_not_belong_to_account",
          "user_does_not_belong_to_v1",
          "user_email_already_verified",
          "user_email_domain_not_allowed",
          "user_email_exists",
          "user_email_not_found",
          "user_exists",
          "user_forbidden",
          "user_insufficient_permissions",
          "user_must_be_connected_to_resource",
          "user_not_found",
          "v1_account_not_found",
          "v1_account_subscription_not_found",
          "v1_users_not_found",
          "validation_error",
          "visit_booking_not_allowed",
          "visit_cancellation_not_allowed",
          "visit_data_missing",
          "visit_draft_not_allowed",
          "visit_external_validation_not_enabled",
          "visit_external_validation_connection_error",
          "visit_not_booking",
          "visit_missing_required_resource_categories",
          "visit_missing_required_service_categories",
          "visit_must_have_one_service_assigned",
          "visit_not_draft",
          "visit_not_found",
          "visit_not_pending",
          "visit_pending_not_allowed",
          "visit_quota_exceeded",
          "visit_quota_out_of_range",
          "visit_rescheduling_not_allowed",
          "visit_rule_id_not_unique",
          "visit_rule_immediate_rule_cannot_set_state",
          "visit_state_update_not_allowed",
          "visit_tag_rules_not_enabled",
          "visit_usage_out_of_range",
          "visit_waitlist_not_allowed",
          "visit_with_session_id_must_have_session_service",
          "visit_with_session_service_must_have_session_id",
          "visits_must_be_assigned_to_same_location",
          "waitlist_closed",
          "waitlist_not_enabled",
          "waitlist_not_public",
          "wallet_pass_not_enabled",
          "webhook_feature_disabled",
          "webhook_limit_per_account_exceeded",
          "webhook_limit_per_location_exceeded",
          "webhook_not_found",
          "webhook_port_out_of_range",
          "webhook_protocol_invalid",
          "webhook_url_hostname_not_found",
          "webhook_url_invalid",
          "webhook_url_not_allowed",
          "white_labeling_not_enabled"
        ]
      },
      "StatusResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code for response",
            "minimum": 200,
            "maximum": 599
          },
          "message": {
            "type": "string",
            "description": "Message for response"
          },
          "error": {
            "type": "string",
            "description": "Error if response was a 4xx or 5xx"
          },
          "errorCode": {
            "$ref": "#/components/schemas/errorCode"
          }
        }
      }
    }
  },
  "paths": {
    "/visits/import": {
      "post": {
        "summary": "Import visits",
        "operationId": "postVisitsImport",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "csv",
              "enum": [
                "csv",
                "json"
              ]
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identifier of location",
              "example": "FejxZ0WWpXTjzIScVEq0",
              "pattern": "^[a-zA-Z0-9]{20}$",
              "x-convert": {
                "trim": true
              }
            },
            "description": "Identifier of location"
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "BOOKED",
                "WAITING",
                "SERVING",
                "COMPLETE"
              ],
              "x-convert": {
                "case": "upper"
              }
            }
          }
        ],
        "tags": [
          "Visits"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "$ref": "#/x-alt-definitions/Model6"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "429": {
            "description": "Too Many Requests"
          }
        }
      }
    }
  },
  "x-alt-definitions": {
    "string": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "nullable": true
              }
            ]
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "locationIds": {
      "type": "array",
      "description": "Location identifiers",
      "example": "0bNUpoiBT1PoOZogGLeq",
      "x-constraint": {
        "unique": true,
        "single": true
      },
      "items": {
        "type": "string",
        "description": "Unique identifier",
        "example": "FejxZ0WWpXTjzIScVEq0",
        "pattern": "^[a-zA-Z0-9]{20}$",
        "x-convert": {
          "trim": true
        }
      }
    },
    "waitDurationQuantiles": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "Zero or positive decimal",
        "example": 0.5,
        "minimum": 0
      }
    },
    "serveDurationQuantiles": {
      "type": "array",
      "items": {
        "type": "number",
        "description": "Zero or positive decimal",
        "example": 0.5,
        "minimum": 0
      }
    },
    "numWaitlistedByDayOfWeek": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numBookedByDayOfWeek": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numServedByDayOfWeek": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numNoShowedByDayOfWeek": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numWaitlistedByHourOfDay": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numBookedByHourOfDay": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numServedByHourOfDay": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "numNoShowedByHourOfDay": {
      "type": "array",
      "items": {
        "type": "integer",
        "description": "Zero or positive integer",
        "example": 2,
        "minimum": 0
      }
    },
    "VisitAnalyticsStats": {
      "type": "object",
      "properties": {
        "numVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numWaitlisted": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numBookingsMade": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numBookings": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numNoShowed": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numServed": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCompleted": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCancelled": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numRemoved": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCheckIns": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numUniqueCustomers": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCustomers": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "serveRatio": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "cancelRatio": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgPartySize": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgWaitDuration": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgServeDuration": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "waitDurationQuantiles": {
          "$ref": "#/x-alt-definitions/waitDurationQuantiles"
        },
        "serveDurationQuantiles": {
          "$ref": "#/x-alt-definitions/serveDurationQuantiles"
        },
        "numWaitlistedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numWaitlistedByDayOfWeek"
        },
        "numBookedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numBookedByDayOfWeek"
        },
        "numServedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numServedByDayOfWeek"
        },
        "numNoShowedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numNoShowedByDayOfWeek"
        },
        "numWaitlistedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numWaitlistedByHourOfDay"
        },
        "numBookedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numBookedByHourOfDay"
        },
        "numServedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numServedByHourOfDay"
        },
        "numNoShowedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numNoShowedByHourOfDay"
        }
      }
    },
    "VisitAnalyticsGroupBy": {
      "type": "object",
      "properties": {
        "numVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numWaitlisted": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numBookingsMade": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numBookings": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numNoShowed": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numServed": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCompleted": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCancelled": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numRemoved": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCheckIns": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numUniqueCustomers": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCustomers": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "serveRatio": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "cancelRatio": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgPartySize": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgWaitDuration": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgServeDuration": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "waitDurationQuantiles": {
          "$ref": "#/x-alt-definitions/waitDurationQuantiles"
        },
        "serveDurationQuantiles": {
          "$ref": "#/x-alt-definitions/serveDurationQuantiles"
        },
        "numWaitlistedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numWaitlistedByDayOfWeek"
        },
        "numBookedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numBookedByDayOfWeek"
        },
        "numServedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numServedByDayOfWeek"
        },
        "numNoShowedByDayOfWeek": {
          "$ref": "#/x-alt-definitions/numNoShowedByDayOfWeek"
        },
        "numWaitlistedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numWaitlistedByHourOfDay"
        },
        "numBookedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numBookedByHourOfDay"
        },
        "numServedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numServedByHourOfDay"
        },
        "numNoShowedByHourOfDay": {
          "$ref": "#/x-alt-definitions/numNoShowedByHourOfDay"
        },
        "id": {
          "type": "string",
          "description": "Unique identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "name": {
          "type": "string",
          "description": "Name",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "categoryId": {
          "type": "string",
          "description": "Unique identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "categoryName": {
          "type": "string",
          "description": "Name",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        }
      }
    },
    "locations": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/VisitAnalyticsGroupBy"
      }
    },
    "resources": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/VisitAnalyticsGroupBy"
      }
    },
    "services": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/VisitAnalyticsGroupBy"
      }
    },
    "dataFields": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/VisitAnalyticsGroupBy"
      }
    },
    "partySizes": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/VisitAnalyticsGroupBy"
      }
    },
    "users": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/VisitAnalyticsGroupBy"
      }
    },
    "VisitAnalyticsResponse": {
      "type": "object",
      "properties": {
        "locationIds": {
          "$ref": "#/x-alt-definitions/locationIds"
        },
        "fromDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date in ISO-8601 format",
          "example": "2020-01-01T17:00:00.000Z"
        },
        "toDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date in ISO-8601 format",
          "example": "2020-01-01T17:00:00.000Z"
        },
        "timezone": {
          "type": "string",
          "description": "Timezone in xxx/yyy format",
          "example": "A short-sized string",
          "minLength": 0,
          "maxLength": 30,
          "x-convert": {
            "trim": true
          }
        },
        "overall": {
          "$ref": "#/x-alt-definitions/VisitAnalyticsStats"
        },
        "locations": {
          "$ref": "#/x-alt-definitions/locations"
        },
        "resources": {
          "$ref": "#/x-alt-definitions/resources"
        },
        "services": {
          "$ref": "#/x-alt-definitions/services"
        },
        "dataFields": {
          "$ref": "#/x-alt-definitions/dataFields"
        },
        "partySizes": {
          "$ref": "#/x-alt-definitions/partySizes"
        },
        "users": {
          "$ref": "#/x-alt-definitions/users"
        }
      },
      "required": [
        "locationIds",
        "fromDate",
        "toDate",
        "timezone"
      ]
    },
    "MonthlyVisitAnalyticsPeriod": {
      "type": "object",
      "properties": {
        "period": {
          "type": "string",
          "description": "Year and month in YYYY-MM format",
          "example": "2020-01",
          "pattern": "^[0-9]{4}-(1[0-2]|0[1-9])$",
          "x-convert": {
            "trim": true
          }
        },
        "businessName": {
          "type": "string",
          "description": "Name",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "accountId": {
          "type": "string",
          "description": "Account identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "locationName": {
          "type": "string",
          "description": "Name",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "locationShortName": {
          "type": "string",
          "description": "Short name for use in URLs",
          "example": "shortname",
          "maxLength": 30,
          "pattern": "^[a-z0-9-]{3,20}[0-9]{0,10}$",
          "x-convert": {
            "case": "lower",
            "trim": true
          }
        },
        "locationId": {
          "type": "string",
          "description": "Identifier of location",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "numVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numBookingsMade": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numBookings": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "servedVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "completedVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "noShowedVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "cancelledVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "removedVisits": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "uniqueCustomers": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numCustomers": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "serveRatio": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "cancelRatio": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "avgPartySize": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "avgWaitDuration": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "avgServeDuration": {
          "type": "number",
          "description": "Zero or positive decimal",
          "example": 0.5,
          "minimum": 0
        },
        "numSmsSent": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "numEmailSent": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        }
      }
    },
    "MonthlyVisitAnalyticsResponse": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/MonthlyVisitAnalyticsPeriod"
      }
    },
    "messageType": {
      "type": "string",
      "enum": [
        "BOOKING-ALERT",
        "WAITLIST-ALERT",
        "BOOKING-RESCHEDULED",
        "WAITLIST-RESCHEDULED",
        "BOOKING-CANCEL",
        "WAITLIST-CANCEL",
        "BOOKING-COMPLETE",
        "WAITLIST-COMPLETE",
        "BOOKING-FOLLOW-UP",
        "WAITLIST-FOLLOW-UP",
        "BOOKING-CONFIRM",
        "WAITLIST-CONFIRM",
        "WAITLIST-NEXT",
        "BOOKING-NO-SHOW",
        "WAITLIST-NO-SHOW",
        "BOOKING-REMINDER",
        "BOOKING-SERVE",
        "WAITLIST-SERVE",
        "BOOKING-REJECTED",
        "BOOKING-REQUESTED",
        "USER-BOOKING-ARRIVED",
        "USER-WAITLIST-ARRIVED",
        "USER-BOOKING-CANCEL",
        "USER-WAITLIST-CANCEL",
        "USER-BOOKING-COMPLETE",
        "USER-WAITLIST-COMPLETE",
        "USER-BOOKING-CONFIRM",
        "USER-BOOKING-WAITING",
        "USER-WAITLIST-CONFIRM",
        "USER-BOOKING-NOSHOW",
        "USER-WAITLIST-NOSHOW",
        "USER-BOOKING-REMOVE",
        "USER-WAITLIST-REMOVE",
        "USER-BOOKING-SERVE",
        "USER-WAITLIST-SERVE",
        "USER-BOOKING-ALERTED",
        "USER-WAITLIST-ALERTED",
        "USER-BOOKING-DELAYED",
        "USER-WAITLIST-DELAYED",
        "USER-BOOKING-CONFIRMED",
        "USER-WAITLIST-CONFIRMED",
        "USER-INCOMING-MESSAGE",
        "USER-BOOKING-RESCHEDULED",
        "USER-WAITLIST-RESCHEDULED",
        "USER-BOOKING-REQUESTED",
        "USER-SURVEY-ANSWERED"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "FCM"
      ]
    },
    "Model1": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/x-alt-definitions/type"
        },
        "token": {
          "type": "string",
          "description": "FCM token or similar",
          "minLength": 1,
          "maxLength": 2000
        }
      },
      "required": [
        "type",
        "token"
      ]
    },
    "VisitMessagingTokens": {
      "type": "array",
      "description": "Tokens used for sending visit messages",
      "x-meta": {
        "publicDocsVisibility": false
      },
      "maxItems": 5,
      "items": {
        "$ref": "#/x-alt-definitions/Model1"
      }
    },
    "liveActivityToken": {
      "type": "object",
      "description": "Update token for customer live activity",
      "x-meta": {
        "publicDocsVisibility": false
      },
      "nullable": true,
      "properties": {
        "fcmToken": {
          "type": "string",
          "description": "FCM token or similar",
          "minLength": 1,
          "maxLength": 2000
        },
        "apnsToken": {
          "type": "string",
          "description": "FCM token or similar",
          "minLength": 1,
          "maxLength": 2000
        }
      }
    },
    "VisitServicesById": {
      "type": "object",
      "description": "Services of visit, ***deprecated*** use serviceIds instead",
      "nullable": true
    },
    "VisitResourcesById": {
      "type": "object",
      "description": "Resources of visit, ***deprecated*** use resourceIds instead",
      "nullable": true
    },
    "VisitDataFieldsById": {
      "type": "object",
      "description": "Data-fields of visit, ***deprecated*** use dataFields instead"
    },
    "serviceIds": {
      "type": "array",
      "description": "Service identifiers",
      "nullable": true,
      "x-constraint": {
        "unique": true,
        "single": true
      },
      "items": {
        "type": "string",
        "description": "Identifier of service",
        "example": "FejxZ0WWpXTjzIScVEq0",
        "pattern": "^[a-zA-Z0-9]{20}$",
        "x-convert": {
          "trim": true
        }
      }
    },
    "resourceIds": {
      "type": "array",
      "description": "Resource identifiers",
      "nullable": true,
      "x-constraint": {
        "unique": true,
        "single": true
      },
      "items": {
        "type": "string",
        "description": "Identifier of resource",
        "example": "FejxZ0WWpXTjzIScVEq0",
        "pattern": "^[a-zA-Z0-9]{20}$",
        "x-convert": {
          "trim": true
        }
      }
    },
    "values": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "anyOf": [
          {
            "type": "string",
            "description": "Medium string",
            "example": "A medium-sized string",
            "minLength": 0,
            "maxLength": 500,
            "x-convert": {
              "trim": true
            }
          },
          {
            "type": "boolean",
            "nullable": true
          },
          {
            "type": "number",
            "nullable": true
          }
        ]
      }
    },
    "VisitDataField": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "values": {
          "$ref": "#/x-alt-definitions/values"
        }
      },
      "required": [
        "id",
        "values"
      ]
    },
    "dataFields1": {
      "type": "array",
      "description": "Data-fields",
      "nullable": true,
      "items": {
        "$ref": "#/x-alt-definitions/VisitDataField"
      }
    },
    "state": {
      "type": "string",
      "description": "State of visit",
      "enum": [
        "PENDING",
        "DRAFT",
        "BOOKED",
        "WAITING",
        "SERVING",
        "COMPLETE"
      ],
      "x-convert": {
        "case": "upper"
      }
    },
    "Model2": {
      "type": "string",
      "description": "Tag associated with visit",
      "enum": [
        "NO-SHOW",
        "CANCELLED",
        "REMOVED",
        "ALERTED",
        "ARRIVED",
        "DELAYED",
        "CONFIRMED",
        "EXPIRED",
        "FLAGGED",
        "IMPORTED",
        "PRIORITIZED",
        "CAPACITY",
        "REJECTED"
      ],
      "x-convert": {
        "case": "upper"
      }
    },
    "VisitTags": {
      "type": "array",
      "description": "Optional tags associated with visit",
      "maxItems": 10,
      "x-constraint": {
        "unique": true
      },
      "items": {
        "$ref": "#/x-alt-definitions/Model2"
      }
    },
    "source": {
      "type": "string",
      "description": "Source where visit was created",
      "enum": [
        "WEB-APP",
        "IOS-APP",
        "ANDROID-APP",
        "PUBLIC",
        "KIOSK",
        "QR",
        "SMS",
        "EMAIL",
        "API",
        "RWG",
        "IMPORT",
        "IOS-APP-CLIP"
      ],
      "x-convert": {
        "case": "upper"
      }
    },
    "locale": {
      "type": "string",
      "description": "Locale in xx-YY format, where the first part is language and second country code",
      "example": "en-US",
      "enum": [
        "ca-AD",
        "ar-AE",
        "ps-AF",
        "tk-AF",
        "uz-AF",
        "en-AG",
        "en-AI",
        "sq-AL",
        "hy-AM",
        "pt-AO",
        "en-AQ",
        "ru-AQ",
        "gn-AR",
        "es-AR",
        "en-AS",
        "sm-AS",
        "de-AT",
        "en-AU",
        "nl-AW",
        "pa-AW",
        "sv-AX",
        "az-AZ",
        "bs-BA",
        "hr-BA",
        "sr-BA",
        "en-BB",
        "bn-BD",
        "de-BE",
        "fr-BE",
        "nl-BE",
        "fr-BF",
        "ff-BF",
        "bg-BG",
        "ar-BH",
        "fr-BI",
        "rn-BI",
        "fr-BJ",
        "fr-BL",
        "en-BM",
        "ms-BN",
        "ay-BO",
        "qu-BO",
        "es-BO",
        "nl-BQ",
        "pt-BR",
        "en-BS",
        "dz-BT",
        "nn-BV",
        "nb-BV",
        "no-BV",
        "en-BW",
        "tn-BW",
        "be-BY",
        "ru-BY",
        "en-BZ",
        "es-BZ",
        "en-CA",
        "fr-CA",
        "en-CC",
        "fr-CD",
        "kg-CD",
        "ln-CD",
        "lu-CD",
        "sw-CD",
        "fr-CF",
        "sg-CF",
        "fr-CG",
        "ln-CG",
        "de-CH",
        "fr-CH",
        "it-CH",
        "rm-CH",
        "fr-CI",
        "en-CK",
        "rar-CK",
        "es-CL",
        "en-CM",
        "fr-CM",
        "zh-CN",
        "es-CO",
        "es-CR",
        "es-CU",
        "pt-CV",
        "en-CW",
        "nl-CW",
        "pa-CW",
        "en-CX",
        "el-CY",
        "hy-CY",
        "tr-CY",
        "cs-CZ",
        "sk-CZ",
        "de-DE",
        "ar-DJ",
        "fr-DJ",
        "da-DK",
        "en-DM",
        "es-DO",
        "ar-DZ",
        "es-EC",
        "et-EE",
        "ar-EG",
        "es-EH",
        "aa-ER",
        "ar-ER",
        "byn-ER",
        "en-ER",
        "kun-ER",
        "nrb-ER",
        "ssy-ER",
        "tig-ER",
        "ti-ER",
        "ca-ES",
        "es-ES",
        "eu-ES",
        "am-ET",
        "fi-FI",
        "sv-FI",
        "en-FJ",
        "fj-FJ",
        "hif-FJ",
        "rtm-FJ",
        "en-FK",
        "en-FM",
        "fo-FO",
        "fr-FR",
        "fr-GA",
        "en-GB",
        "en-GD",
        "ka-GE",
        "fr-GF",
        "en-GG",
        "fr-GG",
        "en-GH",
        "en-GI",
        "kl-GL",
        "en-GM",
        "fr-GN",
        "ff-GN",
        "fr-GP",
        "fan-GQ",
        "fr-GQ",
        "pt-GQ",
        "es-GQ",
        "el-GR",
        "en-GS",
        "es-GT",
        "ch-GU",
        "en-GU",
        "es-GU",
        "pt-GW",
        "en-GY",
        "en-HK",
        "zh-HK",
        "en-HM",
        "es-HN",
        "hr-HR",
        "fr-HT",
        "ht-HT",
        "hu-HU",
        "id-ID",
        "en-IE",
        "ga-IE",
        "ar-IL",
        "he-IL",
        "en-IM",
        "gv-IM",
        "en-IN",
        "hi-IN",
        "en-IO",
        "ar-IQ",
        "ku-IQ",
        "fa-IR",
        "is-IS",
        "it-IT",
        "en-JE",
        "fr-JE",
        "en-JM",
        "ar-JO",
        "ja-JP",
        "en-KE",
        "sw-KE",
        "ky-KG",
        "ru-KG",
        "km-KH",
        "en-KI",
        "ar-KM",
        "fr-KM",
        "en-KN",
        "ko-KP",
        "ko-KR",
        "ar-KW",
        "en-KY",
        "kk-KZ",
        "ru-KZ",
        "lo-LA",
        "ar-LB",
        "fr-LB",
        "en-LC",
        "de-LI",
        "si-LK",
        "ta-LK",
        "en-LR",
        "en-LS",
        "st-LS",
        "lt-LT",
        "de-LU",
        "fr-LU",
        "lb-LU",
        "lv-LV",
        "ar-LY",
        "ar-MA",
        "fr-MC",
        "ro-MD",
        "bs-ME",
        "hr-ME",
        "sq-ME",
        "sr-ME",
        "en-MF",
        "fr-MF",
        "nl-MF",
        "fr-MG",
        "mg-MG",
        "en-MH",
        "mh-MH",
        "mk-MK",
        "fr-ML",
        "my-MM",
        "mn-MN",
        "pt-MO",
        "zh-MO",
        "ch-MP",
        "en-MP",
        "fr-MQ",
        "ar-MR",
        "en-MS",
        "en-MT",
        "mt-MT",
        "en-MU",
        "dv-MV",
        "en-MW",
        "ny-MW",
        "es-MX",
        "ms-MY",
        "pt-MZ",
        "af-NA",
        "en-NA",
        "fr-NC",
        "fr-NE",
        "en-NF",
        "en-NG",
        "es-NI",
        "nl-NL",
        "nn-NO",
        "nb-NO",
        "no-NO",
        "ne-NP",
        "en-NR",
        "na-NR",
        "en-NU",
        "en-NZ",
        "mi-NZ",
        "ar-OM",
        "es-PA",
        "es-PE",
        "fr-PF",
        "en-PG",
        "en-PH",
        "en-PK",
        "ur-PK",
        "pl-PL",
        "fr-PM",
        "en-PN",
        "en-PR",
        "es-PR",
        "ar-PS",
        "pt-PT",
        "en-PW",
        "gn-PY",
        "es-PY",
        "ar-QA",
        "fr-RE",
        "ro-RO",
        "sr-RS",
        "ru-RU",
        "en-RW",
        "fr-RW",
        "rw-RW",
        "ar-SA",
        "en-SB",
        "en-SC",
        "fr-SC",
        "ar-SD",
        "en-SD",
        "sv-SE",
        "en-SG",
        "ms-SG",
        "ta-SG",
        "zh-SG",
        "en-SH",
        "sl-SI",
        "no-SJ",
        "sk-SK",
        "en-SL",
        "it-SM",
        "fr-SN",
        "ar-SO",
        "so-SO",
        "nl-SR",
        "en-SS",
        "pt-ST",
        "es-SV",
        "en-SX",
        "nl-SX",
        "ar-SY",
        "en-SZ",
        "ss-SZ",
        "en-TC",
        "ar-TD",
        "fr-TD",
        "fr-TF",
        "fr-TG",
        "th-TH",
        "ru-TJ",
        "tg-TJ",
        "en-TK",
        "pt-TL",
        "ru-TM",
        "tk-TM",
        "ar-TN",
        "en-TO",
        "to-TO",
        "tr-TR",
        "en-TT",
        "en-TV",
        "zh-TW",
        "en-TZ",
        "sw-TZ",
        "uk-UA",
        "en-UG",
        "sw-UG",
        "en-UM",
        "en-US",
        "es-UY",
        "ru-UZ",
        "uz-UZ",
        "de-VA",
        "fr-VA",
        "it-VA",
        "la-VA",
        "en-VC",
        "es-VE",
        "en-VG",
        "en-VI",
        "vi-VN",
        "bi-VU",
        "en-VU",
        "fr-VU",
        "fr-WF",
        "en-WS",
        "sm-WS",
        "sq-XK",
        "sr-XK",
        "ar-YE",
        "fr-YT",
        "af-ZA",
        "en-ZA",
        "nr-ZA",
        "st-ZA",
        "ss-ZA",
        "tn-ZA",
        "ts-ZA",
        "ve-ZA",
        "xh-ZA",
        "zu-ZA",
        "en-ZM",
        "en-ZW",
        "nd-ZW",
        "sn-ZW"
      ]
    },
    "channel": {
      "type": "string",
      "description": "Message channel",
      "enum": [
        "EMAIL",
        "SMS",
        "APP"
      ],
      "x-convert": {
        "case": "upper",
        "trim": true
      }
    },
    "state1": {
      "type": "string",
      "description": "Current state of message",
      "enum": [
        "PENDING",
        "BLOCKED",
        "FAILED",
        "DELIVERED",
        "UNCONFIRMED",
        "RECEIVED"
      ],
      "x-convert": {
        "case": "upper"
      }
    },
    "lastOutgoing": {
      "type": "object",
      "nullable": true,
      "properties": {
        "messageId": {
          "type": "string",
          "description": "Unique identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "channel": {
          "$ref": "#/x-alt-definitions/channel"
        },
        "body": {
          "type": "string",
          "description": "Body of message",
          "example": "A message body",
          "nullable": true,
          "minLength": 0,
          "maxLength": 2000,
          "x-convert": {
            "trim": true
          }
        },
        "state": {
          "$ref": "#/x-alt-definitions/state1"
        },
        "type": {
          "type": "string",
          "description": "Type of message",
          "example": "A short-sized string",
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "errorCode": {
          "type": "string",
          "description": "Name",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "errorMessage": {
          "type": "string",
          "description": "Name",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time of creation",
          "example": "2020-01-01T17:00:00.000Z"
        }
      }
    },
    "lastIncoming": {
      "type": "object",
      "nullable": true,
      "properties": {
        "messageId": {
          "type": "string",
          "description": "Unique identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "channel": {
          "$ref": "#/x-alt-definitions/channel"
        },
        "body": {
          "type": "string",
          "description": "Body of message",
          "example": "A message body",
          "nullable": true,
          "minLength": 0,
          "maxLength": 2000,
          "x-convert": {
            "trim": true
          }
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time of creation",
          "example": "2020-01-01T17:00:00.000Z"
        }
      }
    },
    "numOutgoing": {
      "type": "object",
      "properties": {
        "SMS": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "EMAIL": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        }
      }
    },
    "numIncoming": {
      "type": "object",
      "properties": {
        "SMS": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "EMAIL": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        }
      }
    },
    "numAlerts": {
      "type": "object",
      "properties": {
        "SMS": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        },
        "EMAIL": {
          "type": "integer",
          "description": "Zero or positive integer",
          "example": 2,
          "minimum": 0
        }
      }
    },
    "messageInfo": {
      "type": "object",
      "properties": {
        "lastOutgoing": {
          "$ref": "#/x-alt-definitions/lastOutgoing"
        },
        "lastIncoming": {
          "$ref": "#/x-alt-definitions/lastIncoming"
        },
        "numOutgoing": {
          "$ref": "#/x-alt-definitions/numOutgoing"
        },
        "numIncoming": {
          "$ref": "#/x-alt-definitions/numIncoming"
        },
        "numAlerts": {
          "$ref": "#/x-alt-definitions/numAlerts"
        }
      }
    },
    "Model3": {
      "type": "string",
      "description": "Tag associated with visit",
      "enum": [
        "NO-SHOW",
        "CANCELLED",
        "REMOVED",
        "ALERTED",
        "ARRIVED",
        "DELAYED",
        "CONFIRMED",
        "EXPIRED",
        "FLAGGED",
        "IMPORTED",
        "PRIORITIZED",
        "CAPACITY",
        "REJECTED"
      ],
      "x-convert": {
        "case": "upper"
      }
    },
    "VisitTags1": {
      "type": "array",
      "description": "Adds specified tags to existing tags",
      "maxItems": 10,
      "x-constraint": {
        "unique": true,
        "single": true
      },
      "items": {
        "$ref": "#/x-alt-definitions/Model3"
      }
    },
    "Model4": {
      "type": "string",
      "description": "Tag associated with visit",
      "enum": [
        "NO-SHOW",
        "CANCELLED",
        "REMOVED",
        "ALERTED",
        "ARRIVED",
        "DELAYED",
        "CONFIRMED",
        "EXPIRED",
        "FLAGGED",
        "IMPORTED",
        "PRIORITIZED",
        "CAPACITY",
        "REJECTED"
      ],
      "x-convert": {
        "case": "upper"
      }
    },
    "VisitTags2": {
      "type": "array",
      "description": "Removes specified tags from existing tags",
      "maxItems": 10,
      "x-constraint": {
        "unique": true,
        "single": true
      },
      "items": {
        "$ref": "#/x-alt-definitions/Model4"
      }
    },
    "metadata": {
      "type": "object",
      "description": "Store metadata about your objects. You can store 20 keys with max length 40. Values can be strings of max length 500.",
      "nullable": true
    },
    "orderValue": {
      "type": "object",
      "description": "The order value assigned to a visit",
      "properties": {
        "value": {
          "type": "number",
          "description": "Order value",
          "example": 59,
          "minimum": 0
        },
        "currency": {
          "type": "string",
          "description": "Currency in ISO 4217 format",
          "example": "USD",
          "minLength": 3,
          "maxLength": 3,
          "x-convert": {
            "case": "upper",
            "trim": true
          }
        }
      }
    },
    "CreateVisitPayload": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Identifier of visit",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "locationId": {
          "type": "string",
          "description": "Identifier of location",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "customerId": {
          "type": "string",
          "description": "Identifier of customer, automatically derived from visitor contact information if not provided.",
          "example": "qbysnjcWCNLyOkmC6K4QMI",
          "pattern": "^[a-zA-Z0-9]{22}$",
          "x-convert": {
            "trim": true
          }
        },
        "externalCustomerId": {
          "type": "string",
          "description": "External customer identifier, optionally provided by client. Will take priority over other contact info when deriving customerId",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "name": {
          "type": "string",
          "description": "Name of customer",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "firstName": {
          "type": "string",
          "description": "First name of customer",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "lastName": {
          "type": "string",
          "description": "Last name of customer",
          "example": "A short-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 100,
          "x-convert": {
            "trim": true
          }
        },
        "phone": {
          "type": "string",
          "description": "Phone number in E.164 format",
          "example": "+16005551234",
          "nullable": true,
          "x-convert": {
            "trim": true
          }
        },
        "email": {
          "type": "string",
          "description": "Email address",
          "example": "test@test.com",
          "nullable": true,
          "maxLength": 100,
          "x-format": {
            "email": true
          },
          "x-convert": {
            "case": "lower",
            "trim": true
          }
        },
        "addMessagingTokens": {
          "$ref": "#/x-alt-definitions/VisitMessagingTokens"
        },
        "removeMessagingTokens": {
          "$ref": "#/x-alt-definitions/VisitMessagingTokens"
        },
        "liveActivityToken": {
          "$ref": "#/x-alt-definitions/liveActivityToken"
        },
        "notes": {
          "type": "string",
          "description": "Optional notes - ***Deprecated*** please use notes on [customer/notes](#operation/getCustomersCustomeridNotes)",
          "example": "A long-sized string",
          "nullable": true,
          "minLength": 0,
          "maxLength": 1000,
          "x-convert": {
            "trim": true
          }
        },
        "services": {
          "$ref": "#/x-alt-definitions/VisitServicesById"
        },
        "resources": {
          "$ref": "#/x-alt-definitions/VisitResourcesById"
        },
        "fields": {
          "$ref": "#/x-alt-definitions/VisitDataFieldsById"
        },
        "sessionSeriesId": {
          "type": "string",
          "description": "Unique identifier",
          "example": "FejxZ0WWpXTjzIScVEq0",
          "nullable": true,
          "pattern": "^[a-zA-Z0-9]{20}$",
          "x-convert": {
            "trim": true
          }
        },
        "serviceIds": {
          "$ref": "#/x-alt-definitions/serviceIds"
        },
        "resourceIds": {
          "$ref": "#/x-alt-definitions/resourceIds"
        },
        "dataFields": {
          "$ref": "#/x-alt-definitions/dataFields1"
        },
        "partySize": {
          "type": "integer",
          "description": "Party size",
          "example": 5,
          "minimum": 1,
          "maximum": 100
        },
        "quotedWaitDuration": {
          "type": "integer",
          "description": "Wait duration estimated by client",
          "example": 900,
          "minimum": 0
        },
        "position": {
          "type": "integer",
          "description": "Current position in line",
          "example": 1,
          "nullable": true,
          "minimum": 1
        },
        "state": {
          "$ref": "#/x-alt-definitions/state"
        },
        "tags": {
          "$ref": "#/x-alt-definitions/VisitTags"
        },
        "date": {
          "type": "string",
          "description": "Date and time of booking, must be in YYYY-MM-DDThh:mm format",
          "example": "2020-01-01T15:00",
          "nullable": true,
          "x-convert": {
            "trim": true
          }
        },
        "duration": {
          "type": "integer",
          "description": "Duration of booking in seconds",
          "example": 900,
          "nullable": true,
          "minimum": 0,
          "maximum": 86400
        },
        "isBlock": {
          "type": "boolean",
          "description": "Flag to indicate if booking visit is used to block out calendar",
          "example": true
        },
        "source": {
          "$ref": "#/x-alt-definitions/source"
        },
        "locale": {
          "$ref": "#/x-alt-definitions/locale"
        },
        "policyConsent": {
          "type": "boolean",
          "description": "Flag to indicate if policy and terms has been accepted",
          "example": true
        },
        "messageInfo": {
          "$ref": "#/x-alt-definitions/messageInfo"
        },
        "addTags": {
          "$ref": "#/x-alt-definitions/VisitTags1"
        },
        "removeTags": {
          "$ref": "#/x-alt-definitions/VisitTags2"
        },
        "metadata": {
          "$ref": "#/x-alt-definitions/metadata"
        },
        "orderValue": {
          "$ref": "#/x-alt-definitions/orderValue"
        },
        "pluginData": {
          "type": "string",
          "x-meta": {}
        }
      }
    },
    "VisitsPayload": {
      "type": "array",
      "minItems": 1,
      "maxItems": 200,
      "x-constraint": {
        "unique": {
          "ignoreUndefined": true
        }
      },
      "items": {
        "$ref": "#/x-alt-definitions/CreateVisitPayload"
      }
    },
    "locationIds1": {
      "type": "string",
      "enum": [
        "ALL"
      ]
    },
    "Model5": {
      "type": "object"
    },
    "Model6": {
      "type": "array",
      "items": {
        "$ref": "#/x-alt-definitions/Model5"
      }
    }
  }
}
```