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

# Create a carts

> Create a carts

### Request body

`CreateCartRequest`

<ParamField body="currency" type="string,null">
  ISO 4217 currency code, e.g. `USD`.
</ParamField>

<ParamField body="customer_email" type="string,null" />

<ParamField body="customer_id" type="string,null" />

<ParamField body="customer_name" type="string,null" />

<ParamField body="expires_in_minutes" type="integer,null (int64)" />

<ParamField body="items" type="AddCartItemRequest[]" />

<ParamField body="notes" type="string,null" />

### Responses

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

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/carts' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "currency": null,
    "customer_email": null,
    "customer_id": null,
    "customer_name": null,
    "expires_in_minutes": null,
    "items": [
      {
        "description": null,
        "image_url": null,
        "name": "string",
        "original_price": null,
        "product_id": null,
        "quantity": 1,
        "requires_shipping": null,
        "sku": "string",
        "unit_price": "string"
      }
    ],
    "notes": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 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>
