This commit is contained in:
seb
2026-10-12 13:11:28 +02:00
parent 4429294d8b
commit 1f09e620e3
8 changed files with 233 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ Create shipping for an order
Creates a shipping for the order. The shipping number is allocated from the
`shipping` number sequence (prefix and counter from the numbers API).
If `state` is `shipped`, stock is adjusted via the ledger and article history is written.
## Path parameters
@@ -20,11 +21,13 @@ Creates a shipping for the order. The shipping number is allocated from the
|-------|----------|------|-------------|
| `type` | yes | string | |
| `state` | yes | string | |
| `warehouseId` | no | integer | Optional warehouse ID for stock deduction when state is shipped |
```json
{
"type": "…",
"state": "…"
"state": "…",
"warehouseId": 1
}
```
@@ -51,7 +54,8 @@ Created shipping
| 400 | Validation error or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Order not found — `{"error":"…"}` |
| 404 | Order or warehouse not found — `{"error":"…"}` |
| 409 | Order already shipped — `{"error":"…"}` |
---