1.6 KiB
1.6 KiB
GET /shipment
Protected. Requires a valid session cookie (credentials: 'include').
List shipments
Company-wide paginated list of shipment manifests (manifest rows with type = 'shipment')
with delivery state, package tracking info, and order references.
Query parameters
| Param | Required | Type | Description |
|---|---|---|---|
offset |
no | integer | Number of shipments to skip |
limit |
no | integer | Number of shipments to return |
search |
no | string | Free-text search matching shipment number, order number, external number, tracking code, or customer name |
state |
no | string | Optional filter by delivery state |
seekMonths |
no | integer | Negative integer for cutoff months ago (e.g. -1 for shipments older than 1 month) |
Response 200
Paginated shipment list
{
"shipments": [
{
"id": 1,
"number": "…",
"type": "shipment",
"entityId": 1,
"externalNumber": "…",
"date": "…",
"createdAt": "…",
"orderId": 1,
"orderNumber": "…",
"customerName": "…",
"positions": 1,
"totalQuantity": 1,
"packageCount": 1,
"carrier": "…",
"trackingCode": "…",
"state": "new"
}
],
"total": 1,
"unfilteredTotal": 1,
"offset": 1,
"limit": 1
}
Errors
| Status | Description |
|---|---|
| 400 | Invalid query parameters or no company selected — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.