curl --request POST \
--url https://api.comstruct.com/v1/deliveries/custom \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"jsonContent": {
"deliveryNumber": "LS-2024-001",
"customerName": "Musterbau GmbH",
"items": [
{
"title": "Beton C30/37",
"quantity": 25.5,
"unit": "m3"
}
]
}
}
'{
"success": true,
"message": "Delivery note has no changes"
}{
"success": true,
"message": "Delivery note uploaded successfully",
"deliveryNumber": "LS-2024-001"
}{
"success": false,
"message": "<string>",
"statusCode": 400
}Deliveries
Custom delivery
Erforderliche Berechtigungen: deliveries:write
Verarbeitet Lieferscheine in benutzerdefinierten Formaten. Der Inhalt wird anhand der lieferantenspezifischen Konfiguration automatisch verarbeitet und in comstruct-Lieferungen umgewandelt.
Der Anfragekörper kann entweder als JSON-Objekt mit den Feldern xmlContent oder jsonContent gesendet werden, oder als roher XML- bzw. JSON-String. Die automatische Erkennung des Formats erfolgt über den Content-Type-Header.
POST
/
deliveries
/
custom
curl --request POST \
--url https://api.comstruct.com/v1/deliveries/custom \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"jsonContent": {
"deliveryNumber": "LS-2024-001",
"customerName": "Musterbau GmbH",
"items": [
{
"title": "Beton C30/37",
"quantity": 25.5,
"unit": "m3"
}
]
}
}
'{
"success": true,
"message": "Delivery note has no changes"
}{
"success": true,
"message": "Delivery note uploaded successfully",
"deliveryNumber": "LS-2024-001"
}{
"success": false,
"message": "<string>",
"statusCode": 400
}Overview
This endpoint allows suppliers to submit delivery notes in custom, non-standardized formats to comstruct. The data is automatically processed by system-specific processors and converted into comstruct deliveries. The endpoint accepts either JSON or XML as input format.Input format
The request body can be sent in two ways:| Variant | Content-Type | Body |
|---|---|---|
| JSON wrapper | application/json | { "jsonContent": { ... } } or { "xmlContent": "<xml>...</xml>" } |
| Raw XML string | application/xml | <delivery>...</delivery> |
If you send raw JSON or XML content as a string, comstruct automatically detects the format based on the content.
Example calls
Send JSON delivery note
curl -X POST "https://api.comstruct.com/v1/deliveries/custom" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonContent": {
"deliveryNumber": "DN-2024-001",
"customerName": "Construction Corp",
"projectNumber": "PRJ-001",
"deliveryDate": "2024-06-15T08:30:00Z",
"items": [
{
"title": "Concrete C30/37",
"productNumber": "CONC-C30",
"quantity": 25.5,
"unit": "m3"
},
{
"title": "Reinforcement steel B500S",
"productNumber": "STEEL-B500S",
"quantity": 3.2,
"unit": "t"
}
]
}
}'
{
"jsonContent": {
"deliveryNumber": "DN-2024-001",
"customerName": "Construction Corp",
"projectNumber": "PRJ-001",
"deliveryDate": "2024-06-15T08:30:00Z",
"items": [
{
"title": "Concrete C30/37",
"productNumber": "CONC-C30",
"quantity": 25.5,
"unit": "m3"
},
{
"title": "Reinforcement steel B500S",
"productNumber": "STEEL-B500S",
"quantity": 3.2,
"unit": "t"
}
]
}
}
Send XML delivery note
curl -X POST "https://api.comstruct.com/v1/deliveries/custom" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"xmlContent": "<delivery><number>DN-2024-002</number><customer>Construction Corp</customer><date>2024-06-15</date><items><item><title>Concrete C30/37</title><quantity>25.5</quantity><unit>m3</unit></item></items></delivery>"
}'
{
"xmlContent": "<delivery><number>DN-2024-002</number><customer>Construction Corp</customer><date>2024-06-15</date><items><item><title>Concrete C30/37</title><quantity>25.5</quantity><unit>m3</unit></item></items></delivery>"
}
Successful response
{
"success": true,
"message": "Delivery note uploaded successfully",
"deliveryNumber": "DN-2024-001"
}
Response codes
| Code | Description |
|---|---|
201 | Delivery note successfully processed and created |
200 | Delivery note received but no changes (e.g. duplicate) |
400 | Invalid input or missing supplier ID |
401 | Unauthorized - missing or invalid API key |
403 | Forbidden - missing scope deliveries:write |
500 | Internal server error |
Authorizations
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.
Body
application/jsonapplication/xml
Lieferscheindaten im JSON- oder XML-Format