Post-booking

DEPRECATED — use /v1/hotel_cancel_preview and /v1/hotel_cancel_commit. Cancel a hotel booking and get a refund when eligible. Preview and commit in one call — POST /v1/hotel_cancel_preview plus /v1/hotel_cancel_commit is the two-step form, which shows the customer the refund before anything is cancelled. `refund_amount` is what the CUSTOMER gets back; all amounts are customer-facing only. Returning the money outlives this call: poll the `operation` handle with POST /v1/hotel_cancel_status. Every call here needs API authentication (an API key or a Bearer token); this is about which mode identifies the booking. Call get_booking first, then send booking_ref and the selected booked_item_id. Guests must send last_name; an owning credential may omit it. The deprecated `provider`, `order_id`, `provider_reference` and `provider_booking_id` are accepted until 2027-04-30 where the request declares them; a request that sends one is answered with `Deprecation` and `Sunset` headers.

Call get_booking first. Use booking_ref and the selected booked_item_id for every servicing action. last_name is required for guest lookup; an owning credential may omit it. The deprecated provider, order_id, provider_reference and provider_booking_id are accepted until 2027-04-30 where the request declares them; a request that sends one is answered with Deprecation and Sunset headers. A 409 item_selection_required returns safe items to choose from.

post/v1/hotel_cancel

Request

  • Base URL
    https://api.gojinko.com
  • URL
    https://api.gojinko.com/v1/hotel_cancel
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Request body

booking_refstring

Jinko booking reference. Call get_booking first, then select its booked_item_id for servicing.

booked_item_idstring

The booked item, from get_booking items[].booked_item_id. Preserved across exchanges. Omit only when the booking has exactly one item of the requested domain; otherwise a 409 returns items to choose from.

last_namestring

Required for guest lookup. A credential that owns the booking may omit it; ownership is checked by the platform.

provider_booking_idstring

Deprecated: name the booking with booking_ref and booked_item_id from get_booking. Names the booking instead of booking_ref and last_name, never beside it, and needs a credential that owns the booking. Accepted until 2027-04-30; a request that sends it is answered with Deprecation and Sunset headers.

providerstring

Deprecated: omit it. The platform uses the supplier recorded with the booking. Accepted until 2027-04-30; a request that sends it is answered with Deprecation and Sunset headers.

Example request

{
  "booking_ref": "JNK-A0AUR2",
  "booked_item_id": "itm_aaaaaaaaaaaaafhuxsdxpbzrbfz5hm3a",
  "last_name": "Doe",
  "intent": {
    "user_intent": "find a cheap flight to Tokyo"
  }
}

Response

Cancel a hotel booking and get a refund when eligible. Preview and commit in one call — POST /v1/hotel_cancel_preview plus /v1/hotel_cancel_commit is the two-step form, which shows the customer the refund before anything is cancelled. refund_amount is what the CUSTOMER gets back; all amounts are customer-facing only. Returning the money outlives this call: poll the operation handle with POST /v1/hotel_cancel_status. Every call here needs API authentication (an API key or a Bearer token); this is about which mode identifies the booking. Call get_booking first, then send booking_ref and the selected booked_item_id. Guests must send last_name; an owning credential may omit it. The deprecated provider, order_id, provider_reference and provider_booking_id are accepted until 2027-04-30 where the request declares them; a request that sends one is answered with Deprecation and Sunset headers.

booking_refstring
booking_referencestring

Deprecated: use booking_ref instead. Same value.

confirmation_numberstring

Deprecated: read the item’s supplier_references on POST /v1/get_booking, which names who issued each reference. Customer-facing hotel confirmation number, when supplied by the hotel.

statusstring
operationstring

The cancellation this call started ("svc_…"). Cancelling the booking at the supplier and returning the money are separate steps, so this call answering does not mean both finished — poll the handle with POST /v1/hotel_cancel_status until state is terminal.

state'in_progress' | 'attention_required' | 'succeeded' | 'failed'

Where the cancellation has got to. in_progress — running; keep polling. attention_required — stalled on something a person at Jinko has to resolve (reason names it); keep polling, and do not report it to the customer as a failure, because the booking may already be cancelled at the supplier. succeeded and failed are terminal: the supplier outcome and the money are both settled and nothing further will change.

cancelled_atstring
idempotentboolean

Example response

{
  "booking_ref": "JNK-A0AUR2",
  "booking_reference": "JNK-A0AUR2",
  "status": "cancelled",
  "operation": "svc_01J7ZR5Q2KME8V4T",
  "refund_amount": {
    "value": 41250,
    "currency": "USD",
    "decimal_places": 2,
    "display": "USD 412.50"
  },
  "customer_refund_amount": {
    "value": 41250,
    "currency": "USD",
    "decimal_places": 2,
    "display": "USD 412.50"
  },
  "penalty_amount": {
    "value": 41250,
    "currency": "USD",
    "decimal_places": 2,
    "display": "USD 412.50"
  },
  "cancelled_at": "2026-06-01T12:34:56Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.