This request can be used to cancel a confirmed booking or to unaction an initiated booking.
/api/lineitem/reference/{LINE_ITEM_REFERENCE}/policy
LINE_ITEM_REFERENCE: string LINE_ITEM_ID-BOOKING_REFERENCE
curl -X GET "{HOSTNAME}/api/lineitem/reference/{LINE_ITEM_REFERENCE}/policy" -H "accept: application/json"
200
cancellable: bool // Is the line item cancellable?
code: null|string // Reason why the line item is not cancellable online
msg: string // Message for the user
cancellation_url: null|string // The link to cancel the lineitem online
200 - INValid for cancellation
{
"cancellable": false,
"code": "FLOW#WithPenalties",
"msg": "Unfortunately this booking cannot be cancelled online. Please contact S24 for assistance.",
“cancellation_url”: null
}
200 - Valid for cancellation
{
"cancellable": true,
"code": null,
"msg": "LineItem fully cancellable",
“cancellation_url”: “URL”
}
400 - If the lineitem in input is not valid
{
"error": “Line item in input is not valid”
}
500 - Fatal Error
{
“error”: “Something went terribly wrong”
}
This request can be used to cancel a confirmed booking or to unaction an initiated booking.
/api/lineitem/reference/{lineItemReferenceId}/cancel/nonrefundable
/api/lineitem/reference/{lineItemReferenceId}/cancel/nopayments
/api/lineitem/reference/{lineItemReferenceId}/cancel/nopenaltywithrefund
/api/lineitem/reference/{lineItemReferenceId}/cancel/penaltywithcharge
/api/lineitem/reference/{lineItemReferenceId}/cancel/penaltynocharge
LINE_ITEM_REFERENCE: string LINE_ITEM_ID-BOOKING_REFERENCE
curl -X POST "{ENDPOINT}" -H "accept: application/json"
200 - If the cancellation process goes as expected
{
"cancelled": true,
"refunded": true,
"msg": "Your booking has been cancelled and fully refunded",
"error": null
}
200 - If the cancellation process goes as expected but without refund
{
"cancelled": true,
"refunded": false,
"msg": "Your booking has been cancelled, but we have not been able to refund your account as you have not paid by credit card. Please contact S24.",
"error": "Transaction refund failed"
}
400 - If the param lineitem reference is not a valid
{
"error": “Line item in input is not valid”
}
403 - If the cancellation is not valid for the lineitem reference in the request
{
"error": “"Line item with reference 'XXX' is not valid for this cancellation type”
}
500 - Fatal Error
{
“error”: “Something went terribly wrong”
}