Skip to main content
POST
Lieferschein-PDF hochladen (asynchrone Segmentierung)

Overview

Uploads a delivery-note PDF and starts asynchronous segmentation and extraction (staple-scan). Suitable for single delivery notes as well as PDF bundles that contain multiple delivery notes and optional order sheets. The PDF is streamed to storage and enqueued on the segmentation queue. After segmentation, one delivery in status PROCESSING is created per detected delivery note; extraction then runs asynchronously. The response returns fileId and jobId immediately — delivery rows appear only after segmentation completes.
This endpoint requires the delivery-async-processing feature flag. Without it, the API responds with 403.

Permissions

The API key must be linked to a customer. Supplier API keys are rejected.

Headers

Query parameters

Behavior

  • The request body is the raw PDF (not multipart, not Base64).
  • Metadata is passed only via query parameters.
  • For project-scoped API keys, projectId may be omitted — the key’s project is used.
  • After a successful upload: segmentation → fan-out → extraction. Poll GET /deliveries for the resulting rows.
  • fileId is the uploaded bundle document id, not a delivery id.

Example

Successful response

Response codes

Authorizations

X-API-Key
string
header
required

API-Schlüssel zur Authentifizierung. Kontaktieren Sie Ihren Customer Success Manager, um einen API-Schlüssel zu erhalten.

Jeder Endpunkt erfordert spezifische Berechtigungen (Scopes); die erforderlichen Scopes werden pro Endpunkt angezeigt.

Query Parameters

projectId
string<uuid>

Projekt-UUID. Pflicht, sofern der API-Schlüssel nicht projektgebunden ist (dann wird das Projekt des Schlüssels verwendet) oder der Aufrufer kein Admin ist.

supplierId
string<uuid>

Optionale Lieferanten-UUID, falls zum Upload-Zeitpunkt bekannt

sourceType
enum<string>
default:COMSTRUCT_API

Quelle der Lieferung. Standard für öffentliche API-Uploads: COMSTRUCT_API.

Available options:
WEB_APP_IMPORT,
MAIL,
GENERAL_MAIL,
COMSTRUCT_API,
EXTERNAL_API,
PORTAL,
APP_SCAN

Body

application/pdf

Rohes PDF (binär)

The body is of type file.

Response

PDF hochgeladen und Segmentierung eingereiht

fileId
string<uuid>
required

ID des hochgeladenen Bundle-Dokuments (keine Lieferungs-ID)

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

success
boolean
required
Example:

true

jobId
string

ID des Segmentierungs-Jobs in der Queue

Example:

"42"