> ## Documentation Index
> Fetch the complete documentation index at: https://developers.e-cross.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel order

> Cancel an order

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://order.api.e-cross.tech/ext/orders/ACME-ECOM-TEST-003/cancel' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
      "cancelDate": "2025-01-05T20:00:00Z",
      "cancelReason": "Missing inventory to fulfill the order"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "orderId": "ACME-ECOM-TEST-003",
    "status": "CANCELLED",
    "cancelDate": "2025-01-05T20:00:00Z",
    "statusHistory": [
      {
        "eventData": {
          "cancelReason": "Missing inventory to fulfill the order"
        },
        "receivedDate": "2025-01-05T20:01:00Z",
        "eventDate": "2025-01-05T20:00:00Z",
        "status": "CANCELLED"
      }
    ]
  }
  ```
</ResponseExample>

### Path Parameters

<ParamField path="orderId" type="string" required>
  The e-CROSS order ID of the order to cancel.
</ParamField>

### Request Parameters

<ParamField body="cancelDate" type="string" required>
  The date and time of the cancellation event, in ISO 8601 format (e.g., `2025-01-05T20:00:00Z`).
</ParamField>

<ParamField body="cancelReason" type="string">
  Human-readable reason for the cancellation. Examples:

  * "Missing inventory to fulfill the order"
  * "Customer requested cancellation"
  * "Product discontinued"
</ParamField>

### Response Fields

The response returns the complete order object with updated status. Refer to the [Get order by ID](/api-reference/orders/get-order-by-id) endpoint for the response fields.
