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

# Add a carton

> Add a carton

### Path parameters

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

### Request body

`AddCartonRequest`

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

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

<ParamField body="package_type" type="string,null">
  One of `box`, `envelope`, `tube`, `pallet`, `custom`.
</ParamField>

<ParamField body="weight_kg" type="string,null">
  Decimal weight (kg) as a string.
</ParamField>

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

### Responses

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

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

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/fulfillment/packs/{id}/cartons' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "height_cm": null,
    "length_cm": null,
    "package_type": null,
    "weight_kg": null,
    "width_cm": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "carton_number": "string",
    "created_at": "string",
    "id": "string",
    "label_printed": true,
    "pack_task_id": "string",
    "package_type": "string",
    "tracking_number": null,
    "weight_kg": null
  }
  ```
</ResponseExample>
