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

# Ingest

> Ingest

### Request body

`IngestOrderRequest`

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

<ParamField body="external_order_id" type="string" required />

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

<ParamField body="items" type="IngestLineRequest[]" required />

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

### Responses

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

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/purgatory/orders' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "channel_id": null,
    "external_order_id": "string",
    "external_status": null,
    "items": [
      {
        "external_sku": "string",
        "product_id": null,
        "quantity": "string"
      }
    ],
    "metadata": {}
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "external_order_id": "string",
    "external_status": null,
    "id": "string",
    "is_posted": true,
    "items": [
      {
        "external_sku": "string",
        "id": "string",
        "ignore_item": true,
        "non_physical": true,
        "product_id": null,
        "quantity": "string",
        "resolved": true
      }
    ],
    "ready_to_post": true,
    "unresolved_count": 1
  }
  ```
</ResponseExample>
