# Test and edit this file at https://editor.swagger.io/

openapi: 3.0.0

info:
  version: 1.0.0
  title: TableCheck API - Messaging V1
  description: |-
    The Messaging API allows you to replace TableCheck’s built-in text messages sent to diners
    with your own messaging system and customized message templates.
    Webhooks are also available for this API.
    In addition to this page, please read the Implementation Guide carefully.
  termsOfService: https://tablecheck.atlassian.net/wiki/spaces/API/pages/61571353/TableCheck+API+Terms+of+Service

externalDocs:
  description: Implementation Guide
  url: https://tablecheck.atlassian.net/wiki/spaces/API/pages/444596766/Messaging+v1

servers:



  - url: https://api.tablecheck.com/api/messaging/v1/
    description: Production (uses live data)

paths:
  /shops:
    get:
      summary: List all shops
      operationId: listShops
      tags:
        - shops
      parameters:
        - name: ids
          in: query
          description: Array or comma-separated list of specific IDs to return.
          required: false
          schema:
            type: string
            format: bson-id
        - name: slugs
          in: query
          description: Array or comma-separated list of specific slugs to return.
          required: false
          schema:
            type: string
        - name: page
          in: query
          description: The zero-based page number. Used for pagination.
          required: false
          schema:
            type: number
            format: integer
            minimum: 0
        - name: per_page
          in: query
          description: Number of items to return at once. Used for pagination.
          required: false
          schema:
            type: number
            format: integer
            default: 20
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: A paged array of shops
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShopsListResponse"
        '400': &BadRequestError
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadRequestError"
        '403': &ForbiddenError
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
        '422': &UnprocessableEntityError
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                '$ref': "#/components/schemas/UnprocessableEntityError"
        '500': &ServerError
          description: Server Error
          content:
            application/json:
              schema:
                '$ref': "#/components/schemas/ServerError"

  /shops/{shop_id}:
    get:
      summary: Fetch a specific shop
      operationId: showShopById
      tags:
        - shops
      parameters:
        - name: shop_id
          in: path
          required: true
          description: The id or slug of the shop to retrieve
          schema:
            type: string
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ShopShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': &NotFoundError
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
        '422': *UnprocessableEntityError
        '500': *ServerError

  /account:
    get:
      summary: Get Account settings
      description: Returns the Account settings.
      operationId: getAccount
      tags:
        - account
      responses:
        '200':
          description: The Account settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '422': *UnprocessableEntityError
        '500': *ServerError

    put:
      summary: Update Account settings
      description: Updates the Account settings.
      operationId: updateAccount
      tags:
        - account
      requestBody:
        content:
          application/json:
            schema:
              '$ref': "#/components/schemas/Account"
      responses:
        '200':
          description: The updated Account settings
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AccountResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '422': *UnprocessableEntityError
        '500': *ServerError

  /webhooks:
    get:
      summary: List all Webhooks
      description: Lists all Webhooks which are used to deliver MessageEvents.
      operationId: listWebhooks
      tags:
        - webhooks
      responses:
        '200':
          description: The list of webhooks
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebhooksListResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '422': *UnprocessableEntityError
        '500': *ServerError
    post:
      summary: Create a new Webhook settings
      description: Updates the webhook settings which are used to deliver MessageEvents.
      operationId: createWebhook
      tags:
        - webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              '$ref': "#/components/schemas/Webhook"
      responses:
        '200':
          description: The Webhook which was created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebhooksListResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '422': *UnprocessableEntityError
        '500': *ServerError

  /webhooks/{webhook_id}:
    get:
      summary: Show Webhook
      description: Returns a specific Webhook object.
      operationId: showWebhook
      tags:
        - webhooks
      parameters:
        - name: webhook_id
          in: path
          required: true
          description: The ID of the Webhook to show
          schema:
            type: string
      responses:
        '200':
          description: The webhooks settings object
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebhookShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError
    put:
      summary: Update Webhook
      description: Updates a Webhook settings object.
      operationId: updateWebhook
      tags:
        - webhooks
      parameters:
        - name: webhook_id
          in: path
          required: true
          description: The ID of the Webhook to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              '$ref': "#/components/schemas/Webhook"
      responses:
        '200':
          description: The Webhook which was updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebhookShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError
    delete:
      summary: Delete a specific Webhook
      operationId: deleteWebhook
      tags:
        - webhooks
      parameters:
        - name: webhook_id
          in: path
          required: true
          description: The ID of the Webhook to delete
          schema:
            type: string
      responses:
        '200':
          description: Webhook deleted
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError

  /configs:
    get:
      summary: List all Configs
      description: Lists all Configs control how MessageEvents are delivered.
      operationId: listConfigs
      tags:
        - configs
      responses:
        '200':
          description: The list of Configs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConfigsListResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '422': *UnprocessableEntityError
        '500': *ServerError

  /configs/{message_type}:
    get:
      summary: Show Config
      description: Returns a specific Config object.
      operationId: showConfig
      tags:
        - configs
      parameters:
        - name: message_type
          in: path
          required: true
          description: The message_type of the Config to show
          schema:
            type: string
      responses:
        '200':
          description: The Config object
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConfigShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError
    put:
      summary: Update Config
      description: Updates a Config settings object.
      operationId: updateConfig
      tags:
        - configs
      parameters:
        - name: message_type
          in: path
          required: true
          description: The message_type of the Config to update
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              '$ref': "#/components/schemas/Config"
      responses:
        '200':
          description: The Config which was updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConfigShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError
    delete:
      summary: Disables a specific Config
      operationId: deleteConfig
      tags:
        - configs
      parameters:
        - name: message_type
          in: path
          required: true
          description: The message_type of the Config to disable
          schema:
            type: string
      responses:
        '200':
          description: Config disabled
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError

  /message_events:
    get:
      summary: Fetch MessageEvents (and optionally mark as "delivered")
      description: |
        Fetches MessageEvents. By default returns only undelivered MessagingRequest
        (unless delivered_at_min/delivered_at_max params are specified.)
        Returns up to 1000 items per response.
      operationId: listMessageEvents
      tags:
        - message_events
      parameters:
        - name: deliver
          in: query
          description: |
            If true, marks all queried MessageEvents as "delivered".
            Used when polling the API for new (undelivered) MessageEvents.
          schema:
            type: boolean
            default: false
        - name: message_types
          in: query
          description: Limits the types of the underlying objects to include in the response. Comma-separated.
          schema:
            type: string
            format: comma-separated
            example: reservation_accepted,reservation_cancelled
            enum: ["booking_link","request_new","reservation_pending","reservation_accepted","reservation_accepted_by_merchant","reservation_amended","reservation_cancelled","reservation_cancelled_by_merchant","reservation_rejected_by_merchant","reservation_noshow","reservation_confirm","reservation_reminder","reservation_reminder_early","reservation_info","reservation_notice","waitlist_queued","waitlist_called","waitlist_rejected_by_merchant","waitlist_reminder","waitlist_expired","iou_auth_done","iou_auth_expired","iou_auth_pending","iou_auth_reminder","iou_auth_skipped","iou_prepay_done","iou_prepay_expired","iou_prepay_pending","iou_prepay_reminder","iou_prepay_skipped","survey_link","smartpay_link","smartpay_auto","smartpay_paid","payment_paid","payment_captured","payment_pending_cancel_fee","payment_cancel_fee","payment_refunded","payment_failed","payment_rollback"]
        - name: shop_ids
          in: query
          description: Queries for MessageEvents for specific Shops. Comma-separated.
          schema:
            type: string
            format: comma-separated
            example: 93e2Zaed5d6ca1fd8e5355337,5ca1f35541293e2Zaed5d6d8e
        - name: created_at_min
          in: query
          description: |
            Queries historical MessageEvents by the time they were created.
          schema:
            type: string
            format: date-time
        - name: created_at_max
          in: query
          description: |
            Queries historical MessageEvents by the time they were created.
            If set, created_at_min is also required.
          schema:
            type: string
            format: date-time
        - name: delivered_at_min
          in: query
          description: |
            Queries historical MessageEvents by the time they were delivered.
            If set, only delivered MessageEvents will be included in the response.
          schema:
            type: string
            format: date-time
        - name: delivered_at_max
          in: query
          description: |
            Queries historical MessageEvents by the time they were delivered.
            If set, delivered_at_min is also required.
            If set, only delivered MessageEvents will be included in the response.
          schema:
            type: string
            format: date-time
        - name: include_delivered
          in: query
          description: |
            Indicates that delivered MessageEvents should be included in the response.
            Ignored if delivered_at_min and delivered_at_max are set.
          schema:
            type: boolean
            default: false

      responses:
        '200':
          description: MessageEvent found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageEventsListResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '422': *UnprocessableEntityError
        '500': *ServerError

  /message_events/{message_event_id}:
    get:
      summary: Fetch a specific MessageEvent
      operationId: showMessageEvent
      tags:
        - message_events
      parameters:
        - name: message_event_id
          in: path
          required: true
          description: The ID of the MessageEvent to retrieve
          schema:
            type: string
      responses:
        '200':
          description: MessageEvent found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageEventShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError

    delete:
      summary: Mark a specific MessageEvent as delivered
      operationId: deleteMessageEvent
      tags:
        - message_events
      parameters:
        - name: message_event_id
          in: path
          required: true
          description: The ID of the MessageEvent to mark as delivered
          schema:
            type: string
      responses:
        '200':
          description: MessageEvent marked as delivered
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageEventShowResponse"
        '400': *BadRequestError
        '403': *ForbiddenError
        '404': *NotFoundError
        '422': *UnprocessableEntityError
        '500': *ServerError

components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: AUTHORIZATION

  schemas:
    ShopsListResponse:
      type: object
      properties:
        shops:
          type: array
          items:
            $ref: "#/components/schemas/Shop"
        pagination:
          $ref: "#/components/schemas/PaginationData"

    ShopShowResponse:
      type: object
      properties:
        shop:
          $ref: "#/components/schemas/Shop"

    Shop:
      properties:
        id:
          description: The database ID of the Shop.
          type: string
          format: bson-id
          example: e2Z5ca1fd337edae5355d6893
        slug:
          description: The web ID (URL slug) of the Shop.
          type: string
          example: my-restaurant
        updated_at:
          description: The timestamp at which the Shop was updated.
          type: string
          format: date-time

    PaginationData:
      type: object
      properties:
        page:
          type: number
          format: integer
          example: 3
        per_page:
          type: number
          format: integer
          example: 100
        page_count:
          type: number
          format: integer
          example: 8
        item_count:
          type: number
          format: integer
          example: 742

    WebhooksListResponse:
      type: object
      properties:
        webhooks:
          type: array
          items:
            $ref: "#/components/schemas/Webhook"

    WebhookShowResponse:
      type: object
      properties:
        webhook:
          $ref: "#/components/schemas/Webhook"

    Webhook:
      type: object
      required:
        - callback_url
      properties:
        callback_method:
          description: Specifies whether to deliver MessageEvent callbacks by HTTP POST or PUT.
          type: string
          default: "post"
          enum: ["post","put"]
        callback_url:
          description: |
            The callback URL which to automatically deliver MessageEvents.
            Even if not specified, it is still possible to query MessageEvents via the API.
          type: string
          format: url
        callback_auth_method:
          description: Adds optional authentication to the webhook callbacks.
          type: string
          default: "none"
          enum: ["none","basic","http","oauth2"]
        callback_oauth_url:
          description: OAuth URL endpoint for authentication, used when callback_auth_method is "oauth2".
          type: string
          format: url
        callback_username:
          description: Username used when callback_auth_method is "basic" or "oauth2" (OAuth Client ID).
          type: string
        callback_password:
          description: Username used when callback_auth_method is "basic", "http", or "oauth2" (OAuth Secret Key).
          type: string
        franchise_ids:
          description: |
            Constrains the Franchises for which the callback will be delivered.
            An empty array means "all Franchises" (no restriction).
          type: array
          default: []
          items:
            type: string
            format: bson-id
            example: 7ed5d6893ae5355ca1fd33e2
        shop_ids:
          description: |
            Constrains the Shops for which the callback will be delivered.
            An empty array means "all Shops" (no restriction).
          type: array
          default: []
          items:
            type: string
            format: bson-id
            example: ae5355ca1fd337ed5d6893e2

    AccountResponse:
      type: object
      properties:
        account:
          $ref: "#/components/schemas/Account"

    Account:
      type: object
      properties:
        locale:
          description: Sets locale for API notifications.
          type: string
          enum: ["en","ja","ko","zh-CN","zh-TW","de","es","fr","nl","it","pt","tr","ru","id","ms","tl","th","lo","km","vi","ar","he","hi"]
        notify_emails:
          description: List of emails to notify upon webhook delivery failure.
          type: array
          default: []
          items:
            type: string
            format: email
            example: notify@me.com

    ConfigsListResponse:
      type: object
      properties:
        message_events:
          type: array
          items:
            $ref: "#/components/schemas/Config"

    ConfigShowResponse:
      type: object
      properties:
        message_event:
          $ref: "#/components/schemas/Config"

    Config:
      type: object
      properties:
        message_type:
          description: The message type to which the Config applies.
          type: string
          enum: ["booking_link","request_new","reservation_pending","reservation_accepted","reservation_accepted_by_merchant","reservation_amended","reservation_cancelled","reservation_cancelled_by_merchant","reservation_rejected_by_merchant","reservation_noshow","reservation_confirm","reservation_reminder","reservation_reminder_early","reservation_info","reservation_notice","waitlist_queued","waitlist_called","waitlist_rejected_by_merchant","waitlist_reminder","waitlist_expired","iou_auth_done","iou_auth_expired","iou_auth_pending","iou_auth_reminder","iou_auth_skipped","iou_prepay_done","iou_prepay_expired","iou_prepay_pending","iou_prepay_reminder","iou_prepay_skipped","survey_link","smartpay_link","smartpay_auto","smartpay_paid","payment_paid","payment_captured","payment_pending_cancel_fee","payment_cancel_fee","payment_refunded","payment_failed","payment_rollback"]
        enable_api:
          description: "If true, TableCheck will send MessageEvents of the given message_type to your API. This is independent of the enable_app_texts; it is possible to send both to the API and to send real-world messages."
          type: boolean
        enable_app_texts:
          description: "If true, the app will send live text messages to your diners (as per normal behavior). Set this to false when you are ready to activate your API integration for the given message_type."
          type: boolean
        enable_app_mails:
          description: "If true, the app will send live email messages to your diners (as per normal behavior). Set this to false when you are ready to activate your API integration for the given message_type."
          type: boolean
        updated_at:
          description: The timestamp of when the Config was last updated.
          type: string
          format: date-time

    MessageEventsListResponse:
      type: object
      properties:
        message_events:
          type: array
          items:
            $ref: "#/components/schemas/MessageEvent"

    MessageEventShowResponse:
      type: object
      properties:
        message_event:
          $ref: "#/components/schemas/MessageEvent"

    MessageEvent:
      type: object
      properties:
        id:
          description: The database ID of the MessageEvent.
          type: string
          format: bson-id
          example: ae5355ca1fd337ed5d6893e2
        message_type:
          description: |
            The behavior type of the MessageEvent. This field determines which other fields will be present in the MessageEvent object.
          type: string
          enum: ["booking_link","request_new","reservation_pending","reservation_accepted","reservation_accepted_by_merchant","reservation_amended","reservation_cancelled","reservation_cancelled_by_merchant","reservation_rejected_by_merchant","reservation_noshow","reservation_confirm","reservation_reminder","reservation_reminder_early","reservation_info","reservation_notice","waitlist_queued","waitlist_called","waitlist_rejected_by_merchant","waitlist_reminder","waitlist_expired","iou_auth_done","iou_auth_expired","iou_auth_pending","iou_auth_reminder","iou_auth_skipped","iou_prepay_done","iou_prepay_expired","iou_prepay_pending","iou_prepay_reminder","iou_prepay_skipped","survey_link","smartpay_link","smartpay_auto","smartpay_paid","payment_paid","payment_captured","payment_pending_cancel_fee","payment_cancel_fee","payment_refunded","payment_failed","payment_rollback"]
        created_at:
          description: The timestamp of when the MessageEvent was generated.
          type: string
          format: date-time
        sent_app_mail:
          description: If true, indicates that the TableCheck app will also send the message to the recipient as a standard text message.
          type: boolean
        sent_app_text:
          description: If true, indicates that the TableCheck app will also send the message to the recipient as a standard email.
          type: boolean
        recipient_phone:
          description: The mobile number of the recipient customer.
          type: string
          format: phone-e164
          example: '+81801111222'
        recipient_country:
          description: The country of the recipient customer.
          type: string
          format: country
          example: 'JP'
        locale:
          description: The locale or language code of the recipient customer.
          type: string
          format: locale
          example: 'ja'
        shop_id:
          description: The database ID of the Shop used in the message, if applicable.
          type: string
          format: bson-id
          example: e2Z5ca1fd337edae5355d6893
        shop_slug:
          description: The web ID (URL slug) of the Shop used in the message, if applicable.
          type: string
          example: my-restaurant
        shop_name:
          description: The full name of the Shop.
          type: string
          example: Sam's Sushi Bar and Grill
        shop_short_name:
          description: The short name of the Shop (15 chars or less) which can be used in text messages.
          type: string
          example: Sam's Sushi
        shop_currency:
          description: The currency of the Shop, which is used for all monetary amounts present in the message.
          type: string
          format: currency
          example: 'JPY'
        shop_time_zone:
          description: The time zone of the Shop.
          type: string
          format: time-zone
          example: 'Asia/Tokyo'
        reservation_id:
          description: The database ID of the Reservation which is related to the message.
          type: string
          format: bson-id
        reservation_ref:
          description: The identifier of Reservation set via the API.
          type: string
        reservation_created_at:
          description: The timestamp at which the Reservation was created.
          type: string
          format: date-time
        reservation_updated_at:
          description: The timestamp at which the Reservation was last updated.
          type: string
          format: date-time
        reservation_start_at:
          description: The date and time which the guest is scheduled to attend their Reservation.
          type: string
          format: date-time
#        reservation_start_local_date:
#          type: string
#        reservation_start_local_time:
#          type: string
        reservation_duration:
          description: The planned duration of Reservation in seconds. Usually this is not displayed to the diner.
          type: number
          format: seconds
        reservation_pax:
          description: The total party size of the Reservation (sum of adult, senior, child, and baby.)
          type: number
          format: integer
        reservation_pax_adult:
          description: The number of adults in the Reservation party.
          type: number
          format: integer
        reservation_pax_senior:
          description: The number of seniors in the Reservation party.
          type: number
          format: integer
        reservation_pax_child:
          description: The number of children in the Reservation party.
          type: number
          format: integer
        reservation_pax_baby:
          description: The number of babies in the Reservation party.
          type: number
          format: integer
        reservation_special_request:
          description: An additional request made on the reservation at time of booking.
          type: string
        reservation_status:
          description: The status of the Reservation.
          type: string
          enum: ["tentative","pending","request","accepted","confirmed","attended","cancelled","noshow","rejected","iou_prepay","iou_auth"]
        reservation_provider:
          description: The system provider who processed the Reservation.
          type: string
          example: tablecheck
        reservation_provider_ref:
          description: The booking code (Reservation ID) according to the system which processed the Reservation. If the reservation originated from TableCheck, this will be the same as reservation_code.
          type: string
          example: ABC-123DEF
        reservation_channel:
          description: The advertising channel via which the Reservation was created. (May be the same value as system provider.)
          type: string
          example: opentable
        reservation_source:
          description: The communication method via which the Reservation was received (phone, web, etc.)
          type: string
          example: web
        reservation_code:
          description: TableCheck's unique booking code (Reservation ID).
          type: string
          example: ABC123
        reservation_url:
          description: The URL at which the guest may update or cancel their Reservation.
          type: string
          format: url
        reservation_notice:
          description: Notice message for the Reservation. Used to communicate important information to the diner.
          type: string
        customer_id:
          description: The database ID of the Customer which is related to the message.
          type: string
          format: bson-id
        customer_ref:
          description: The identifier of Customer set via the API.
          type: string
        customer_first_name:
          description: The given name of the Customer.
          type: string
        customer_last_name:
          description: The surname of the Customer.
          type: string
        customer_alt_first_name:
          description: The nickname of the Customer, or the given name of the Customer in an alternate format.
          type: string
        customer_alt_last_name:
          description: The surname of the Customer in an alternate format.
          type: string
        customer_gender:
          description: The gender of Customer if available.
          type: string
          enum: ["male","female"]
        waitlist_url:
          description: The URL at which the guest may cancel their waitlist position.
          type: string
          format: url
        waitlist_quote_min:
          description: The minimum number of seconds the guest is expected to wait before they can be seated.
          type: number
          format: seconds
        waitlist_quote_max:
          description: The maximum number of seconds the guest is expected to wait before they can be seated.
          type: number
          format: seconds
        waitlist_called_at:
          description: The date and time at which the guest was called to attend their waitlisted Reservation.
          type: string
          format: date-time
        waitlist_call_expires_at:
          description: The date and time at which the guest was called to attend their waitlisted Reservation.
          type: string
          format: date-time
        payment_amt:
          description: The monetary amount of the payment (or authorization hold) associated with the Reservation.
          type: string
          format: decimal
        payment_type:
          description: The type of payment (or authorization hold) associated with the Reservation.
          type: string
          enum: ["postpay","prepay","smartpay","register"]
        payment_card_digits:
          description: The last 4 digits of the credit card used to make payment for the Reservation.
          type: string
        payment_brand:
          description: Brand of credit card or cashless wallet used to make payment for the Reservation.
          type: string
        iou_amt:
          description: The monetary amount required for the guest to pay to complete their Reservation.
          type: string
          format: decimal
        iou_payment_type:
          description: The type of payment required for the guest to complete their Reservation.
          type: string
          enum: ["postpay","prepay","smartpay","register"]
        iou_expires_at:
          description: The type of payment required for the guest to complete their Reservation.
          type: string
          format: date-time
        iou_url:
          description: The URL at which the guest may make payment to complete their Reservation.
          type: string
          format: url
        smartpay_amt:
          description: The monetary amount for the guest to pay by smart-checkout.
          type: string
          format: decimal
        smartpay_url:
          description: The URL at which the guest may make a smart-checkout payment for their Reservation.
          type: string
          format: url
        booking_url:
          description: The URL at which the guest may book a new Reservation for the related Shop.
          type: string
          format: url
        survey_url:
          description: The URL at which the guest may fill-in a survey for their Reservation.
          type: string
          format: url
        unsubscribe_url:
          description: The URL at which the guest may unsubscribe from surveys and other communications.
          type: string
          format: url
        updated_at:
          description: The timestamp of when the MessageEvent was last updated. This field is not present on webhook callbacks.
          type: string
          format: date-time
        delivered_at:
          description: The timestamp at which the MessageEvent was first successfully delivered. This field is not present on webhook callbacks.
          type: string
          format: date-time
        delivery_method:
          description: The method by which the MessageEvent was first successfully delivered, either "webhook" or "api". Will be null if undelivered.
          type: string
          enum: ['webhook', 'api']
        response_code:
          description: The HTTP response code received when attempting to deliver the MessageEvent to the webhook URL. 200 means success, all others indicate failure. This field is not present on webhook callbacks.
          type: number
          format: http-status
          example: 200

    BadRequestError:
      description: Occurs when the request you sent is malformed. You should not retry the same request.
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: parameter_missing
              message:
                type: string
                example: Required parameter is missing.

    ForbiddenError:
      description: Occurs when the you do not have access to the requested API resource. You should not retry the same request.
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: api_key_invalid
              message:
                type: string
                example: Your API key is invalid.

    NotFoundError:
      description: Occurs when the you request an API resource which cannot be found or has been deleted. You should not retry the same request.
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: resource_not_found
              message:
                type: string
                example: Resource not found.

    UnprocessableEntityError:
      description: Occurs when the you attempt an API action that is not valid. You should not retry the same request.
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: not_created
              message:
                type: string
                example: Could not create resource due to missing parameter.

    ServerError:
      description: Occurs when the server is busy or a bug exists. You should retry the same request after some time.
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: not_created
              message:
                type: string
                example: Could not create resource due to missing parameter.

security:
  - ApiKeyAuth: []
