Skip to main content

Cancel Booking Item Endpoint

Cancels a single product inside a booking, leaving other products in the same booking untouched.

  • Endpoint: /api/v1/bookings/{booking_number}/items/{product_booking_item_id}/cancel
  • Method: POST

:::warning Flights are not cancelled here This endpoint currently handles Tour (pd8) and KKday (pd4) items only. Sending a flight item returns:

{
"result": 0,
"message": "Cancellation is only available for tour booking items."
}

To cancel or refund a flight, use the flight endpoints instead:

SituationEndpoint
Booking created but ticket not yet issuedPOST /api/v1/flights/bookings/cancel
Ticket already issuedPOST /api/v1/flights/bookings/refund

This page documents the shared route so mixed carts are covered — a cart containing a flight and a tour can cancel the tour leg here, but not the flight leg. :::

Headers

HeaderValueRequiredDescription
Partner-Access-TokenBase64 StringYesYour encrypted AES-256 time-sensitive token.
AuthorizationBearer <token>YesCustomer access token from Login.
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
booking_numberStringYesThe booking number.
product_booking_item_idIntegerYesThe id of the item inside the booking's items array.

Payload Parameters

ParameterTypeRequiredDescription
cancel_typeStringConditionalRequired for KKday (pd4) items. See the table below.
cancel_descStringOptionalFree-text reason.

Cancel types

ValueDescription
MC001Trip changes or cancellations
MC002Duplicate orders
MC003Price related factors
MC004Personal reasons
MC005Transportation related factors
MC006Unable to contact vendor/shop
MC999Other reasons

Eligibility

The item is only cancellable when all of the following hold:

  • The booking belongs to the authenticated customer and your partner account.
  • The item's payment_status is paid.
  • The item's booking_status is completed.
  • The item's product type is pd8 (Tour) or pd4 (KKday).

Otherwise the request fails with Booking item not found or does not belong to the user or booking has cancelled.

Sample Payload

{
"cancel_type": "MC004",
"cancel_desc": "Traveller changed plans"
}

Sample Response

{
"result": 1,
"message": "success",
"data": {
"message": "Booking item cancelled successfully. Please waiting for the refund process."
}
}

Errors

HTTPMessageCause
401Missing or invalid Authorization bearer token.
200Booking item not found or does not belong to the user or booking has cancelled.Item not found, not paid, not completed, or not owned by this customer/partner.
200Cancel type is required and must be valid for booking item cancellation.cancel_type missing or invalid on a KKday item.
200Cancellation is only available for tour booking items.The item is a flight or another unsupported product type.