> ## 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.

# Cancel a carts

> Cancel a carts

### Path parameters

<ParamField path="id" type="string" required>
  Cart ID
</ParamField>

### Responses

<ResponseField name="200" type="CartResponse" />

<ResponseField name="409" type="ErrorBody" />

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "cart_number": "string",
    "created_at": "string",
    "currency": "string",
    "customer_email": null,
    "customer_id": null,
    "discount_amount": "string",
    "grand_total": "string",
    "id": "string",
    "items": [
      {
        "discount_amount": "string",
        "id": "string",
        "name": "string",
        "product_id": null,
        "quantity": 1,
        "sku": "string",
        "total": "string",
        "unit_price": "string"
      }
    ],
    "order_id": null,
    "order_number": null,
    "payment_method": null,
    "shipping_amount": "string",
    "shipping_method": null,
    "status": "string",
    "subtotal": "string",
    "tax_amount": "string"
  }
  ```
</ResponseExample>
