Skip to main content
POST
https://api.zenflow.com.ar
/
api
/
v1
/
orders
/
{id}
/
cancel
Cancel Order
curl --request POST \
  --url https://api.zenflow.com.ar/api/v1/orders/{id}/cancel \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "order_tenant_id": "<string>"
}
'

Cancel Order

Cancel an existing order.
Requires write:orders scope.

Request

POST /api/v1/orders/{id}/cancel

Path Parameters

id
string
required
The order ID or order_tenant_id

Body Parameters

order_tenant_id
string
Alternative: your external order ID

Example

curl -X POST "https://api.zenflow.com.ar/api/v1/orders/ORD-001/cancel" \
  -H "X-API-Key: zenflow_live_your_key" \
  -H "Content-Type: application/json"

Response

{
  "success": true,
  "data": {
    "message": "Order cancelled successfully",
    "order_id": "ORD-001"
  }
}

Error Responses

404 Not Found

{
  "success": false,
  "error": {
    "code": "not_found",
    "message": "Order not found"
  }
}

400 Cannot Cancel

{
  "success": false,
  "error": {
    "code": "cancel_error",
    "message": "Cannot cancel order that is already completed"
  }
}