Files
dashback/docs/api/routes/delivery/_id/pdf.md
2026-10-15 00:30:23 +02:00

1.3 KiB

POST /delivery/{id}/pdf

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

Generate and attach delivery note PDF (goods receipt)

Generates an A4 PDF document for the goods receipt / delivery note with line items and quantities. Attaches the PDF as a manifestattachment to the delivery.

Path parameters

Param Required Type Description
id yes integer Delivery ID

Signals

On success, emits SSE signal: delivery (see GET /events).

Response 201

PDF generated and attached to delivery

{
  "attachment": {
    "id": 1,
    "manifestId": 1,
    "fileId": 1,
    "sort": 1,
    "hash": "…",
    "mimetype": "…",
    "name": "…",
    "size": 1,
    "created": "2026-08-10T00:00:00.000Z",
    "modified": "2026-08-10T00:00:00.000Z",
    "skeledash": "…",
    "thumbx": 1,
    "thumby": 1,
    "meta": {}
  },
  "fileUrl": "/delivery/1/file/5"
}

Errors

Status Description
400 Invalid ID or no company selected — {"error":"…"}
401 Unauthorized — {"error":"…"}
403 Not authorized — {"error":"…"}
404 Delivery not found — {"error":"…"}

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