Cancel Order / Booking

DELETE {{baseUrl}}/orders/:order_reference

This API is called to (partial) cancel an order/ booking. In case of a full cancellation, you are no longer able to amend the order. Otherwise, the updated order will be returned.

Again, to avoid mismatches and validate a correct implementation, make sure you compare the returned order_pricing.price_total.

This API can only be called for bookings with product_cancellation_allowed:true. In case your order contains non-cancellable products, a full cancellation will result in an error. You will still be able to do partial-cancellations for those bookings with cancellable products.

Request Params

KeyDatatypeRequiredDescription
booking_referencestring[FILTER] In case the booking_reference is provided, a partial cancellation will be made. Only the specified booking(s) will be cancelled.
product_type_transaction_idnumber[FILTER] (ADVANCED) In case the product_type_transaction_id is provided, a partial cancellation will be made. Only the specified transaction(s) will be cancelled.
cancellation_reasonstring[INFO] Optional reason for this cancellation.
payment_refundboolean[CONFIG] Whether the guest payment should be refunded. In case the order is partially cancelled, the amount will be partially refunded as well. If multiple payments are made (split-payment) then all linked payments will be refunded. This value will be ignored in case no payment is made.

For more flexible refunds you could use the Cancel / Refund Payment API instead. |

RESPONSES

status: OK

{"api_version":"3.4.0","data":{"kind":"location","order":{"order_bookings":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_channel":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"order_created":"1950-04-19T12:44:51.849Z","order_created_email":"cashier@prioticket.com","order_created_name":"Demo Cashier","order_distributor_id":"501","order_distributor_name":"Demo Distributor","order_external_reference":"EXTERNALREF123","order_language":"en","order_modified":"2013-01-10T02:21:30.404Z","order_platform_id":"1","order_platform_name":"Platform Name","order_pricing":{"price_variations":[{"variation_label":"Peak Hour","variation_amount":"2.50","variation_type":"PRODUCT_DYNAMIC"}],"eab47":81802886.5524266,"ullamcof1":"velit consequat aliqua pariatur in"},"order_reference":"ORDRREF123456","order_reseller_id":"1300","order_reseller_name":"Demo reseller","order_status":"ORDER_CONFIRMED","order_version":1,"order_view_type":"DISTRIBUTOR","order_partner_id":"4534543543","order_partner_name":"Partner Name","order_settlement_type":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"order_contacts":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_promocodes":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_payments":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_invoices":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_options":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"order_flags":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_custom_fields":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_notes":[{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}],"order_activity_url":"https://activity.prioticket.com/orders/ORDRREF123456","order_customer_url":"https://customer.prioticket.com/orders/ORDRREF123456","order_confirmed":"2012-01-17T05:13:54.503Z","order_cancellation_date_time":"2014-03-20T12:49:04.405Z"}}}