The Delivery Note Retrieval by Order ID API allows to download for every order the Delivery Note if one is present.
This API is intended to be used in white label business model approach where you want to be in control of the delivery note that is inserted in the transport box.
Do you have questions about how your server should retrieve Delivery Note of the order? Visiting our demo page will help you out.
We’ve developed a sandbox server, which is an isolated server (not hooked up to a payment system or production environment, allowing you to test the service without getting billed) to try out your code and integration with us. As the sandbox server is an isolated server, it requires different credentials than the production site.
The demo page of Delivery Note Retrieval by Order ID API on sandbox server:
https://imatsandbox.materialise.net/api/demo/documents-retrieval-by-order-id-api.htm
The sandbox and production server contain API demo pages which send well-formed API requests to our site.
The demo page of Delivery Note Retrieval by Order ID API on production server:
https://i.materialise.com/api/demo/documents-retrieval-by-order-id-api.htm
This API requires the personal API code. It is therefore not possible to use AJAX requests.
The Delivery Note Retrieval by Order ID API works by posting data to our service.
You can use either XML or JSON formats for posting. The HTTP encoding type of a particular request depends on the type of API you are going to use. This will be described in the corresponding section of this page.
To specify the exact content type which your client can accept and parse, the Accept header in your request has to be set to one of the following encoding types:
• text/json
• text/xml
To retrieve Delivery Note of the order through the Delivery Note Retrieval by Order ID API , POST a well-structured request via “HTTPS” to this URL:
https://i.materialise.com/web-api/order/[Order ID]/delivery-note
To use APIs of the sandbox, the POST needs to be submitted to:
https://imatsandbox.materialise.net/web-api/order/[Order ID]/delivery-note
The API code needs to be specified in the APICode
HTTP header.
The Delivery Note retrieval should be done using GET HTTP Method:
Request Method:GET
Request Method:GET ... Accept:text/json APICode:A1F1BAE8-3F1B-4B8D-8D95-D19E17595034
In case of success, Status Code:200
is shown in the response. In the body of response HTML code is retrieved. If to open it code as html page, you will have option to download delivery note file.
In case of error in the request or when delivery note cannot be retrived, one of following error appears in the response
Code | Message | Description |
---|---|---|
100 | Order ID is wrong | Wrong Order ID was determined in request |
101 | wrong API code | The order was created by using different API code. |
102 | No document | No custom delivery note file is provided by you for this order or is not available |
Example of Response with error in JSON
{ "error":{ "message":"No document", "code":102 } }
Example of Response with error in XML
<DeliveryNoteResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Error> <Message>Order ID is wrong</Message> <Code>100</Code> </Error> </DeliveryNoteResponse>