Delete Order
Permanently deletes an order.
HTTP Request
- URL:
/orders/{id} - Method:
DELETE - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_WRITE_ORDER
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the order to delete. |
cURL Example
curl --location --request DELETE '<BASE_URL>/orders/664f2310d5775459152d6dd8' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The order was deleted. If no order exists with this ID, the response has
"success": false. - 400 Bad Request: The access token is missing or invalid, or the order ID is not valid.
Sample JSON Response
{
"success": true,
"message": "Order deleted successfully"
}
Response Details
Result Data
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the order was deleted. |
message | String | Result message. |
Notes
- Deleting an order cannot be undone. To keep the order on record, set its status to
cancelledwith Update Order instead. - Payments and invoices linked to the order are kept.