# POST /api/v1/inventory/shipments

> Create shipment

- **Tag:** inventory:shipments
- **Operation ID:** `create_shipment_api_v1_inventory_shipments_post`

## Description

Record a received shipment and update inventory.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `ShipmentCreateRequest`

- `fees` (array · Fee) — Shipment-specific fees.
- `status` (string) — Shipment status.
- `line_items` (array · LineItem) — Items included in this shipment.
- `description` (string) — Shipment notes.
- `tracking_number` (string) — Carrier tracking number.
- `expected_arrival_date` (string · date-time) — Expected delivery date.
- `shipped_date` (string · date-time) — Date shipped.
- `location_id` (string) — Destination location ID (where the shipment is being shipped to).

## Responses

### 201 — Successful Response

Schema: `SuccessEnvelope_ShipmentResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (ShipmentResponse)

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/inventory/shipments' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "fees": [],
  "status": "string",
  "line_items": [],
  "description": "string",
  "tracking_number": "string",
  "expected_arrival_date": "2026-01-01T00:00:00Z"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/inventory/shipments', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "fees": [],
  "status": "string",
  "line_items": [],
  "description": "string",
  "tracking_number": "string",
  "expected_arrival_date": "2026-01-01T00:00:00Z"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "fees": [],
  "status": "string",
  "line_items": [],
  "description": "string",
  "tracking_number": "string",
  "expected_arrival_date": "2026-01-01T00:00:00Z"
}

response = httpx.post("https://api.ondayzero.com/api/v1/inventory/shipments", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/inventory-shipments/create-shipment
- OpenAPI slice: https://www.ondayzero.com/docs/reference/inventory-shipments/create-shipment/openapi.json
- Other endpoints in **inventory:shipments**: https://www.ondayzero.com/docs/reference/inventory-shipments
