Cancel order
Cancel one of the user's orders under its cancellation terms, when its cancel.available is true.
Cancel one of the user's orders by orderId under its cancellation terms, when its cancel.available is true: the hotel booking is cancelled and cancel.refund, what was paid less cancel.penalty, is refunded. Before you call cancel_order, show the user the order's stay (hotel, dates), cancel.penalty and cancel.refund (amount and currency), then end your reply by asking them to confirm the cancellation, and wait for a clear yes. Pass maximumPenalty as the number in cancel.penalty.amount ("120.00" → 120). Never state a refund the order did not return. If the penalty is now higher than maximumPenalty, the answer is cancellation_changed and nothing changes: read the order again and ask the user again. Answers the order: status cancelling, then cancelled once the hotel cancels and the refund is issued; poll get_order. If the hotel refuses, the order goes back to confirmed with cancel.reason refused. Calling it again for the same order answers the order as it is.
cancel_order · Cancels an order · CLI: fortrip orders cancel
Input
orderIdstringrequiredThe orderId of the order to cancel.matches ^ord_[0-9A-Za-z]{20}$
maximumPenaltynumberrequiredThe penalty the user agreed to, in the order's currency. Pass maximumPenalty as the number in cancel.penalty.amount ("120.00" → 120).≥ 0
Output
structuredContent is the Order (cancel) object. content[0] is the answer as compact text. Errors are described in the overview.