Skip to main content
POST
Cancel Order
This endpoint cancels an order regardless of its current status and handles all necessary cleanup including customer notifications, refunds, inventory adjustments, and delivery platform communications.
Canceling orders frequently can negatively impact your store’s rating on delivery platforms. Use this endpoint judiciously and consider alternative solutions when possible.

Request Body

string
required
The unique identifier of the store canceling the order
string
required
The unique identifier of the order to cancel
string
required
Reason for cancellation. Must be one of the predefined reason codes.
string
Additional details about the cancellation reason
string
required
Employee ID who initiated the cancellation

Cancellation Reason Codes

Store-Related Reasons:
  • OUT_OF_STOCK - Required items are not available
  • KITCHEN_CLOSED - Kitchen is closed or unable to prepare
  • EQUIPMENT_FAILURE - Equipment malfunction preventing preparation
  • STAFF_SHORTAGE - Insufficient staff to fulfill order
  • STORE_EMERGENCY - Emergency situation at store
Customer-Related Reasons:
  • CUSTOMER_REQUEST - Customer requested cancellation
  • PAYMENT_ISSUE - Payment could not be processed
  • DELIVERY_ADDRESS_ISSUE - Delivery address problems
Platform-Related Reasons:
  • PLATFORM_ERROR - Technical issue with delivery platform
  • DUPLICATE_ORDER - Order was duplicated in system
  • FRAUD_SUSPECTED - Suspected fraudulent order
Other Reasons:
  • WEATHER_RELATED - Severe weather preventing fulfillment
  • OTHER - Other reason (requires description)

Response

boolean
Indicates whether the order was successfully canceled
string
Confirmation message or error details
string
The canceled order’s unique identifier
string
Unique identifier for the cancellation record
string
Amount that will be refunded to customer
string
Status of the refund process
boolean
Whether the delivery platform was successfully notified
boolean
Whether the customer was successfully notified

Request Example

Response Example

When an order is canceled, the following automated processes occur:
  1. Order Status Update: Status changed to “canceled”
  2. Inventory Release: Any reserved inventory is released back to available stock
  3. Refund Initiation: Automatic refund processing begins
  4. Platform Notification: Delivery platform is notified with reason
  5. Customer Notification: Customer receives cancellation notification
  6. Analytics Update: Cancellation metrics are updated for reporting
  7. Audit Trail: Complete cancellation record is created for compliance
Refund Timing: Refunds typically process within 3-5 business days, but the exact timing depends on the customer’s payment method and the delivery platform’s policies.
Best Practice: When possible, contact the customer directly before canceling to explore alternatives or explain the situation. This can help maintain customer satisfaction even in difficult situations.

Error Responses

Order Cannot Be Canceled
Invalid Reason Code
Platform Communication Failed
Manual Follow-up: If platform_notified is false, you may need to manually notify the delivery platform to avoid fulfillment conflicts.