Download OpenAPI specification:Download
The DTLS API is a REST API for registering delivery notes. The registered delivery notes get a printable QR code. This QR code can be scanned in the BauApp application when receiving the shipment. API clients then see the delivery note as received, can see the receiver's comments about the shipment, and can download a PDF receipt of the received shipment.
The products used on the delivery note are also managed through the API.
To access the API, you will need a way to authenticate. The simplest way to do this is with an API key.
To get an API key to the sandbox server, contact us at hello@bauapp.com.
The sandbox server is a test environment where you can freely experiment with the API. It's available at https://apiteszt.dtls.hu. Do not store live data on the sandbox server. The sandbox server is meant to be used while developing an API client. Data on the sandbox server is removed periodically, without notice.
After acquiring an API key, download the swagger.json file containing the API specification with the Download button at te top of this document.
You can open the swagger.json file with a number of REST client tools, like Postman or Insomnia.
You'll need to set up the base URL of the service to https://apiteszt.dtls.hu and set the authorization header to look like this:
Authorization: Bearer $ApiKeyReplace $ApiKey with your API key.
You should be able to make API requests now.
The API is only accessible through HTTPS.
Access to the API is only allowed when the request contains an API key or a client certificate.
Requests without valid authentication will result in a HTTP 401: Unauthorized or a HTTP 403: Forbbidden response code.
These can happen if your API key/client certificate is not known, or you don't have the rights to a resource (it belongs to another company).
There are no fine-grained access rights, a valid API key/client certificate allows clients to perform all operations through the API.
The IP addresses from where API access is allowed can be restricted, contact us for details.
The API key must be sent in the HTTP Authorization header, with the Bearer authentication scheme:
Authorization: Bearer MyApiKey123On the live instance (https://api.dtls.hu), administering API keys is done through your company's BauApp web interface.
Api keys for the sandbox server can be requested at hello@bauapp.com.
TLS client certificates can be used as an alternative to the API key authentication mechanism.
The client certificate must be a valid certificate issued by a certificate authority. The certificate must include the Client Authentication (1.3.6.1.5.5.7.3.2) OID in the Extended key usage field.
You'll need to send us the thumbprint (aka. fingerprint) of your certificate, so that we can associate it with your company.
The main usage scenario when creating delivery notes is the following.
Create products with the products endpoints. This is optional if you already have products defined in DTLS, or if you send the product details with the create delivery note API call.
Create a delivery note.
Get the QR code for the created delivery note.
Print the QR code with your physical delivery note document.
Poll the delivery note for status changes. The status field of the delivery note is updated shortly after the QR code is scanned by the recipient of the delivery.
Download the delivery receipt PDF.
The API consumes and produces JSON messages, with the exception of the QR code endpoint, which returns an image.
The encoding of the JSON messages must be UTF-8.
Date fields are formatted like 2020-12-31 according to OpenAPI specs.
Datetime values are formatted like 2020-12-31T23:59:59Z for UTC datetimes, and 2020-12-31T23:59:59+02:00 for datetimes with an offset.
See http://spec.openapis.org/oas/v3.0.3#data-types for the specification details.
Some endpoints can potentially return a large number of objects, for example the /products endpoint.
These endpoints only return a page of objects at once. To receive the next page,
call the same endpoint with a from parameter. The from parameter should contain the last
identifier received in the previous endpoint request. The response for this reques will
contain objects starting with (but not including) the object identified in the from parameter.
To read all objects, proceed to do this in a loop until you get an empty response.
The from field must contain the id of an existing object, otherwise a HTTP 404 error occurs.
Make a GET request to /products, let's say you receive this page (product details are omitted for the example):
[ { id: 'p34' }, { id: 'p67' }, { id: 'p23' } ]
Make a GET request with the last ID to /products?from=p23, receive this page:
[ { id: 'p11' }, { id: 'p76' } ]
Note that the product with ID p23 is not included in this page.
Make a GET request with the last ID to /products?from=p76, receive this page:
[]
Since the response is an empty list you're done querying all products
String length restrictions specified on fields are to be interpreted as the number of bytes in the UTF-8 encoded string, not as unicode character count.
So the length specified only applies if you don't use any multibyte characters.
The API requires the use of HTTP/1.1, HTTP/2 and newer protocols are not supported.
If a request doesn't use HTTP/1.1, a HTTP 426 error code will be returned.
The production server keeps products and delivery notes indefinitely. This may change in future implementations of the API.
The data on the sandbox server is removed on a regular basis, without prior notice.
Rate limiting is based on the provided API key. If too many requests are sent in a period of time the server responds with HTTP 429 messages.
Explicit rate limit values are to be determined later.
Rate limits on the sandbox server may be stricter than on the production server.
If you exceed the rate limit, a HTTP 429: Too many requests result is returned.
The request body size of create (POST) operations is limited. Currently all requests sizes are limited to 256KiB.
If you send a larger request, you'll receive a HTTP 413: Payload too large response.
The OpenAPI specification (the swagger.json file) can be used to generate API client code for many different programming languages.
To download the swagger.json for the API using the download button at the top of this document.
For information about how to generate clients from the specification see the OpenAPI Generator Homepage.
It's possible to configure the DTLS API server to send an HTTP request to your servers when a delivery note is received.
When the delivery note is recevied, these two requests are sent:
POST request to {your-url}?content=deliveryNote, with the body containing the delivery note JSONPOST request to {your-url}?content=deliveryReceipt&filename=...&deliveryNoteUuid=..., with the body containing the delivery receipt PDFThe {your-url} placeholder can be configured to anything you like.
Authorization can be performed with any HTTP Authorization header or with a TLS client certificate.
The order of the two requests is undefined.
If you'd like to use this feature, contact us.
The delivery note with the specified id must not exist yet.
The API doesn't allow updating delivery notes after creation, you can just create a new note if a created note contains an error.
This API call can also create the products used on the delivery note, see the description of items.
Array of objects or null (NewItem) The products and their quantities which are listed on the delivery note. At least one item is required. At least one identifier from
When referring to a product by it's DTLS ID in When using the If the product already exists in the DTLS database, the values supplied in the item will not change the existing product. There must not be multiple items referring to the same product. | |
| uuid | string or null A globally unique identifier for the delivery note. This field is automatically generated on creation, if not supplied. The identifier is in lowercase, and in the short format without hyphen characters. |
| supplierId | string or null The unique identifier for the delivery note, as represented in the supplier's ERP system. The format of the note is not fixed, any identifier format can be used. The identifier doesn't need to be globally unique, it's enough that it's unique for the current user (the one identified by the API key). |
| issueDate | string <date-time> The date and time when the delivery note was issued. The value of this field is not verified, it can be in the far past or in the future. |
object (Supplier) Fields related to the issuer of the delivery note. | |
object (Customer) Fields related to the customer. | |
object (Delivery) Delivery address and transport information. | |
| netWeight | string or null Total net weight of all products. Also includes weight units in the field. |
| grossWeight | string or null Total gross weight of all products. Also includes weight units in the field. |
| orderNumber | string or null Additional identifier from the manufacturer’s ERP system |
| assignmentNumber | string or null Additional identifier from the manufacturer’s ERP system |
| referenceNumber | string or null Additional identifier from the manufacturer’s ERP system |
{- "items": [
- {
- "productId": "DTLS123456123456712",
- "amount": 0,
- "comment": "string",
- "name": "MASTERFOL TAPE-2 20",
- "unit": "roll",
- "manufacturer": "Masterplast",
- "manufacturerId": "DTLS123456",
- "manufacturerItemNumber": "0213-04020025",
- "eanCode": "5996507000009",
- "taxNumber": "68109100",
- "category": "masonry",
- "packageName": "pack",
- "packageUnit": "24",
- "palletName": "pallet",
- "palletUnit": "144",
- "size": "25m",
- "netWeight": "0.1kg",
- "grossWeight": "0.2kg",
}
], - "uuid": "c4db0608bac44a739ec752c48ba9b4da",
- "supplierId": "K20223223SL",
- "issueDate": "2019-08-24T14:15:22Z",
- "supplier": {
- "name": "ACME Kft.",
- "warehouse": "Révay utcai telephely",
- "taxNumber": "52725916-2-05",
- "address": "Révay utca 123",
- "headquarters": "1234 Budapest, Futrinka utca 42."
}, - "customer": {
- "name": "HufBau Akker",
- "companyId": "DTLS999888",
- "address": "Hufbau sétány 123"
}, - "delivery": {
- "recipientName": "Kovács Imre, +36204791543",
- "address": "Budapest, Bartók Béla út 42, II/4, DTLS134532",
- "ekaerNumber": "string",
- "haulierName": "OptiSped Kft",
- "haulierCompanyId": "DTLS555667",
- "haulierComment": "string",
- "deliveryCompanyId": "DTLS122646",
- "projectCode": "PRJ-441234"
}, - "netWeight": "970 kg",
- "grossWeight": "string",
- "orderNumber": "PO6375327",
- "assignmentNumber": "R4-20-00179",
- "referenceNumber": "182230/DTS"
}{- "uuid": "c4db0608bac44a739ec752c48ba9b4da",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "created",
- "reception": {
- "name": "kovacs.imre",
- "company": "Generál Kivitelező Kft.",
- "date": "2019-08-24T14:15:22Z",
- "comment": "string"
}, - "items": [
- {
- "productId": "DTLS123456123456712",
- "amount": 0,
- "comment": "string",
- "modifiedAmount": 0,
- "modifierComment": "string",
- "modifierUser": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
], - "supplierId": "K20223223SL",
- "issueDate": "2019-08-24T14:15:22Z",
- "supplier": {
- "name": "ACME Kft.",
- "warehouse": "Révay utcai telephely",
- "taxNumber": "52725916-2-05",
- "address": "Révay utca 123",
- "headquarters": "1234 Budapest, Futrinka utca 42."
}, - "customer": {
- "name": "HufBau Akker",
- "companyId": "DTLS999888",
- "address": "Hufbau sétány 123"
}, - "delivery": {
- "recipientName": "Kovács Imre, +36204791543",
- "address": "Budapest, Bartók Béla út 42, II/4, DTLS134532",
- "ekaerNumber": "string",
- "haulierName": "OptiSped Kft",
- "haulierCompanyId": "DTLS555667",
- "haulierComment": "string",
- "deliveryCompanyId": "DTLS122646",
- "projectCode": "PRJ-441234"
}, - "netWeight": "970 kg",
- "grossWeight": "string",
- "orderNumber": "PO6375327",
- "assignmentNumber": "R4-20-00179",
- "referenceNumber": "182230/DTS"
}Returns delivery notes.
The delivery notes are ordered so that the first ones are the ones that are most recently made available to be queried through the API.This way when polling for new orders, you should only need to check the first page(s).This ordering is not necessarily the same as a descending ordering by creationDate, because delivery notes created through the web UI may take longer to be visible through the API.
The endpoint uses paging, so it doesn't return all delivery notes at once.
To get the next page of notes call the endpoint with the fromUuid parameter, using the ID of the oldest (last) note that you received.
| fromUuid | string The result will only contain items starting at (but not including) this one. |
[- {
- "uuid": "c4db0608bac44a739ec752c48ba9b4da",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "created",
- "reception": {
- "name": "kovacs.imre",
- "company": "Generál Kivitelező Kft.",
- "date": "2019-08-24T14:15:22Z",
- "comment": "string"
}, - "items": [
- {
- "productId": "DTLS123456123456712",
- "amount": 0,
- "comment": "string",
- "modifiedAmount": 0,
- "modifierComment": "string",
- "modifierUser": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
], - "supplierId": "K20223223SL",
- "issueDate": "2019-08-24T14:15:22Z",
- "supplier": {
- "name": "ACME Kft.",
- "warehouse": "Révay utcai telephely",
- "taxNumber": "52725916-2-05",
- "address": "Révay utca 123",
- "headquarters": "1234 Budapest, Futrinka utca 42."
}, - "customer": {
- "name": "HufBau Akker",
- "companyId": "DTLS999888",
- "address": "Hufbau sétány 123"
}, - "delivery": {
- "recipientName": "Kovács Imre, +36204791543",
- "address": "Budapest, Bartók Béla út 42, II/4, DTLS134532",
- "ekaerNumber": "string",
- "haulierName": "OptiSped Kft",
- "haulierCompanyId": "DTLS555667",
- "haulierComment": "string",
- "deliveryCompanyId": "DTLS122646",
- "projectCode": "PRJ-441234"
}, - "netWeight": "970 kg",
- "grossWeight": "string",
- "orderNumber": "PO6375327",
- "assignmentNumber": "R4-20-00179",
- "referenceNumber": "182230/DTS"
}
]After creating a Delivery Note in th BauApp system it is possible to delete the data from BauApp servers if the Delivery Note hasn't been scanned yet. After deletion the Delivery Note won't appear on the BauApp web forms.
Deleted delivery notes will not be visible for the API calls anymore.
The identifiers (uuid, supplierId) of deleted delivery notes cannot be reused when creating new ones.
| uuid required | string The UUID of the delivery note to delete, as 32 lowercase hexadecimal digits, no hyphens. |
| uuid required | string The UUID of the delivery note. |
{- "uuid": "c4db0608bac44a739ec752c48ba9b4da",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "created",
- "reception": {
- "name": "kovacs.imre",
- "company": "Generál Kivitelező Kft.",
- "date": "2019-08-24T14:15:22Z",
- "comment": "string"
}, - "items": [
- {
- "productId": "DTLS123456123456712",
- "amount": 0,
- "comment": "string",
- "modifiedAmount": 0,
- "modifierComment": "string",
- "modifierUser": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
], - "supplierId": "K20223223SL",
- "issueDate": "2019-08-24T14:15:22Z",
- "supplier": {
- "name": "ACME Kft.",
- "warehouse": "Révay utcai telephely",
- "taxNumber": "52725916-2-05",
- "address": "Révay utca 123",
- "headquarters": "1234 Budapest, Futrinka utca 42."
}, - "customer": {
- "name": "HufBau Akker",
- "companyId": "DTLS999888",
- "address": "Hufbau sétány 123"
}, - "delivery": {
- "recipientName": "Kovács Imre, +36204791543",
- "address": "Budapest, Bartók Béla út 42, II/4, DTLS134532",
- "ekaerNumber": "string",
- "haulierName": "OptiSped Kft",
- "haulierCompanyId": "DTLS555667",
- "haulierComment": "string",
- "deliveryCompanyId": "DTLS122646",
- "projectCode": "PRJ-441234"
}, - "netWeight": "970 kg",
- "grossWeight": "string",
- "orderNumber": "PO6375327",
- "assignmentNumber": "R4-20-00179",
- "referenceNumber": "182230/DTS"
}Currently the search only supports finding delivery notes by the supplierId
The response contains all matches, no paging is used.
In rare cases there may be more than one delivery notes with the same supplierId.
For example when you're a haulier company and you have access to many companies delivery notes, and two happen to share the same supplierId.
| supplierId required | string The supplier's identifier of the delivery note, as supplied in the |
[- {
- "uuid": "c4db0608bac44a739ec752c48ba9b4da",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "created",
- "reception": {
- "name": "kovacs.imre",
- "company": "Generál Kivitelező Kft.",
- "date": "2019-08-24T14:15:22Z",
- "comment": "string"
}, - "items": [
- {
- "productId": "DTLS123456123456712",
- "amount": 0,
- "comment": "string",
- "modifiedAmount": 0,
- "modifierComment": "string",
- "modifierUser": "string",
- "updateDate": "2019-08-24T14:15:22Z"
}
], - "supplierId": "K20223223SL",
- "issueDate": "2019-08-24T14:15:22Z",
- "supplier": {
- "name": "ACME Kft.",
- "warehouse": "Révay utcai telephely",
- "taxNumber": "52725916-2-05",
- "address": "Révay utca 123",
- "headquarters": "1234 Budapest, Futrinka utca 42."
}, - "customer": {
- "name": "HufBau Akker",
- "companyId": "DTLS999888",
- "address": "Hufbau sétány 123"
}, - "delivery": {
- "recipientName": "Kovács Imre, +36204791543",
- "address": "Budapest, Bartók Béla út 42, II/4, DTLS134532",
- "ekaerNumber": "string",
- "haulierName": "OptiSped Kft",
- "haulierCompanyId": "DTLS555667",
- "haulierComment": "string",
- "deliveryCompanyId": "DTLS122646",
- "projectCode": "PRJ-441234"
}, - "netWeight": "970 kg",
- "grossWeight": "string",
- "orderNumber": "PO6375327",
- "assignmentNumber": "R4-20-00179",
- "referenceNumber": "182230/DTS"
}
]Returns an image of a QR code containing a link to the delivery note.
You can include this image on your own documents, and the QR code can be scanned with the mobile app during delivery.
Try to print the QR code as large as you can. This will make scanning easier and will also protect against damage and staining. We recommend at least 3cm by 3cm.
| uuid required | string The uuid of the delivery note the create the QR code from. |
Download the receipt for the delivery note - a .pdf report confirming the delivery, with comments and information supplied by the recipient.
Only available after the delivery note was received, see the status field on the delivery note.
| uuid required | string The uuid of the delivery note. |
Before sending delivery notes through the API, suppliers have two options to check if they should get a QR code for their delivery note:
- only send the delivery address so the DTLS system can check if it contains the DTLS Company ID or
- get the format of the DTLS Company ID so the supplier's ERP system can check if it contains the DTLS Company ID
The DLTS API requires a DTLS company identifier in the recipient's address when creating a delivery note.
You can use the regular expression pattern returned by this API call to check whether the delivery note in your system contains a company identifier. Only send the delivery note creation request to the DTLS API if your delivery note contains a DTLS company ID. This way you avoid disclosing potentially sensitive information, and the request would be rejected anyway.
You should check all the delivery note fields in your system that are eventually included in the address field of the delivery note creation request.
These may include fields like:
The pattern is meant to be case sensitive.
"string"Before sending delivery notes through the API, suppliers have two options to check if they should get a QR code for their delivery note:
- only send the delivery address so the DTLS system can check if it contains the DTLS Company ID or
- get the format of the DTLS Company ID so the supplier's ERP system can check if it contains the DTLS Company ID
Checks whether the posted data field contains a DTLS company identifier.
You would typically use this to send us a field in your delivery note that might contain a DTLS company identifier, such as the address/shipTo field. This endpoint returns whether the field contains a company identifier or not.
If your address field doesn't contain a company identifier, you probably don't want to send the delivery note to DTLS.
The endpoint doesn't validate whether the company identifier belongs to an existing company or not, it only checks for the correct company id format.
The text to search for DTLS company Ids.
"1034 Budapest, Nyírfa utca 33, DTLS123456"trueRegister a new product with DTLS, so that it can later be referenced in delivery notes.
Modifying the properties of a product after creation is not supported for now.
It's strongly recommended to provide the eanCode or the manufacturerItemNumber values in the request. If these fields match an existing product, no new product will be created.
| name required | string non-empty The name of the product. |
| unit required | string non-empty The name of the smallest undividable unit of the product. This cannot be changed after a product is added to the DTLS database and on all delivery notes in the system the products can be listed only in this unit. E.g. a roll of electrical tape, or a can of paint. |
| manufacturer | string or null The name of the manufacturer |
| manufacturerId | string or null The manufacturer's company ID in the DTLS system |
| manufacturerItemNumber | string or null |
| eanCode | string or null The standard 13 digits GTIN id of the product |
| taxNumber | string or null The custom tariffs identifier of the product |
| category | string or null The building material category to which the product belongs |
| packageName | string or null If multiple units of a product may be packaged together, then the name of the package containing the units. E.g. a case (package_name) of beer contains cans of beers (unit). |
| packageUnit | string or null Specifies how many units does this package contain |
| palletName | string or null If multiple units of a product may be packaged together, then the name of a group of unit larger than a package. Usually just 'pallet'. |
| palletUnit | string or null Specifies how many _unit_s a pallet of this product contains. |
| size | string or null The size of the product |
| netWeight | string or null The net weight of the product. |
| grossWeight | string or null The gross weight of the product. |
| productPage | string or null <uri> URL of the product's datasheet |
| performanceStatement | string or null <uri> URL of the product's performance statement |
| bimObject | string or null <uri> URL of the BIM object of the product |
| otherLink | string or null <uri> Any other URL associated with the product |
{- "name": "MASTERFOL TAPE-2 20",
- "unit": "roll",
- "manufacturer": "Masterplast",
- "manufacturerId": "DTLS123456",
- "manufacturerItemNumber": "0213-04020025",
- "eanCode": "5996507000009",
- "taxNumber": "68109100",
- "category": "masonry",
- "packageName": "pack",
- "packageUnit": "24",
- "palletName": "pallet",
- "palletUnit": "144",
- "size": "25m",
- "netWeight": "0.1kg",
- "grossWeight": "0.2kg",
}{- "name": "MASTERFOL TAPE-2 20",
- "unit": "roll",
- "manufacturer": "Masterplast",
- "manufacturerId": "DTLS123456",
- "manufacturerItemNumber": "0213-04020025",
- "eanCode": "5996507000009",
- "taxNumber": "68109100",
- "category": "masonry",
- "packageName": "pack",
- "packageUnit": "24",
- "palletName": "pallet",
- "palletUnit": "144",
- "size": "25m",
- "netWeight": "0.1kg",
- "grossWeight": "0.2kg",
- "id": "DTLS123456123456712",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "active"
}List products that are registered for your company.
The products are ordered so that the first ones are the ones that are most recently made available to be queried through the API.This way when polling for new products, you should only need to check the first page(s).This ordering is not necessarily the same as a descending ordering by creationDate, because products created through the web UImay take longer to be visible through the API.
The endpoint uses paging, so it doesn't return all products at once.To get the next page of notes call the endpoint with the from parameter, using the ID of the last product that you received.
| from | string A product DTLS ID. The result will only contain items starting at (but not including) the specified one. |
[- {
- "name": "MASTERFOL TAPE-2 20",
- "unit": "roll",
- "manufacturer": "Masterplast",
- "manufacturerId": "DTLS123456",
- "manufacturerItemNumber": "0213-04020025",
- "eanCode": "5996507000009",
- "taxNumber": "68109100",
- "category": "masonry",
- "packageName": "pack",
- "packageUnit": "24",
- "palletName": "pallet",
- "palletUnit": "144",
- "size": "25m",
- "netWeight": "0.1kg",
- "grossWeight": "0.2kg",
- "id": "DTLS123456123456712",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "active"
}
]Returns a single product with the specified DTLS product identifier
| id required | string The product's DTLS product id |
{- "name": "MASTERFOL TAPE-2 20",
- "unit": "roll",
- "manufacturer": "Masterplast",
- "manufacturerId": "DTLS123456",
- "manufacturerItemNumber": "0213-04020025",
- "eanCode": "5996507000009",
- "taxNumber": "68109100",
- "category": "masonry",
- "packageName": "pack",
- "packageUnit": "24",
- "palletName": "pallet",
- "palletUnit": "144",
- "size": "25m",
- "netWeight": "0.1kg",
- "grossWeight": "0.2kg",
- "id": "DTLS123456123456712",
- "created": "2019-08-24T14:15:22Z",
- "lastUpdated": "2019-08-24T14:15:22Z",
- "status": "active"
}