1.6 KiB
1.6 KiB
POST /stock/ship
Protected. Requires a valid session cookie (credentials: 'include').
Ship shipment manifest item(s)
Books shipment for a shipment manifest item on the ledger (warehouse_id = null). If the connected article has stock tracking enabled, an adjustment entry is also booked to deduct physical stock from the target warehouse. If line amount is negative, books as a customer retoure (incoming).
Body (JSON)
| Field | Required | Type | Description |
|---|---|---|---|
manifestarticleId |
no | integer | Manifest article ID of the shipment line |
warehouseId |
no | integer | Optional warehouse ID for inventory deduction |
items |
no | object[] | |
items[].manifestarticleId |
yes | integer | |
items[].warehouseId |
no | integer |
{
"manifestarticleId": 1,
"warehouseId": 1,
"items": [
{
"manifestarticleId": 1,
"warehouseId": 1
}
]
}
Signals
On success, emits SSE signals: stock, ledger, articles, shipping (see GET /events).
Response 200
Shipment item(s) shipped successfully
Errors
| Status | Description |
|---|---|
| 400 | Validation error or no company selected — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Manifest article or warehouse not found — {"error":"…"} |
| 409 | Shipment line already shipped on ledger or stock tracking disabled — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.