Files
dashback/docs/api/routes/stock/accept.md
2026-10-17 02:20:53 +02:00

1.6 KiB

POST /stock/accept

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

Accept delivery manifest item(s)

Books acceptance for a delivery manifest item on the ledger (warehouse_id = null). If the connected article has stock tracking enabled, an adjustment entry is also booked to adjust physical stock in the target warehouse. If line amount is negative, books as a delivery return (outgoing).

Body (JSON)

Field Required Type Description
manifestarticleId no integer Manifest article ID of the delivery line
warehouseId no integer Optional warehouse ID for inventory intake
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, delivery (see GET /events).

Response 200

Delivery item(s) accepted 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 Delivery line already accepted on ledger or stock tracking disabled — {"error":"…"}

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