Skip to navigation

Cancel Booking

View as Markdown

Cancel Booking

Cancels a booking previously pushed through the Booking APIs. The booking status becomes CANCELLED and the linked trip leg is released, so a new booking can be pushed for it. Only bookings created through these APIs can be cancelled (403 otherwise); cancelling an already cancelled booking returns 409. Optional refundAmount is saved on the booking; it must be between 0 and the booking amount (400 otherwise). If only cancellationCharges is sent, the refund is calculated as booking amount − charges. Optional cancellationCharges and creditNote are stored on the booking and returned under fields (refund_amount, cancellation_charges, credit_note_*); creditNote.creditNotePdf is attached under files as Credit Note. Negative amounts are rejected with 409.

Request Parameters

ParamRequiredDescription
transIdMandatoryYour booking reference used at creation.
remarksOptionalReason for cancellation.
refundAmountOptionalAmount refunded for the cancellation. Saved on the booking. Must be between 0 and the booking amount. If omitted and cancellationCharges is sent, it is calculated as booking amount − cancellationCharges.
cancellationChargesOptionalCancellation charges deducted by the vendor / airline. Cannot be negative.
creditNoteOptionalCredit note details for the cancellation. Fields: creditNoteNo, creditNoteDate, originalInvoiceNo, originalInvoiceDate, vendorGstin, customerGstin, hsn, reason, taxableAmount, cgst, sgst, igst, totalTax, totalAmount, creditNotePdf.

Headers

DICE-APP-IDstringOptional
Company Code of client
X-CLIENT-IDstringOptional
API Client ID
X-CLIENT-SECRETstringOptional
API Client Secret

Request

Cancel Booking request body.
transIdstringRequired
Your booking reference used at creation.
remarksstringOptional
Reason for cancellation.
refundAmountdoubleOptional

Amount refunded for the cancellation. Saved on the booking. Must be between 0 and the booking amount. If omitted and cancellationCharges is sent, it is calculated as booking amount − cancellationCharges.

cancellationChargesdoubleOptional

Cancellation charges deducted by the vendor / airline. Cannot be negative.

creditNoteobjectOptional
Credit note details for the cancellation.

Response

OK
successbooleanOptional

Always true on HTTP 200.

transIdstringOptional
Your booking reference.
transactionIdlongOptional
Internal Dice transaction id.
serviceenumOptional
Booking type.
Allowed values:
amountdoubleOptional
Booking amount.
refundAmountdoubleOptional

Refund amount saved on the booking (0.0 when no refund was recorded).

currencystringOptional
Currency.
bookingStatusenumOptional
Booking status.
Allowed values:
expenseStatuslongOptional

Expense status code: 3 = booked / active, 7 = cancelled.

bookingDatelongOptional

Booking date. Epoch time in milliseconds (UTC).

tripIdstringOptional
Attached trip.
tripItineraryIdstringOptional
Attached itinerary leg.
fieldsmap from strings to stringsOptional

All captured booking attributes as key/value strings (PNR, airline, invoice fields, cancellation info, …).

fileslist of objectsOptional

Ticket / invoice attachments.

ticketobjectOptional

Structured ticket (flight / hotel / bus) as stored in Dice. Shape depends on service.