Wegens succes wederom beschikbaar! Profiteer van 20% korting met productiewijze 'Extra Budget' (t/m 22 dec)

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_addressStringThe 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_contactStringThe full name of the contact person. Not required if full_address is set.
streetStringThe streetname of where the product(s) should be delivered. Not required if full_address is set.
cityStringThe city name of where the product(s) should be delivered. Not required if full_address is set.
streetnumberStringThe streetnumber of where the product(s) should be delivered. Not required if full_address is set.
zipcodeStringThe zipcode of where the product(s) should be delivered. Not required if full_address is set.
countryStringA valid ISO 3166-1 alpha-2 country code.
delivery_methodStringThe type of the delivery. Possible options are:
  • post (system will decide between 'mailbox' or 'parcel')
  • mailbox (returns an error if the package doesn't fit the mailbox)
  • parcel
  • pickup
  • international
delivery_optionStringThe sub type of the delivery. Not required if delivery_method is set to 'mailbox' or 'international'.
  • parcel
    • standard
    • evening
    • garanteed
    • morning_10
  • pickup
delivery_option_dataStringExtra 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'.
  • parcel
    • not_neighbours
    • signed
  • pickup
    • local (pickup the package at the Print&Bind office)
    • amsterdam (pickup points information)
      • polder
      • paleis
      • vuboekhandel
      • sportcentrumvu
      • houseofwatt
      • jackdish
blancoBooleanWhether to hide the sender address on the package.
emailString (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
addressStringThe contact and delivery info for the order.
delivery_methodStringThe delivery option method for the order.
delivery_optionString
delivery_option_dataString
countryStringThe country ISO code the sending address is in.
blancoBooleanWhether the sender address is shown on the package or not.
heightFloatThe height of the package in millimeters.
widthFloatThe width of the package in millimeters.
weightFloatThe weight of the package in gram.
amountFloat
tracktrace_urlStringA track and trace link of your package.
tracktrace_barcodeStringThe PostNL barcode of your delivery.
emailStringEmail address where updates about the delivery will be sent.
customerJSONA JSON object containing data of the customer of this delivery..
customer.name_contactStringThe full name of the contact person.
customer.streetStringThe streetname of the contact person.
customer.streetnumberStringThe streetnumber of the contact person.
customer.zipcodeStringThe zipcode of the contact person.
customer.companyStringThe 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 datasee get delivery datasee 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_contactStringThe full name of the contact person.
streetStringThe streetname of where the product(s) should be delivered
cityStringThe city name of where the product(s) should be delivered
streetnumberStringThe streetnumber of where the product(s) should be delivered
zipcodeStringThe zipcode of where the product(s) should be delivered
countryStringThe country of where the product(s) should be delivered
delivery_methodStringThe type of the delivery. Possible options are:
  • post (system will decide between 'mailbox' or 'parcel')
  • mailbox (returns an error if the package doesn't fit the mailbox)
  • parcel
  • pickup
  • international
delivery_optionStringThe sub type of the delivery. Not required if delivery_method is set to 'mailbox' or 'international'.
  • parcel
    • standard
    • evening
    • garanteed
    • morning_10
  • pickup
delivery_option_dataStringExtra 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'.
  • parcel
    • not_neighbours
    • signed
  • pickup
    • local (pickup the package at the Print&Bind office)
    • amsterdam (pickup points information)
      • polder
      • paleis
      • vuboekhandel
      • sportcentrumvu
      • houseofwatt
      • jackdish
blancoStringWhether to hide the sender address on the package.
emailStringEmail 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: