Files
dashback/docs/api/routes/shipping/_id.patch.md
2026-10-12 13:11:28 +02:00

1.3 KiB

PATCH /shipping/{id}

Protected. Requires a valid session cookie (credentials: 'include').

Update shipping

Updates a shipping record. If transitioned to shipped, stock is adjusted via ledger and article history is written. Once shipped, it cannot be undone.

Path parameters

Param Required Type Description
id yes integer Shipping ID

Body (JSON)

Field Required Type Description
type no string
state no string
warehouseId no integer Warehouse ID for stock deduction when transitioning to shipped
{
  "type": "…",
  "state": "…",
  "warehouseId": 1
}

Response 200

Updated shipping

{
  "shipping": {
    "id": 1,
    "manifestId": 1,
    "number": "…",
    "type": "…",
    "state": "…"
  }
}

Errors

Status Description
400 Validation error or no company selected — {"error":"…"}
401 Unauthorized — {"error":"…"}
403 Not authorized — {"error":"…"}
404 Shipping or warehouse not found — {"error":"…"}
409 Shipped shipping cannot be undone, or order already shipped — {"error":"…"}

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.