> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# `PATCH /api/v1/orders/:id/cancel`

> `PATCH /api/v1/orders/:id/cancel`

### Path parameters

<ParamField path="id" type="string" required>
  Order ID (UUID)
</ParamField>

### Responses

<ResponseField name="200" type="OrderResponse">
  Order cancelled
</ResponseField>

<ResponseField name="400" type="ErrorBody">
  Order cannot be cancelled
</ResponseField>

<ResponseField name="404" type="ErrorBody">
  Order not found
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request PATCH \
    --url 'https://api.stateset.com/api/v1/orders/{id}/cancel' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "created_at": "2026-07-24T12:00:00Z",
    "currency": "string",
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "fulfillment_status": "string",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "items": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "name": "string",
        "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "quantity": 1,
        "sku": "string",
        "total": "string",
        "unit_price": "string"
      }
    ],
    "order_number": "string",
    "payment_status": "string",
    "status": "string",
    "total_amount": "string",
    "updated_at": "2026-07-24T12:00:00Z"
  }
  ```
</ResponseExample>
