Delivery API: use externalNumber for user reference

Delivery create now accepts externalNumber (user-supplied reference) instead
of number; the manifest number is auto-allocated server-side via
nextNumber('delivery'). Update patches externalNumber (clearable) rather than
number. DeliverySummary schema documents externalNumber and notes number is
auto-generated. Regenerate API docs.
This commit is contained in:
seb
2026-08-08 10:09:32 +02:00
parent 57420ac0db
commit 7514848022
7 changed files with 60 additions and 29 deletions

View File

@@ -4,8 +4,10 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Update delivery
Patches header fields that are present. If `lines` is present, replaces
all lines; if omitted, leaves lines unchanged. Returns the full delivery.
Patches header fields that are present. The manifest `number` is
auto-allocated and cannot be patched; only the user-supplied
`externalNumber` reference is editable. If `lines` is present,
replaces all lines; if omitted, leaves lines unchanged.
## Path parameters
@@ -18,7 +20,7 @@ all lines; if omitted, leaves lines unchanged. Returns the full delivery.
```json
{
"number": "DHL-124",
"externalNumber": "DHL-124",
"lines": []
}
```
@@ -34,6 +36,7 @@ Updated delivery
"number": "…",
"type": "delivery",
"supplierId": 1,
"externalNumber": "…",
"date": "2026-08-10T00:00:00.000Z",
"lines": [
{