API Documentation
External REST API for integrating AV Timber OCR data into other systems.
Authentication
Endpoints
Error Codes
| Status | Response | Cause |
|---|---|---|
| 401 | { "error": "Unauthorized" } | Missing or invalid X-API-Key |
| 404 | { "error": "Document not found" } | Document ID does not exist |
| 400 | { "error": "Document is ..." } | Document not yet processed or missing ID |
Schema Reference
| Field | Type | Description |
|---|---|---|
| document.documentType | string | Always "Lieferschein" |
| document.documentNumber | string | Delivery note number |
| document.documentDate | string | ISO 8601 date (YYYY-MM-DD) |
| document.deliveryDate | string | ISO 8601 date (YYYY-MM-DD) |
| document.reference | string | Reference code (e.g. RSN number) |
| document.customerNumber | string | Customer number |
| supplier.name | string | Supplier company name |
| supplier.vatId | string | VAT identification number |
| supplier.address | object | street, postalCode, city, country |
| positions[].positionId | integer | Line position number |
| positions[].productDescription | string | Timber product description |
| positions[].thicknessMm | number | Thickness in millimeters |
| positions[].widthMm | number | Width in millimeters |
| positions[].lengthM | number | Length in meters |
| positions[].pieces | number | Piece count |
| positions[].volumeM3 | number | Volume in cubic meters |
| totals.totalVolumeM3 | number | Total volume |
| totals.totalPieces | number | Total piece count |
| totals.totalPackages | number | Total package count (if available) |
| deliveryTerms | string | Incoterms or delivery conditions |
All fields are optional — only fields detected by OCR are returned.