POST
{orders_api_base_url}
/
orders
/
cancel
/
{
  "success": true,
  "message": "<string>",
  "order_id": "<string>",
  "cancellation_id": "<string>",
  "refund_amount": "<string>",
  "refund_status": "<string>",
  "platform_notified": true,
  "customer_notified": true
}
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

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

Cancellation Reason Codes

Response

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

Request Example

{
  "store_id": "449235c1-3d04-4519-998b-40d2a621e5e0",
  "order_id": "35d18f08-6d54-421d-9476-8cef629111bc",
  "reason": "OUT_OF_STOCK",
  "description": "Main ingredient not available due to supply chain issue",
  "initiated_by": "870a05c1-bbbf-48ab-a757-e28ae0a2b2a8"
}

Response Example

{
  "success": true,
  "message": "Order successfully canceled and all parties notified",
  "order_id": "35d18f08-6d54-421d-9476-8cef629111bc",
  "cancellation_id": "c4f2d9e8-1a3b-4c5d-8e9f-2a3b4c5d6e7f",
  "refund_amount": "41.02",
  "refund_status": "processing",
  "platform_notified": true,
  "customer_notified": true
}
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

Manual Follow-up: If platform_notified is false, you may need to manually notify the delivery platform to avoid fulfillment conflicts.