> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dev.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# webhooks replay

> Replay a webhook delivery

Replays a delivered or exhausted event delivery for a subscription you own. Sets its status to pending, resets attempt\_count to 0, increments replay\_count, and enqueues a fresh delivery of the same payload with a new signature timestamp. The replay keeps the same event\_id, so your idempotency key still applies. Pending or failed deliveries are still being delivered or retried and cannot be replayed. Payloads are purged 30 days after the delivery's last attempt or replay; a delivery whose payload was purged can no longer be replayed.


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/webhooks/{id}/deliveries/{delivery_id}/replay
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.49.1
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.


    ### Per-end-user attribution


    On booking calls you may send an optional `X-End-User-Id` request header to
    attribute the booking to one of your own end users (for per-end-user
    attribution and rate-limiting). The value is an **opaque, tenant-scoped**
    identifier that you choose — not a Jinko account id. Omit it to book as the
    tenant. WorkOS-shaped values (prefixed `user_` or `org_`) are rejected.
servers:
  - url: https://api.gojinko.com
    description: Production
  - url: https://api.sandbox.gojinko.com
    description: Sandbox
security: []
paths:
  /v1/webhooks/{id}/deliveries/{delivery_id}/replay:
    post:
      tags:
        - Webhooks
      summary: Replay a webhook delivery
      description: >-
        Replays a delivered or exhausted event delivery for a subscription you
        own. Sets its status to pending, resets attempt_count to 0, increments
        replay_count, and enqueues a fresh delivery of the same payload with a
        new signature timestamp. The replay keeps the same event_id, so your
        idempotency key still applies. Pending or failed deliveries are still
        being delivered or retried and cannot be replayed. Payloads are purged
        30 days after the delivery's last attempt or replay; a delivery whose
        payload was purged can no longer be replayed.
      parameters:
        - schema:
            type: string
            example: '42'
          required: true
          name: id
          in: path
        - schema:
            type: string
            example: '981'
          required: true
          name: delivery_id
          in: path
      responses:
        '202':
          description: Webhook delivery replay enqueued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookReplayResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: Malformed JSON in request body.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: AUTH_REQUIRED
                  message: Invalid or expired API key.
                  doc_url: https://docs.gojinko.com/authentication/api-keys
        '402':
          description: Payment required — organization balance exhausted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: PAYMENT_REQUIRED
                  message: >-
                    Insufficient balance — this call costs $0.0150 and your
                    organization has $0.0000 available. Top up at
                    https://dashboard.gojinko.com/developers/billing/topup
                  doc_url: https://docs.gojinko.com/concepts/errors
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: Resource not found.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '409':
          description: >-
            CONFLICT: delivery_in_progress while delivery or retries are
            pending, or payload_purged once the payload is purged, 30 days after
            the delivery's last attempt or replay. The replay reason is in code
            beside error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookReplayConflictResponse'
        '410':
          description: The resource this request names no longer exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: GONE
                  message: The resource no longer exists.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: A required field is missing or invalid.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '429':
          description: Rate limit or quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit or quota exceeded.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '502':
          description: The travel provider rejected the request, or an upstream call failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_REJECTED
                  message: The upstream service rejected the request.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '503':
          description: No travel provider can serve the request right now
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying, forwarded verbatim from the
                upstream service. Absent when the upstream named no interval.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_UNAVAILABLE
                  message: >-
                    The upstream service is temporarily unavailable. Please
                    retry later.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '504':
          description: The travel provider did not answer in time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_TIMEOUT
                  message: The upstream service did not respond in time.
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    WebhookReplayResponse:
      type: object
      properties:
        delivery:
          $ref: '#/components/schemas/WebhookDeliveryDetail'
      required:
        - delivery
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_segments_to_exchange
                - partial_exchange_unsupported
                - credential_format_invalid
                - payment_type_not_enabled
                - payment_credential_invalid
                - trip_owned_by_other_payment
                - idempotency_key_reused
                - attempt_in_progress
                - quote_expired
                - attempt_terminal
                - temporarily_unavailable
                - AUTH_REQUIRED
                - PAYMENT_REQUIRED
                - RATE_LIMITED
                - BAD_REQUEST
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - GONE
                - QUOTE_PENDING
                - QUOTE_EXPIRED
                - TRIP_EXPIRED
                - TRIP_STATE_CONFLICT
                - OFFER_EXPIRED
                - OFFER_UNAVAILABLE
                - MISSING_CUSTOMER_DETAILS
                - INVALID_PHONE_NUMBER
                - CURRENCY_UNSUPPORTED
                - HOTEL_NAME_LOW_CONFIDENCE
                - DESTINATION_LOW_CONFIDENCE
                - UPSTREAM_REJECTED
                - UPSTREAM_UNAVAILABLE
                - UPSTREAM_TIMEOUT
                - UPSTREAM_ERROR
                - INTERNAL
              description: >-
                What went wrong, as a stable machine-readable code. This is a
                closed set — branch on it rather than on `message`, which is
                prose and may change. New codes arrive in a minor version, so
                treat an unknown one as its HTTP status. A code can also stop
                being emitted: it leaves this set in a minor version, named in
                the changelog, and a branch you wrote for it goes unreached
                rather than wrong.
              example: BAD_REQUEST
            message:
              type: string
            doc_url:
              type: string
            field:
              type: string
              description: >-
                On a 400 `BAD_REQUEST` that names one refused input: the path of
                that field in your request, e.g. `selections[1].quantity` for
                the second selection of a `select_ancillaries` call. Absent when
                the refusal names no single field.
              example: selections[1].quantity
          required:
            - code
            - message
      required:
        - error
    WebhookReplayConflictResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - CONFLICT
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
        code:
          type: string
          enum:
            - delivery_in_progress
            - payload_purged
          description: The replay refusal reason. Absent for an unrecognised conflict.
      required:
        - error
    WebhookDeliveryDetail:
      type: object
      properties:
        id:
          type: number
        event_id:
          type: string
          example: evt_1234_booking.completed
        event_type:
          type: string
          example: booking.completed
        booking_ref:
          type: string
          nullable: true
          example: JNK-A7B3X9
        status:
          type: string
          description: >-
            `pending` — queued for delivery; `delivered` — delivered
            successfully; `failed` — a retry is still scheduled; `exhausted` —
            the last attempt failed and exhausted_at is set.
          example: exhausted
        attempt_count:
          type: number
          example: 1
        last_http_status:
          type: number
          nullable: true
          example: 200
        delivered_at:
          type: string
          nullable: true
        created_at:
          type: string
        last_error:
          type: string
          nullable: true
          example: 'non-2xx response: 503'
        updated_at:
          type: string
          example: '2026-10-08T11:20:40Z'
        exhausted_at:
          type: string
          nullable: true
          example: '2026-10-08T11:20:40Z'
        replay_count:
          type: integer
          example: 0
        payload:
          allOf:
            - $ref: '#/components/schemas/WebhookEventPayload'
            - nullable: true
      required:
        - last_error
        - updated_at
        - exhausted_at
        - replay_count
        - payload
      description: >-
        One event delivery to a webhook subscription, including its attempts and
        replay count. `payload` is the exact envelope sent, or null after it is
        purged 30 days after the delivery's last attempt or replay.
      example:
        id: 981
        event_id: evt_4471_booking.completed
        event_type: booking.completed
        booking_ref: JNK-8F3D21
        status: exhausted
        attempt_count: 8
        last_http_status: 503
        last_error: 'non-2xx response: 503'
        created_at: '2026-10-08T10:02:11Z'
        updated_at: '2026-10-08T11:20:40Z'
        delivered_at: null
        exhausted_at: '2026-10-08T11:20:40Z'
        replay_count: 0
        payload:
          event: booking.completed
          event_id: evt_4471_booking.completed
          booking_ref: JNK-8F3D21
          status: confirmed
          occurred_at: '2026-10-08T10:02:11Z'
          livemode: true
    WebhookEventPayload:
      type: object
      properties:
        event:
          $ref: '#/components/schemas/WebhookEvent'
        booking_ref:
          type: string
          description: Empty string when the event concerns no single booking.
          example: JNK-A0AUR2
        status:
          type: string
          description: >-
            Resulting booking state: `processing` for booking.processing,
            `confirmed` for booking.completed, `failed` for booking.failed,
            `partial` for booking.partial, `servicing.completed` for
            servicing.completed, `servicing.exchange_confirmed` for
            servicing.exchange_confirmed, `servicing.ticket_issued` for
            servicing.ticket_issued, `servicing.failed` for servicing.failed.
          example: confirmed
        occurred_at:
          type: string
          description: >-
            When the event happened, RFC 3339 UTC — NOT when it was delivered. A
            retry or a replay carries the original instant.
          example: '2026-09-02T08:55:34Z'
        event_id:
          type: string
          description: >-
            Stable per occurrence: `evt_<fulfillment_cart_id>_<event>` for a
            booking event, and
            `evt_<fulfillment_cart_id>_<event>_<occurrence_key>` for a servicing
            event, which can happen more than once on one booking (each
            cancellation has its own id). `<fulfillment_cart_id>` identifies the
            booking. Deliveries are deduplicated on it, and a retry or a replay
            repeats it — key your own idempotency off this. Treat it as opaque:
            do not parse it.
          example: evt_2097152_booking.partial
        livemode:
          type: boolean
          description: False when the event came from a sandbox booking.
          example: true
        data:
          anyOf:
            - $ref: '#/components/schemas/PartialBookingData'
            - $ref: '#/components/schemas/ServicingCompletedData'
            - $ref: '#/components/schemas/BookingFailedData'
            - $ref: '#/components/schemas/BookingProcessingData'
            - $ref: '#/components/schemas/BookingCompletedData'
            - $ref: '#/components/schemas/ServicingExchangeConfirmedData'
            - $ref: '#/components/schemas/ServicingTicketIssuedData'
            - $ref: '#/components/schemas/ServicingFailedData'
      required:
        - event
        - booking_ref
        - status
        - occurred_at
        - event_id
        - livemode
      description: >-
        The signed body POSTed to a registered webhook URL, also available in
        the delivery log until its payload is purged. Verify the signature
        against the secret returned once at registration before trusting a
        delivery. `data` is event-specific: `PartialBookingData` on
        `booking.partial`, `ServicingCompletedData` on `servicing.completed`,
        `BookingFailedData` on `booking.failed`, `BookingProcessingData` on
        `booking.processing`, `BookingCompletedData` on `booking.completed`,
        `ServicingExchangeConfirmedData` on `servicing.exchange_confirmed`,
        `ServicingTicketIssuedData` on `servicing.ticket_issued`,
        `ServicingFailedData` on `servicing.failed`. `manage_booking_url` and
        `customer_emails[]` hold traveller personal data and mirror what Jinko’s
        email shows. Email content uses display strings; empty strings, nulls,
        empty lists and empty objects are omitted from new fields. Integers and
        booleans are always sent. Existing data fields retain their original
        behaviour, including nulls.
    WebhookEvent:
      type: string
      enum:
        - booking.processing
        - booking.completed
        - booking.failed
        - booking.partial
        - servicing.completed
        - servicing.exchange_confirmed
        - servicing.ticket_issued
        - servicing.failed
      description: >-
        A booking lifecycle event. `booking.processing` — Payment is authorized
        and the booking is being confirmed with the suppliers. No supplier
        reference exists yet. `booking.completed` — Every item of the booking is
        confirmed and the payment is captured. `booking.failed` — No item of the
        booking could be confirmed. The payment hold is released and nothing is
        charged. `booking.partial` — Payment is captured but only some items
        were confirmed; the trip needs attention. A distinct event, so a handler
        written before it existed can never mistake it for a success.
        `servicing.completed` — A post-booking operation on one booked item (a
        cancellation) is complete and its money is settled. Distinct from
        booking.completed: it reports a booking being undone, not made.
        `servicing.exchange_confirmed` — The supplier confirmed an exchange of
        one booked item. For a flight, the new e-ticket number may follow in
        servicing.ticket_issued. `servicing.ticket_issued` — The new e-ticket
        number of an exchanged flight is available. `servicing.failed` — An
        exchange or a refund could not be completed. The original booking is
        unchanged unless the payload says otherwise.
    PartialBookingData:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PartialBookingItem'
          description: >-
            Every item on the trip with its own outcome, booked and failed
            alike.
        captured_total:
          allOf:
            - $ref: '#/components/schemas/WebhookMoney'
            - description: 'Deprecated: use `captured_total_money` instead.'
              deprecated: true
        captured_total_money:
          $ref: '#/components/schemas/MoneyValue'
      required:
        - items
      description: >-
        The `data` object carried by `booking.partial`. `items` lists every item
        on the trip with its own outcome, booked and failed alike.
        `captured_total_money` is what was actually charged — the completed
        items only, NOT the trip total, so reconciling against the original
        quote will not balance. `captured_total` (deprecated) is the same figure
        in major units.
    ServicingCompletedData:
      type: object
      properties:
        operation:
          type: string
          description: >-
            The operation that finished ("svc_…"), the same handle the commit
            answered and the status routes take. Absent when the cancellation
            ran on an older path that has no such handle.
          example: svc_8cd41f
        operation_kind:
          type: string
          description: What the operation did, e.g. `cancel`.
          example: cancel
        item:
          type: integer
          description: The booked item the operation acted on — `item_id` on get_booking.
          example: 9182
        state:
          type: string
          description: >-
            Always `succeeded`: the event is sent only when the operation
            succeeded.
          example: succeeded
        refund:
          allOf:
            - $ref: '#/components/schemas/MoneyValue'
            - nullable: true
        penalty:
          allOf:
            - $ref: '#/components/schemas/MoneyValue'
            - nullable: true
        booking_ref:
          type: string
          example: JNK-ABC123
        servicing_event:
          type: string
          description: The event name again, `servicing.completed`.
          example: servicing.completed
        manage_booking_url:
          $ref: '#/components/schemas/EmailManageBookingURL'
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/FlightCancellationCustomerEmail'
              - $ref: '#/components/schemas/HotelCancellationCustomerEmail'
              - $ref: '#/components/schemas/CarCancellationCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                flight-cancellation: '#/components/schemas/FlightCancellationCustomerEmail'
                hotel-cancellation: '#/components/schemas/HotelCancellationCustomerEmail'
                car-cancellation: '#/components/schemas/CarCancellationCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      required:
        - operation_kind
        - item
        - state
        - booking_ref
        - servicing_event
      description: >-
        The `data` object carried by `servicing.completed`. `refund` is what the
        payment provider settled back to the customer for this item; `penalty`
        is the supplier fee the customer agreed to. Either is `null` when the
        operation carries no such figure — which is not zero. The cancellation
        email is included when available. Its manage-booking link is not sent
        today.
    BookingFailedData:
      type: object
      properties:
        failure_reason:
          type: string
          enum:
            - price_changed
            - offer_not_available
            - booking_not_created
            - booking_cancelled_at_provider
          description: Curated failure code; omitted when unclassified.
        failure_message:
          type: string
          description: Customer sentence for price_changed and offer_not_available only.
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/BookingFailedCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                booking-failed: '#/components/schemas/BookingFailedCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      description: >-
        Booking failure details and the booking failure email. Its
        content.reason_code may differ from failure_reason. The email can be
        present even when no curated failure code exists.
    BookingProcessingData:
      type: object
      properties:
        manage_booking_url:
          $ref: '#/components/schemas/EmailManageBookingURL'
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/BookingConfirmationCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                booking-confirmation: '#/components/schemas/BookingConfirmationCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      required:
        - customer_emails
      description: >-
        Payment authorized; the booking is being confirmed with suppliers.
        Carries the booking confirmation email and its manage-booking link.
    BookingCompletedData:
      type: object
      properties:
        manage_booking_url:
          $ref: '#/components/schemas/EmailManageBookingURL'
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/FlightTicketingConfirmationCustomerEmail'
              - $ref: '#/components/schemas/HotelBookingConfirmationCustomerEmail'
              - $ref: '#/components/schemas/BookingConfirmationCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                flight-ticketing-confirmation: '#/components/schemas/FlightTicketingConfirmationCustomerEmail'
                hotel-booking-confirmation: '#/components/schemas/HotelBookingConfirmationCustomerEmail'
                booking-confirmation: '#/components/schemas/BookingConfirmationCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      description: >-
        Post-capture emails in sending order: flight, hotel, then one booking
        confirmation for ground and one for car, plus their manage-booking link.
    ServicingExchangeConfirmedData:
      type: object
      properties:
        operation:
          type: string
          description: >-
            Servicing operation handle (svc_…), sent only when the operation has
            one. Other exchange identifiers are never sent in this field.
        item:
          type: integer
          description: Original booking item serviced; omitted when unknown.
        booking_ref:
          type: string
          description: Original booking’s Jinko reference, JNK-XXXXXX.
        operation_kind:
          type: string
          enum:
            - exchange
          description: 'The servicing operation: exchange.'
        manage_booking_url:
          $ref: '#/components/schemas/EmailManageBookingURL'
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/FlightExchangeCustomerEmail'
              - $ref: '#/components/schemas/CarExchangeCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                flight-exchange: '#/components/schemas/FlightExchangeCustomerEmail'
                car-exchange: '#/components/schemas/CarExchangeCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      required:
        - operation_kind
        - customer_emails
      description: >-
        The supplier confirmed an exchange of one booked item. Carries the
        flight exchange or car exchange email. The manage-booking link is
        currently sent only for car exchanges.
    ServicingTicketIssuedData:
      type: object
      properties:
        operation:
          type: string
          description: >-
            Servicing operation handle (svc_…), sent only when the operation has
            one. Other exchange identifiers are never sent in this field.
        item:
          type: integer
          description: Original booking item serviced; omitted when unknown.
        booking_ref:
          type: string
          description: Original booking’s Jinko reference, JNK-XXXXXX.
        operation_kind:
          type: string
          enum:
            - exchange
          description: 'The servicing operation: exchange.'
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/FlightExchangeTicketNumberCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                flight-exchange-ticket-number: '#/components/schemas/FlightExchangeTicketNumberCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      required:
        - operation_kind
        - customer_emails
      description: >-
        The reissued e-ticket number is known, following a flight exchange with
        document_unobserved true. Carries the ticket-number follow-up email.
    ServicingFailedData:
      type: object
      properties:
        operation:
          type: string
          description: >-
            Servicing operation handle (svc_…), sent only when the operation has
            one. Other exchange identifiers are never sent in this field.
        item:
          type: integer
          description: Original booking item serviced; omitted when unknown.
        booking_ref:
          type: string
          description: Original booking’s Jinko reference, JNK-XXXXXX.
        operation_kind:
          type: string
          enum:
            - exchange
            - refund
            - void
          description: >-
            The operation that failed. The refund failure email covers refunds
            and voids.
        customer_emails:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ExchangeFailedCustomerEmail'
              - $ref: '#/components/schemas/RefundFailedCustomerEmail'
            discriminator:
              propertyName: template
              mapping:
                exchange-failed: '#/components/schemas/ExchangeFailedCustomerEmail'
                refund-failed: '#/components/schemas/RefundFailedCustomerEmail'
          minItems: 1
          description: >-
            One entry per email Jinko sends or would send at this moment, in
            sending order, even if email delivery is disabled. Template selects
            the content shape.
      required:
        - operation_kind
        - customer_emails
      description: >-
        An exchange, refund or void could not be completed. Carries its failure
        email. No operation handle is sent today.
    PartialBookingItem:
      type: object
      properties:
        item_id:
          type: string
          example: itm_4b91c2
        kind:
          type: string
          description: '"flight", "hotel", "car" or "ground".'
          example: flight
        status:
          type: string
          enum:
            - completed
            - failed
          description: >-
            Whether THIS item was booked. At least one of each is what makes it
            partial.
          example: completed
        booking_reference:
          type: string
          description: >-
            The supplier confirmation for this item, when available on a
            completed item. Absent on a failed item. The Jinko reference is the
            event-level `booking_ref`.
          example: XM9L2K
        captured_amount:
          allOf:
            - $ref: '#/components/schemas/WebhookMoney'
            - description: 'Deprecated: use `captured_amount_money` instead.'
              deprecated: true
        captured_amount_money:
          $ref: '#/components/schemas/MoneyValue'
      required:
        - item_id
        - kind
        - status
      description: >-
        One item of a partially fulfilled trip. `status` is this item’s own
        outcome, and at least one `completed` beside one `failed` is what makes
        the booking partial. `captured_amount_money` is what was charged for
        THIS item (`captured_amount`, deprecated, is the same figure in major
        units); a failed item was not charged and carries neither it nor a
        booking_reference.
    WebhookMoney:
      type: object
      properties:
        amount:
          type: number
          description: Major currency units.
          example: 188.65
        currency:
          type: string
          example: USD
      required:
        - amount
        - currency
      description: >-
        Money as a webhook payload carries it: `amount` in MAJOR currency units
        (188.65, not 18865) beside its ISO currency. This is the cart’s money
        shape, not the integer minor-unit form the post-booking totals use — do
        not divide it.
    MoneyValue:
      type: object
      properties:
        value:
          type: integer
          description: >-
            Integer amount in MINOR units at the ISO 4217 digits of `currency`:
            divide by 10 ** decimal_places to get the amount. Signed where the
            field says so (a price change delta).
          example: 41250
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: ISO 4217 currency code.
          example: USD
        decimal_places:
          type: integer
          description: >-
            The ISO 4217 digits of `currency` (2 for USD/EUR, 0 for JPY/KRW, 3
            for BHD/KWD), and the scale of `value`.
          example: 2
        display:
          type: string
          description: >-
            The same figure as a string ready to show: the ISO 4217 code, a
            space, then the amount at `decimal_places`, e.g. "USD 412.50". Show
            this; compute with `value`.
          example: USD 412.50
      required:
        - value
        - currency
        - decimal_places
        - display
      description: >-
        Money as every new field carries it: `value` is an INTEGER in minor
        units at the ISO 4217 digits of `currency` (`decimal_places`), and
        `display` is the same figure ready to show. All four members are always
        present; a figure the platform does not know is absent, never `{value:
        0}`. New integrations read the `*_money` fields (and `value` on the
        objects that carry it); the two-scale rule described on `Money` applies
        only to the deprecated fields.
    EmailManageBookingURL:
      type: string
      format: uri
      description: >-
        Jinko web app booking link. Personal data: its query includes the
        traveller’s last name.
    FlightCancellationCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - flight-cancellation
        content:
          $ref: '#/components/schemas/FlightCancellationEmailContent'
        calendar:
          $ref: '#/components/schemas/BookingCalendar'
      required:
        - subject
        - template
        - content
      description: >-
        Flight cancellation or void. Calendar contains the attached .ics files,
        omitted when none are attached or there is no recipient.
    HotelCancellationCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - hotel-cancellation
        content:
          $ref: '#/components/schemas/HotelCancellationEmailContent'
        calendar:
          $ref: '#/components/schemas/BookingCalendar'
      required:
        - subject
        - template
        - content
      description: >-
        Hotel cancellation. Calendar contains the attached .ics files, omitted
        when none are attached or there is no recipient.
    CarCancellationCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - car-cancellation
        content:
          $ref: '#/components/schemas/CarCancellationEmailContent'
      required:
        - subject
        - template
        - content
      description: Car rental cancellation. This email attaches no calendar.
    BookingFailedCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - booking-failed
        content:
          $ref: '#/components/schemas/BookingFailedEmailContent'
      required:
        - subject
        - template
        - content
      description: >-
        Booking could not be completed; hold released. This email attaches no
        calendar.
    BookingConfirmationCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - booking-confirmation
        content:
          $ref: '#/components/schemas/BookingConfirmationEmailContent'
      required:
        - subject
        - template
        - content
      description: >-
        Booking confirmation at authorization, or for ground/car after capture.
        This email attaches no calendar.
    FlightTicketingConfirmationCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - flight-ticketing-confirmation
        content:
          $ref: '#/components/schemas/FlightTicketingConfirmationEmailContent'
        calendar:
          $ref: '#/components/schemas/BookingCalendar'
      required:
        - subject
        - template
        - content
      description: >-
        Flight confirmation with e-tickets issued. Calendar contains the
        attached .ics files, omitted when none are attached or there is no
        recipient.
    HotelBookingConfirmationCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - hotel-booking-confirmation
        content:
          $ref: '#/components/schemas/HotelBookingConfirmationEmailContent'
        calendar:
          $ref: '#/components/schemas/BookingCalendar'
      required:
        - subject
        - template
        - content
      description: >-
        Hotel stay confirmation. Calendar contains the attached .ics files,
        omitted when none are attached or there is no recipient.
    FlightExchangeCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - flight-exchange
        content:
          $ref: '#/components/schemas/FlightExchangeEmailContent'
        calendar:
          $ref: '#/components/schemas/BookingCalendar'
      required:
        - subject
        - template
        - content
      description: >-
        Flight exchange confirmation. Calendar contains the attached .ics files,
        omitted when none are attached or there is no recipient.
    CarExchangeCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - car-exchange
        content:
          $ref: '#/components/schemas/CarExchangeEmailContent'
      required:
        - subject
        - template
        - content
      description: Car rental change confirmation. This email attaches no calendar.
    FlightExchangeTicketNumberCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - flight-exchange-ticket-number
        content:
          $ref: '#/components/schemas/FlightExchangeTicketNumberEmailContent'
      required:
        - subject
        - template
        - content
      description: >-
        New e-ticket number of an exchanged flight. This email attaches no
        calendar.
    ExchangeFailedCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - exchange-failed
        content:
          $ref: '#/components/schemas/ExchangeFailedEmailContent'
      required:
        - subject
        - template
        - content
      description: >-
        Flight exchange or car rental change could not be completed. This email
        attaches no calendar.
    RefundFailedCustomerEmail:
      type: object
      properties:
        to:
          type: string
          format: email
          description: >-
            Recipient contact address; omitted when there is none. Personal
            data.
        subject:
          type: string
          description: Subject line built from the same email data.
        template:
          type: string
          enum:
            - refund-failed
        content:
          $ref: '#/components/schemas/RefundFailedEmailContent'
      required:
        - subject
        - template
        - content
      description: >-
        Automated refund or void could not be completed. This email attaches no
        calendar.
    FlightCancellationEmailContent:
      type: object
      properties:
        pending_seat_refunds:
          type: array
          items:
            type: string
          description: Seat-refund notes. Not sent today in webhook events.
        pnr:
          type: string
          description: Jinko booking reference, JNK-XXXXXX.
        reason:
          type: string
          description: Customer’s free-text reason. Not sent today.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/EmailFlight'
          description: Cancelled itinerary; omitted after an exchange superseded it.
        outbound_flight:
          $ref: '#/components/schemas/EmailFlightHeadline'
        passengers:
          type: array
          items:
            $ref: '#/components/schemas/EmailPassenger'
          description: Passengers. Personal data.
        refund:
          $ref: '#/components/schemas/EmailRefund'
        rebook_url:
          type: string
          format: uri
          description: Rebook link. Not sent today.
      description: >-
        What the default flight cancellation email shows, including the first
        cancelled leg in its headline and the refund block. Values are display
        strings as the email shows them.
    BookingCalendar:
      type: object
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/BookingCalendarFile'
          description: >-
            The iCalendar files this booking is carried in, cancellation first
            and then invitation — the order the emails attach them in. Never
            empty: a booking with nothing to put in a calendar omits `calendar`
            altogether.
      description: >-
        The calendar entries for this booking, as iCalendar files. Absent — not
        null, and never an empty list — when the booking holds no flight and no
        hotel, and whenever the files could not be built.
    HotelCancellationEmailContent:
      type: object
      properties:
        pnr:
          type: string
          description: Jinko booking reference, JNK-XXXXXX.
        cancelled_at:
          type: string
          description: Completion date, display string.
        reason:
          type: string
          description: Customer’s free-text reason. Not sent today.
        hotel:
          $ref: '#/components/schemas/EmailHotelSummary'
        stay:
          $ref: '#/components/schemas/EmailHotelStay'
        room:
          $ref: '#/components/schemas/EmailHotelRoom'
        guests:
          type: array
          items:
            $ref: '#/components/schemas/EmailGuestName'
          description: Guests. Personal data.
        refund:
          $ref: '#/components/schemas/EmailRefund'
        rebook_url:
          type: string
          format: uri
          description: Rebook link. Not sent today.
        applied_tier_label:
          type: string
          description: Label of the cancellation tier that applied. Not sent today.
        applied_tier_sublabel:
          type: string
          description: Sublabel of the cancellation tier that applied. Not sent today.
      description: >-
        What the default hotel cancellation email shows, including property,
        room, refund and applied cancellation tier labels. Stay dates are the
        raw stored strings. Values are display strings as the email shows them.
    CarCancellationEmailContent:
      type: object
      properties:
        pnr:
          type: string
          description: Jinko booking reference, JNK-XXXXXX.
        confirmation_code:
          type: string
          description: Rental supplier’s reservation number.
        cancelled_at:
          type: string
          description: Completion date, display string.
        reason:
          type: string
          description: Customer’s free-text reason. Not sent today in webhook events.
        car:
          $ref: '#/components/schemas/EmailCar'
        drivers:
          type: array
          items:
            $ref: '#/components/schemas/EmailGuest'
          description: Drivers. Personal data.
        refund:
          $ref: '#/components/schemas/EmailRefund'
        refund_pending_review:
          type: boolean
          description: Cancelled, with the refund amount awaiting human review.
        fee_unknown:
          type: boolean
          description: No fee schedule could be established.
        non_refundable:
          type: boolean
          description: The fee consumed the whole charge; nothing is returned.
      required:
        - refund_pending_review
        - fee_unknown
        - non_refundable
      description: >-
        What the default car cancellation email shows for the cancelled rental.
        Values are display strings as the email shows them; booleans are always
        sent. Pending refund review omits refund and sets non_refundable to
        false.
    BookingFailedEmailContent:
      type: object
      properties:
        card_brand:
          type: string
          description: Brand of the card whose hold was released.
        last_four:
          type: string
          description: Last four of that card. Sensitive payment data.
        method_label:
          type: string
          description: Wallet name when there is no card identity.
        amount_formatted:
          type: string
          description: Amount held and not charged, display string.
        provider_noun:
          type: string
          description: >-
            Who refused: airline, hotel, transport operator, rental company, or
            carrier.
        product_noun:
          type: string
          description: 'What failed: flight, stay, journey, car, or booking.'
        reason_code:
          type: string
          description: >-
            Failure code selecting the email copy; specific copy exists for
            price_changed and offer_not_available. Omitted when unclassified.
            May differ from data.failure_reason.
        product_name:
          type: string
          description: Hotel name when exactly one hotel item failed.
      description: >-
        What the booking failure email shows, including the resolved provider
        and product nouns. Values are display strings as the email shows them.
    BookingConfirmationEmailContent:
      type: object
      properties:
        trip_reference:
          type: string
          description: Jinko booking reference, JNK-XXXXXX.
        items:
          type: array
          items:
            $ref: '#/components/schemas/EmailBookingItem'
          description: One entry per product this email covers.
        travelers:
          type: array
          items:
            $ref: '#/components/schemas/EmailPassenger'
          description: Travellers. Personal data.
        charges:
          $ref: '#/components/schemas/EmailChargesBreakdown'
        payment:
          $ref: '#/components/schemas/EmailPayment'
        payment_notice:
          type: string
          description: Payment notice. Not sent today.
      description: >-
        What the default booking confirmation email shows at authorization, or
        after capture for ground and car items. Values are display strings as
        the email shows them. Payment is the authorized amount before capture
        and the captured amount afterwards. Charges are not sent today.
    FlightTicketingConfirmationEmailContent:
      type: object
      properties:
        booked_seats:
          type: array
          items:
            $ref: '#/components/schemas/EmailBookedSeat'
          description: Seat outcomes over all flight items.
        booked_bags:
          type: array
          items:
            $ref: '#/components/schemas/EmailBookedBag'
          description: Bag outcomes over all flight items.
        pnr:
          type: string
          description: Jinko booking reference, not the airline PNR.
        destination_city_name:
          type: string
          description: Destination of the first leg, as in the headline.
        airline_pnr:
          type: string
          description: Airline record locator; shown when airline_locators is absent.
        airline_locators:
          type: array
          items:
            $ref: '#/components/schemas/EmailAirlineLocator'
          description: Per-carrier locators on a codeshare or interline booking.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/EmailTicketingFlight'
          description: Legs in flown order.
        fare_conditions:
          $ref: '#/components/schemas/EmailFlightFareConditions'
        passengers:
          type: array
          items:
            $ref: '#/components/schemas/EmailTicketedPassenger'
          description: Passengers with their ticket numbers. Personal data.
        payment:
          $ref: '#/components/schemas/EmailPayment'
        charges:
          $ref: '#/components/schemas/EmailChargesBreakdown'
      description: >-
        What the default flight ticketing confirmation shows: the first flight
        item, with captured payment and fare conditions. Values are display
        strings as the email shows them. Charges are not sent today.
    HotelBookingConfirmationEmailContent:
      type: object
      properties:
        pnr:
          type: string
          description: Jinko booking reference, JNK-XXXXXX.
        supplier_booking_id:
          type: string
          description: Provider confirmation number.
        hotel:
          $ref: '#/components/schemas/EmailHotel'
        stay:
          $ref: '#/components/schemas/EmailHotelStay'
        room:
          $ref: '#/components/schemas/EmailHotelRoom'
        guests:
          type: array
          items:
            $ref: '#/components/schemas/EmailGuest'
          description: Guests. Personal data.
        cancellation_tiers:
          type: array
          items:
            $ref: '#/components/schemas/EmailCancellationTier'
          description: Cancellation timeline.
        cancellation_text:
          type: string
          description: Cancellation summary, shown when there are no tiers.
        policies:
          type: array
          items:
            $ref: '#/components/schemas/EmailHotelPolicy'
          description: Policy rows, including Total paid and Payment.
      description: >-
        What the default hotel booking confirmation shows: the first hotel item,
        its property, stay and room. Values are display strings as the email
        shows them.
    FlightExchangeEmailContent:
      type: object
      properties:
        jinko_ref:
          type: string
          description: Original booking’s Jinko reference, JNK-XXXXXX.
        pnr:
          type: string
          description: Fallback for jinko_ref, a deprecated duplicate.
        previous_pnr:
          type: string
          description: Fallback for previous_airline_pnr, a duplicate.
        airline_pnr:
          type: string
          description: Airline locator after the exchange.
        previous_airline_pnr:
          type: string
          description: >-
            Airline locator before the exchange; shown only when it differs from
            airline_pnr.
        ticket_number:
          type: string
          description: E-ticket number; shown only when revalidated. Personal data.
        charges:
          $ref: '#/components/schemas/EmailChargesBreakdown'
        payment:
          $ref: '#/components/schemas/EmailPayment'
        legs:
          type: array
          items:
            $ref: '#/components/schemas/EmailFlight'
          description: New itinerary legs.
        outbound_flight:
          $ref: '#/components/schemas/EmailFlightHeadline'
        fare_conditions:
          $ref: '#/components/schemas/EmailFlightFareConditions'
        passengers:
          type: array
          items:
            $ref: '#/components/schemas/EmailPassenger'
          description: Passengers. Personal data.
        document_revalidated:
          type: boolean
          description: >-
            No new document: the held e-ticket was revalidated and keeps its
            number.
        document_unobserved:
          type: boolean
          description: >-
            Reissued, with the new e-ticket number not known yet;
            servicing.ticket_issued may follow.
      required:
        - document_revalidated
        - document_unobserved
      description: >-
        What the default flight exchange email shows: new itinerary, first-leg
        headline and new fare conditions. Values are display strings as the
        email shows them; booleans are always sent. Charges are the quoted fare
        difference, fee and total, before settlement. Payment is not sent today.
    CarExchangeEmailContent:
      type: object
      properties:
        pnr:
          type: string
          description: Original Jinko booking reference, unchanged.
        confirmation_code:
          type: string
          description: Rental supplier’s reservation number, unchanged.
        exchanged_at:
          type: string
          description: Exchange date, display string.
        car:
          $ref: '#/components/schemas/EmailCar'
        changes:
          type: array
          items:
            $ref: '#/components/schemas/EmailChangeEntry'
          description: What changed; may be absent.
        drivers:
          type: array
          items:
            $ref: '#/components/schemas/EmailGuest'
          description: Drivers. Personal data.
        settlement_charged:
          type: boolean
          description: The difference was collected.
        settlement_refunded:
          type: boolean
          description: The difference was refunded.
        refund_pending_review:
          type: boolean
          description: >-
            Changed, with the refund of the difference awaiting human review; no
            amounts.
        delta_formatted:
          type: string
          description: Absolute price difference; the flag gives the direction.
        new_total_formatted:
          type: string
          description: Rental total after the exchange.
        payment:
          $ref: '#/components/schemas/EmailCardPayment'
      required:
        - settlement_charged
        - settlement_refunded
        - refund_pending_review
      description: >-
        What the default car exchange email shows for the rental as it now
        stands. Values are display strings as the email shows them; booleans are
        always sent. When all three settlement flags are false there is no
        difference to settle. Pending review omits amounts and payment; no
        difference omits delta_formatted. Payment is not sent today.
    FlightExchangeTicketNumberEmailContent:
      type: object
      properties:
        pnr:
          type: string
          description: Original booking’s Jinko reference, JNK-XXXXXX.
        airline_pnr:
          type: string
          description: Airline locator after the exchange.
        customer_name:
          type: string
          description: 'Greeting name: the contact’s first name. Personal data.'
        ticket_numbers:
          type: array
          items:
            type: string
          description: Reissued e-ticket numbers. Personal data.
      description: >-
        What the ticket-number follow-up email shows after a flight exchange.
        Values are display strings as the email shows them.
    ExchangeFailedEmailContent:
      type: object
      properties:
        original_pnr:
          type: string
          description: Booking reference the email says is unchanged.
        original_booking_ref:
          type: string
          description: Booking reference to quote to support.
        original_outbound:
          $ref: '#/components/schemas/EmailLegacyFlight'
        original_inbound:
          $ref: '#/components/schemas/EmailLegacyFlight'
        passengers:
          type: array
          items:
            $ref: '#/components/schemas/EmailNamedPassenger'
          description: Passengers or drivers. Personal data.
        exchange_noun:
          type: string
          description: 'Operation name: Flight Exchange or Car Rental Change.'
        change_target_phrase:
          type: string
          description: 'What the traveller wanted to change: these flights or this rental.'
        traveler_label:
          type: string
          description: 'People list heading: Passengers or Drivers.'
        item_summary:
          type: string
          description: One-line recap of the unchanged booking for car exchanges.
      description: >-
        What the exchange failure email shows, including current outbound/return
        flights when applicable and resolved flight or rental nouns. Values are
        display strings as the email shows them.
    RefundFailedEmailContent:
      type: object
      properties:
        product_label:
          type: string
          description: 'Product noun: flight, hotel or booking; defaults to booking.'
        booking_reference:
          type: string
          description: Jinko booking reference, JNK-XXXXXX.
        provider_reference:
          type: string
          description: Airline PNR or hotel confirmation code.
        outbound:
          $ref: '#/components/schemas/EmailLegacyFlight'
        inbound:
          $ref: '#/components/schemas/EmailLegacyFlight'
        hotel_name:
          type: string
          description: Hotel name for hotel refunds.
        hotel_address:
          type: string
          description: Hotel address for hotel refunds.
        stay_label:
          type: string
          description: Stay dates as stored, such as 2026-06-01 – 2026-06-04.
        room_label:
          type: string
          description: Room name for hotel refunds.
        refund_amount_formatted:
          type: string
          description: Expected refund; the email says support will confirm it.
        reason:
          type: string
          description: Explanation. Not sent today.
        travelers:
          type: array
          items:
            $ref: '#/components/schemas/EmailNamedPassenger'
          description: Travellers. Personal data.
      description: >-
        What the refund failure email shows, including outbound/return flights
        for flight refunds or the hotel stay for hotel refunds. Values are
        display strings as the email shows them.
    EmailFlight:
      type: object
      properties:
        label:
          type: string
          description: 'Leg heading: Outbound, Return, or Leg N of M.'
        departure_date:
          type: string
          description: Leg departure date, display string.
        cabin_class:
          type: string
          description: Cabin class label, such as Economy.
        segments:
          type: array
          items:
            $ref: '#/components/schemas/EmailFlightSegment'
          description: Segments in flown order.
      description: >-
        One leg as booking confirmation, cancellation and exchange emails show
        it.
    EmailFlightHeadline:
      type: object
      properties:
        destination_name:
          type: string
          description: Destination city of the first leg, as in the headline.
      description: The first leg as cancellation and exchange headlines name it.
    EmailPassenger:
      type: object
      properties:
        first_name:
          type: string
          description: First name. Personal data.
        last_name:
          type: string
          description: Last name. Personal data.
        type:
          type: string
          description: Adult, Child or Infant.
        date_of_birth:
          type: string
          description: Date of birth as stored. Personal data.
        ticket_number:
          type: string
          description: >-
            E-ticket number, set where the email lists it per traveller (flight
            exchange). Personal data.
      description: >-
        A traveller on booking confirmation, flight cancellation and exchange
        emails. Personal data.
    EmailRefund:
      type: object
      properties:
        amount_formatted:
          type: string
          description: Refund settled for this item; omitted when none is settled.
        original_amount_formatted:
          type: string
          description: What was originally paid.
        card_brand:
          type: string
          description: Brand of the card refunded to.
        last_four:
          type: string
          description: Last four of that card. Sensitive payment data.
        method_label:
          type: string
          description: Wallet refunded to when there is no card identity.
        eta_label:
          type: string
          description: When the refund should land, such as within 5–10 business days.
        issued_at:
          type: string
          description: Refund issue date. Not sent today.
        fee_formatted:
          type: string
          description: Cancellation fee or penalty, display string.
        fee_label:
          type: string
          description: Fee label.
      description: Refund block of a cancellation email.
    BookingCalendarFile:
      type: object
      properties:
        method:
          type: string
          description: >-
            The iTIP method (RFC 5546) this file carries: `REQUEST` for the
            events the booking still holds, `CANCEL` for the ones it no longer
            does. One file carries exactly one method — a booking that both
            retires and confirms flights, which is what an exchange does, comes
            back as two files rather than one mixed one.
          example: REQUEST
        filename:
          type: string
          description: >-
            The name the confirmation or cancellation email attached this same
            file under.
          example: jinko-JNK-A0AUR2.ics
        content_type:
          type: string
          description: >-
            The media type, including the `method` parameter. Attach or serve
            the file under this exact value: the method parameter is what makes
            a mail client act on the file instead of storing it as a plain
            attachment.
          example: text/calendar; charset=utf-8; method=REQUEST
        content:
          type: string
          description: >-
            The iCalendar file itself. Real CRLF line endings, as iCalendar
            requires — the example escapes them only so it can be read here.
            Byte-identical to what the email carried for the current state of
            this booking.
          example: BEGIN:VCALENDAR\r\nVERSION:2.0\r\n…\r\nEND:VCALENDAR\r\n
    EmailHotelSummary:
      type: object
      properties:
        name:
          type: string
          description: Hotel name.
        image_url:
          type: string
          format: uri
          description: Main photo URL.
        address:
          $ref: '#/components/schemas/EmailHotelAddress'
      description: The property and address as the hotel cancellation email shows them.
    EmailHotelStay:
      type: object
      properties:
        check_in_date:
          type: string
          description: Check-in date, display string; raw YYYY-MM-DD on hotel cancellation.
        check_in_time:
          type: string
          description: Check-in time. Not sent today.
        check_out_date:
          type: string
          description: Check-out date, displayed in the same format as check_in_date.
        check_out_time:
          type: string
          description: Check-out time. Not sent today.
        duration_label:
          type: string
          description: Length of stay, such as 3 nights.
      description: Check-in and check-out.
    EmailHotelRoom:
      type: object
      properties:
        name:
          type: string
          description: Room name.
        count_label:
          type: string
          description: Room count, such as 1 room.
        occupancy_label:
          type: string
          description: Occupancy, such as 2 guests.
      description: The booked room.
    EmailGuestName:
      type: object
      properties:
        first_name:
          type: string
          description: First name. Personal data.
        last_name:
          type: string
          description: Last name. Personal data.
      description: A guest on the hotel cancellation email. Personal data.
    EmailCar:
      type: object
      properties:
        vehicle_name:
          type: string
          description: Vehicle, with or similar when only the class is guaranteed.
        vehicle_class:
          type: string
          description: Class line, such as Economy · Automatic · Petrol.
        supplier_name:
          type: string
          description: Rental company the driver meets.
        supplier_logo_url:
          type: string
          format: uri
          description: Rental company logo URL.
        pick_up:
          $ref: '#/components/schemas/EmailCarStop'
        drop_off:
          $ref: '#/components/schemas/EmailCarStop'
        pay_now_formatted:
          type: string
          description: Part collected at checkout; authorization-time email only.
        due_at_desk_formatted:
          type: string
          description: >-
            Amount due at the desk in its currency; never part of a charged
            total.
        extras:
          type: array
          items:
            $ref: '#/components/schemas/EmailCarExtra'
          description: Rate extras in the order chosen.
      description: A self-drive rental, including pick-up and drop-off branches and times.
    EmailGuest:
      type: object
      properties:
        first_name:
          type: string
          description: >-
            First name or an unnamed-occupant line such as 1 adult, 1 child (age
            5). Personal data.
        last_name:
          type: string
          description: >-
            Last name; a minor’s includes (age N) on hotel confirmations.
            Personal data.
        room_label:
          type: string
          description: Room the guest occupies on a multi-room stay.
      description: >-
        A hotel guest or car driver on hotel booking, car cancellation and car
        exchange emails. Personal data.
    EmailBookingItem:
      type: object
      properties:
        kind:
          type: string
          enum:
            - flight
            - hotel
            - train
            - car
          description: Product kind; train is ground transport.
        legs:
          type: array
          items:
            $ref: '#/components/schemas/EmailFlight'
          description: Flight legs in flown order.
        fare_conditions:
          $ref: '#/components/schemas/EmailFareConditions'
        booked_seats:
          type: array
          items:
            $ref: '#/components/schemas/EmailBookedSeat'
          description: Seat outcomes for a flight.
        booked_bags:
          type: array
          items:
            $ref: '#/components/schemas/EmailBookedBag'
          description: Bag outcomes for a flight.
        hotel:
          $ref: '#/components/schemas/EmailHotel'
        stay:
          $ref: '#/components/schemas/EmailHotelStay'
        room:
          $ref: '#/components/schemas/EmailHotelRoom'
        cancellation_tiers:
          type: array
          items:
            $ref: '#/components/schemas/EmailCancellationTier'
          description: Hotel cancellation timeline.
        cancellation_text:
          type: string
          description: Hotel cancellation summary, shown when there are no tiers.
        policies:
          type: array
          items:
            $ref: '#/components/schemas/EmailHotelPolicy'
          description: Hotel policy rows.
        train:
          $ref: '#/components/schemas/EmailTrain'
        car:
          $ref: '#/components/schemas/EmailCar'
      required:
        - kind
      description: >-
        One product covered by a booking confirmation email. Only fields of its
        kind are present: flight legs and fare conditions, hotel
        property/stay/room, ground journey or car rental.
    EmailChargesBreakdown:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/EmailChargeLine'
          description: Lines in display order.
        total_formatted:
          type: string
          description: Total, display string.
        total_label:
          type: string
          description: Total label, such as Total charged or Total refunded.
      description: Charges section of the email.
    EmailPayment:
      type: object
      properties:
        card_brand:
          type: string
          description: Card brand, such as Visa.
        last_four:
          type: string
          description: Card last four. Sensitive payment data.
        method_label:
          type: string
          description: Wallet name when there is no card identity, such as Stripe Link.
        status:
          type: string
          enum:
            - authorized
            - charged
          description: >-
            Which label the email shows: `authorized` ("Authorized on" or
            "Authorized · charge pending") or `charged` ("Charged on").
            `charged_at` is the date shown after that label.
        charged_at:
          type: string
          description: >-
            Date shown after the payment label ("Charged on" or "Authorized
            on"), display string.
        amount_formatted:
          type: string
          description: Amount, display string such as €188.65.
      description: >-
        Payment line of booking confirmation, flight ticketing and exchange
        emails.
    EmailBookedSeat:
      type: object
      properties:
        seat_number:
          type: string
          description: Seat, such as 14C.
        passenger_name:
          type: string
          description: Passenger the seat is for. Personal data.
        segment_label:
          type: string
          description: Segment, such as CDG → JFK.
        status:
          type: string
          description: 'Outcome code: CONFIRMED, PENDING or FAILED.'
        price_formatted:
          type: string
          description: Seat price, display string; omitted for an included seat.
        status_label:
          type: string
          description: Outcome label shown to the traveller.
      description: One seat selection and its airline outcome.
    EmailBookedBag:
      type: object
      properties:
        label:
          type: string
          description: Bag label with weight.
        quantity:
          type: integer
          minimum: 1
          description: Number of bags; always sent.
        status_label:
          type: string
          description: Outcome label shown to the traveller.
        price_formatted:
          type: string
          description: Bag price, display string.
      required:
        - quantity
      description: One purchased bag and its airline outcome.
    EmailAirlineLocator:
      type: object
      properties:
        airline_name:
          type: string
          description: Carrier name, IATA code, or Airline when unknown.
        locator:
          type: string
          description: That carrier’s record locator.
      description: One carrier’s record locator on a codeshare or interline booking.
    EmailTicketingFlight:
      type: object
      properties:
        label:
          type: string
          description: 'Leg heading: Outbound, Return, or Leg N of M.'
        departure_date:
          type: string
          description: Leg departure date, display string.
        cabin_class:
          type: string
          description: Cabin class label, such as Economy.
        segments:
          type: array
          items:
            $ref: '#/components/schemas/EmailTicketingFlightSegment'
          description: Segments in flown order.
      description: One leg as the flight ticketing confirmation shows it.
    EmailFlightFareConditions:
      type: object
      properties:
        refund_policy:
          type: string
          description: Refund policy sentence.
        change_policy:
          type: string
          description: Change policy sentence.
        carry_on_baggage:
          type: string
          description: Carry-on allowance.
        checked_baggage:
          type: string
          description: Checked baggage allowance.
      description: Fare conditions shown by flight ticketing and exchange emails.
    EmailTicketedPassenger:
      type: object
      properties:
        first_name:
          type: string
          description: First name. Personal data.
        last_name:
          type: string
          description: Last name. Personal data.
        type:
          type: string
          description: Adult, Child or Infant.
        date_of_birth:
          type: string
          description: Date of birth as stored. Personal data.
        ticket_number:
          type: string
          description: This passenger’s e-ticket number. Personal data.
      description: A passenger on the flight ticketing confirmation. Personal data.
    EmailHotel:
      type: object
      properties:
        name:
          type: string
          description: Hotel name.
        image_url:
          type: string
          format: uri
          description: Main photo URL.
        stars_label:
          type: string
          description: Rating as glyphs, such as ★★★★.
        lodging_type:
          type: string
          description: Accommodation type, such as Aparthotel.
        address:
          $ref: '#/components/schemas/EmailHotelAddress'
      description: >-
        The property and address as booking confirmation and hotel confirmation
        emails show them.
    EmailCancellationTier:
      type: object
      properties:
        label:
          type: string
          description: Tier label, such as Free cancellation.
        deadline_label:
          type: string
          description: Tier deadline, display string.
        sublabel:
          type: string
          description: Explanatory sentence under the label.
      description: One row of the hotel cancellation timeline.
    EmailHotelPolicy:
      type: object
      properties:
        title:
          type: string
          description: Row title.
        body:
          type: string
          description: Row text.
      description: >-
        One titled policy row: board, rate information, taxes paid at the hotel,
        total paid, payment or room cancellation.
    EmailChangeEntry:
      type: object
      properties:
        label:
          type: string
          description: 'What changed: Vehicle, Pick-up, Drop-off.'
        before:
          type: string
          description: Value before, display string.
        after:
          type: string
          description: Value after, display string.
      description: One before/after row of a car exchange.
    EmailCardPayment:
      type: object
      properties:
        card_brand:
          type: string
          description: Card brand.
        last_four:
          type: string
          description: Card last four. Sensitive payment data.
      description: Card line of a car exchange email.
    EmailLegacyFlight:
      type: object
      properties:
        origin_name:
          type: string
          description: Origin city name.
        destination_name:
          type: string
          description: Destination city name.
        departure_date:
          type: string
          description: Departure date, display string.
        departure_time:
          type: string
          description: Departure time, 24-hour display string.
        arrival_time:
          type: string
          description: Arrival time, 24-hour display string.
        duration_formatted:
          type: string
          description: Duration, or 0h 00m when unknown.
        airline_name:
          type: string
          description: Airline name.
        flight_number:
          type: string
          description: First segment’s flight number.
        cabin_class:
          type: string
          description: Cabin class label.
      description: Single-journey card of an exchange or refund failure email.
    EmailNamedPassenger:
      type: object
      properties:
        first_name:
          type: string
          description: First name. Personal data.
        last_name:
          type: string
          description: Last name. Personal data.
        type:
          type: string
          description: Adult, Child or Infant.
      description: A traveller on an exchange or refund failure email. Personal data.
    EmailFlightSegment:
      type: object
      properties:
        departure_city_name:
          type: string
          description: Departure city, shown in the layover row.
        departure_airport_name:
          type: string
          description: Departure airport name.
        departure_iata:
          type: string
          description: Departure airport IATA code.
        departure_time:
          type: string
          description: Departure local time, display string.
        arrival_airport_name:
          type: string
          description: Arrival airport name.
        arrival_iata:
          type: string
          description: Arrival airport IATA code.
        arrival_time:
          type: string
          description: Arrival local time, display string.
        duration_formatted:
          type: string
          description: Segment duration, such as 2h 15m.
        flight_number:
          type: string
          description: Marketing flight number.
        aircraft:
          type: string
          description: Aircraft type.
        airline_name:
          type: string
          description: Marketing airline name.
        airline_logo_url:
          type: string
          format: uri
          description: Marketing airline logo URL.
        layover_before:
          type: string
          description: Layover before this segment; omitted on the first.
      description: >-
        One flown segment as booking confirmation, cancellation and exchange
        emails show it.
    EmailHotelAddress:
      type: object
      properties:
        formatted:
          type: string
          description: Address on one line.
        phone:
          type: string
          description: Property phone number.
        map_url:
          type: string
          format: uri
          description: Map link for the property.
      description: Hotel address block.
    EmailCarStop:
      type: object
      properties:
        branch_name:
          type: string
          description: Rental branch.
        address:
          type: string
          description: Branch address with city.
        phone:
          type: string
          description: Branch phone.
        date_time_label:
          type: string
          description: Branch-local date and time with the zone in the string.
      description: One end of a rental.
    EmailCarExtra:
      type: object
      properties:
        label:
          type: string
          description: Extra with quantity, such as Infant seat × 2.
        detail:
          type: string
          description: Money line, such as €30.00 · paid now; omitted on cancellation.
      description: One rate extra.
    EmailFareConditions:
      type: object
      properties:
        refund_policy:
          type: string
          description: Refund policy sentence.
        change_policy:
          type: string
          description: Change policy sentence.
        carry_on_baggage:
          type: string
          description: Carry-on allowance.
        checked_baggage:
          type: string
          description: Checked baggage allowance.
        exchange_policy:
          type: string
          description: Exchangeable or Non-exchangeable for ground transport.
        seat_reservation:
          type: string
          description: Ground seat reservation policy. Not sent today.
        bike_policy:
          type: string
          description: Ground bike policy. Not sent today.
        pet_policy:
          type: string
          description: Ground pet policy. Not sent today.
      description: >-
        Fare conditions on a booking confirmation item: flight fields on a
        flight, ground fields on a train.
    EmailTrain:
      type: object
      properties:
        departure_date_label:
          type: string
          description: Journey date, display string.
        travel_class:
          type: string
          description: Fare or class label.
        segments:
          type: array
          items:
            $ref: '#/components/schemas/EmailTrainSegment'
          description: Segments of the journey.
      description: 'A ground transport journey: rail, coach or ferry.'
    EmailChargeLine:
      type: object
      properties:
        label:
          type: string
          description: Line label, such as Fare difference.
        amount_formatted:
          type: string
          description: Line amount, display string.
      description: One charges line.
    EmailTicketingFlightSegment:
      type: object
      properties:
        departure_city_name:
          type: string
          description: Departure city, shown in the layover row.
        departure_airport_name:
          type: string
          description: Departure airport name.
        departure_iata:
          type: string
          description: Departure airport IATA code.
        departure_time:
          type: string
          description: Departure local time, display string.
        arrival_airport_name:
          type: string
          description: Arrival airport name.
        arrival_iata:
          type: string
          description: Arrival airport IATA code.
        arrival_time:
          type: string
          description: Arrival local time, display string.
        duration_formatted:
          type: string
          description: Segment duration, such as 2h 15m.
        flight_number:
          type: string
          description: Marketing flight number.
        aircraft:
          type: string
          description: Aircraft type.
        airline_name:
          type: string
          description: Marketing airline name.
        airline_logo_url:
          type: string
          format: uri
          description: Marketing airline logo URL.
        layover_before:
          type: string
          description: Layover before this segment; omitted on the first.
        operating_airline_name:
          type: string
          description: >-
            Operating carrier of a codeshare segment; omitted when the marketing
            carrier flies it.
      description: >-
        One flown segment on the ticketing confirmation, including the operating
        carrier.
    EmailTrainSegment:
      type: object
      properties:
        operator_name:
          type: string
          description: Carrier or operator.
        train_type:
          type: string
          description: Transport mode.
        train_number:
          type: string
          description: Service number. Not sent today.
        origin_station_name:
          type: string
          description: Departure station.
        origin_city_name:
          type: string
          description: Departure city. Not sent today.
        destination_station_name:
          type: string
          description: Arrival station.
        destination_city_name:
          type: string
          description: Arrival city. Not sent today.
        departure_time_label:
          type: string
          description: Departure time, display string.
        arrival_time_label:
          type: string
          description: Arrival time, display string.
        duration_formatted:
          type: string
          description: Duration, display string; authorization-time email only.
      description: One ground transport segment.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.