Delivery
Set delivery data
POST - https://printenbind.nl/api/v1/delivery/{orderid}
Sets the contact info and sending address for the order.
JSON Params
Property | Type | Description |
---|---|---|
full_address | String | The full delivery address in the format of: [Full name] [Street name] [House number] [Postal code] [City]. Example: 'Printenbind \n Kabelweg 44A \n 1014BB Amsterdam' Note that the newlines are intended and required by the API to read the format. |
name_contact | String | The full name of the contact person. Not required if full_address is set. |
street | String | The streetname of where the product(s) should be delivered. Not required if full_address is set. |
city | String | The city name of where the product(s) should be delivered. Not required if full_address is set. |
streetnumber | String | The streetnumber of where the product(s) should be delivered. Not required if full_address is set. |
zipcode | String | The zipcode of where the product(s) should be delivered. Not required if full_address is set. |
country | String | A valid ISO 3166-1 alpha-2 country code. |
delivery_method | String | The type of the delivery. Possible options are:
|
delivery_option | String | The sub type of the delivery. Not required if delivery_method is set to 'mailbox' or 'international'.
|
delivery_option_data | String | Extra data for the sub type of the delivery. Not required if delivery_option is set to 'local'. This option is optional for delivery_method 'parcel'.
|
blanco | Boolean | Whether to hide the sender address on the package. |
String (optional) | Email address where updates about the delivery will be sent. If not provided the customer default email address will be used. |
Response
Returns a 201 CREATED
response, with as value of the location header the URI to the newly made delivery.
Response Example
date: Fri, 15 Dec 2017 13:17:57 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l x-ratelimit-remaining: 10 content-type: text/html location: delivery/113 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 content-length: 0 status: 201 Created response-text:
Get delivery data
GET - https://printenbind.nl/api/v1/delivery/{orderid}
Gets the current address info of an order.
Response
Property | Type | Description |
---|---|---|
address | String | The contact and delivery info for the order. |
delivery_method | String | The delivery option method for the order. |
delivery_option | String | |
delivery_option_data | String | |
country | String | The country ISO code the sending address is in. |
blanco | Boolean | Whether the sender address is shown on the package or not. |
height | Float | The height of the package in millimeters. |
width | Float | The width of the package in millimeters. |
weight | Float | The weight of the package in gram. |
amount | Float | |
tracktrace_url | String | A track and trace link of your package. |
tracktrace_barcode | String | The PostNL barcode of your delivery. |
String | Email address where updates about the delivery will be sent. | |
customer | JSON | A JSON object containing data of the customer of this delivery.. |
customer.name_contact | String | The full name of the contact person. |
customer.street | String | The streetname of the contact person. |
customer.streetnumber | String | The streetnumber of the contact person. |
customer.zipcode | String | The zipcode of the contact person. |
customer.company | String | The company the contact person belongs to. |
Response Example
date: Fri, 15 Dec 2017 13:18:17 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l transfer-encoding: chunked content-type: application/json x-ratelimit-remaining: 10 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 status: 200 OK response-text: { "address": "Print&Bind\r\Kabelweg 44A\r\n1014BB Amsterdam", "delivery_method": "mailbox", "delivery_option": "local", "delivery_option_data": "", "country": "NL", "height": 7.8, "weight": 77, "width": 210, "amount": 2.95, "tracktrace_url": "https://jouw.postnl.nl/track-and-trace/3SEEFY05445611/NL/1014BB", "tracktrace_barcode": "3SEEFY05445611", "customer": { "name_contact": "Bart", "company": "Print&Bind", "street": "Kabelweg", "streetnumber": "44A", "zipcode": "1014BB", "country": "NL" }, "blanco": 0 }
Get delivery data by order reference
GET - https://printenbind.nl/api/v1/delivery/reference/{orderref}
Gets the current address info of an order.
Response
Property | Type | Description |
---|---|---|
see get delivery data | see get delivery data | see get delivery data |
Response Example
date: Fri, 15 Dec 2017 13:18:17 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l transfer-encoding: chunked content-type: application/json x-ratelimit-remaining: 10 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 status: 200 OK response-text: { <see get delivery data> }
Update delivery data
PUT - https://printenbind.nl/api/v1/delivery/{orderid}
Updates the delivery info of an order. Atleast one of the JSON parameters have to be specified.
JSON Params
Property | Type | Description |
---|---|---|
name_contact | String | The full name of the contact person. |
street | String | The streetname of where the product(s) should be delivered |
city | String | The city name of where the product(s) should be delivered |
streetnumber | String | The streetnumber of where the product(s) should be delivered |
zipcode | String | The zipcode of where the product(s) should be delivered |
country | String | The country of where the product(s) should be delivered |
delivery_method | String | The type of the delivery. Possible options are:
|
delivery_option | String | The sub type of the delivery. Not required if delivery_method is set to 'mailbox' or 'international'.
|
delivery_option_data | String | Extra data for the sub type of the delivery. Not required if delivery_option is set to 'local'. This option is optional for delivery_method 'parcel'.
|
blanco | String | Whether to hide the sender address on the package. |
String | Email address where updates about the delivery will be sent. If not provided the customer default email address will be used. |
Response
Returns an empty 204 NO CONTENT
response on success.
Response Example
date: Fri, 15 Dec 2017 13:19:03 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l x-ratelimit-remaining: 10 content-type: text/html location: delivery/113 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 content-length: 0 status: 204 NO CONTENT response-text: