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

# `POST /api/v1/orders`

> `POST /api/v1/orders`

### Request body

`CreateOrderRequest`

<ParamField body="billing_address" type="object" />

<ParamField body="currency" type="string,null">
  ISO currency code (default: USD).
</ParamField>

<ParamField body="customer_id" type="string (uuid)" required>
  The customer placing the order.
</ParamField>

<ParamField body="items" type="CreateOrderItemRequest[]" required>
  Line items for the order.
</ParamField>

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

<ParamField body="payment_method" type="string,null">
  Payment method identifier.
</ParamField>

<ParamField body="shipping_address" type="object" />

<ParamField body="shipping_method" type="string,null">
  Shipping method identifier.
</ParamField>

### Responses

<ResponseField name="201" type="OrderResponse">
  Order created
</ResponseField>

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

<ResponseField name="422" type="ErrorBody">
  Idempotency-Key reused with a different body
</ResponseField>

<ResponseField name="428" type="ErrorBody">
  Idempotency-Key header required on this endpoint (configurable)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/orders' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "billing_address": null,
    "currency": null,
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "items": [
      {
        "discount": null,
        "name": "string",
        "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "quantity": 1,
        "sku": "string",
        "tax_amount": null,
        "unit_price": "string",
        "variant_id": null
      }
    ],
    "notes": null,
    "payment_method": null,
    "shipping_address": null,
    "shipping_method": null
  }'
  ```
</RequestExample>

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