13. Orders

It is possible to use orders as a starting point instead of shipments.

13.A Add Order

13.A.1 Overview

Use this endpoint to create orders. Upon success an HTTP 200 OK with an order response is returned.

13.A.2 Reference

URIhttps://api.myparcel.nl/fulfilment/orders
MethodsPOST
Required request headersAuthorization: bearer BASE64(API_KEY)
Content-Type: application/json;charset=utf-8
URI parametersNone.
Query parametersNone.
Request bodyarray of Order objects.
ResponseHTTP 200 OK
Response bodyarray of Order objects with UUIDs
Error responseHTTP 4xx
Error response bodyError

13.A.3 Examples

Create order

13.B Get Order

13.B.1 Overview

Use this endpoint to retrieve orders. Upon success an HTTP 200 OK with an order response is returned.

13.B.2 Reference

URIhttps://api.myparcel.nl/fulfilment/orders
MethodsGET
Required request headersAuthorization: bearer BASE64(API_KEY)
URI parametersuuid
Query parametersq = string
status = order_status
from = timestamp
to = timestamp
page = integer
per_page = integer
barcode = string
Request bodyNone.
ResponseHTTP 200 OK
Response bodyarray of Order objects
Error responseHTTP 4xx
Error response bodyError

13.B.3 Parameters

id
Data type: uuid
This is the order id. You can specify multiple order ids by semicolon separating them on the URI.

q
Data type: string
Use this parameter to search through all the fields of an order object including the embedded objects

status
Data type: order_status
Use this parameter to specify the order status to filter on. You can specify multiple status by semicolon separating them on the URI.

from
Data type: date
Use this parameter to filter on the order creation date. This filter will set the lower bound of the date search range.

to
Data type: date
Use this parameter to filter on the order creation date. This filter will set the upper bound of the date search range.

page
Data type: integer
Page number. Defaults to 1.

per_page
Data type: integer
Items per page. Defaults to 10.

barcode Data type: string Use this parameter to filter on the barcode of the order-shipment.

13.B.4 Examples

Search order

13.C Edit Order

13.C.1 Overview

Use this endpoint to edit orders. Upon success an HTTP 200 OK with an order response is returned.

13.C.2 Reference

URIhttps://api.myparcel.nl/fulfilment/orders
MethodsPUT
Required request headersAuthorization: bearer BASE64(API_KEY)
Content-Type: application/json;charset=utf-8
URI parametersNone.
Query parametersNone.
Request bodyarray of Order objects.
ResponseHTTP 200 OK
Response bodyarray of Order objects with uuid's
Error responseHTTP 4xx
Error response bodyError

13.C.3.Example

Edit order

13.D Delete Order

Deleting orders can only be done for orders with (order-status open (Open)).

13.D.1 Overview

Use this link to remove orders. You can specify multiple order ids by semicolon separating them on the URL. Only orders with order-status open (Open) can be deleted. This method returns HTTP 204 No Content if successful. If the order doesn't exist a HTTP 422 Unprocessable Entity is returned.

13.D.2 Reference

URIhttps://api.myparcel.nl/fulfilment/orders/id[;id]
MethodsDELETE
Required request headersAuthorization: bearer BASE64(API_KEY)
Content-Type: application/json;charset=utf-8
URI parametersid = Order.id
Query parametersNone.
Request bodyNone.
ResponseHTTP 204 No Content
Response bodyNone.
Error responseHTTP 4xx
Error response bodyError

13.D.3 Parameters

id
Data type: uuid
The id of the order to delete. You can specify multiple orders by semicolon separating them.

13.D.4 Examples

Remove an order with id 3f86a6d1-6607-45a8-a815-13048fc18d7b.

13.E Packing slips

Use this endpoint to create packing slips of one or multiple orders. This can be done synchronously and asynchronously by choosing the correct accept header. When chosen for synchronous, a maximum of 5 packing slips can be created. For asynchronous no limit is set.

Upon error HTTP 4xx with a response body containing an Error is returned.

If you want to retrieve more than 5 packing slips in one response, you can use Accept: application/json;charset=utf8. You will receive a URL to the packing slips, but the label is not immediately available and will return an HTTP 404 Not Found until it is ready.

13.E.2 Reference

URIhttps://api.myparcel.nl/fulfilment/orders/id[;id]/packing_slip
MethodsGET
Required request headersAuthorization: bearer BASE64(API_KEY)
Accept: application/pdf;charset=utf-8
(For the PDF binary. This is the default.) For processing max 5 packing slips.
Accept: application/json;charset=utf-8
(For the download link.) For processing more than 5 packing slips.
URI parametersid = Order.id
Query parametersNone.
Request bodyNone.
ResponseHTTP 200 OK
Content-Disposition: attachment; filename="PDF_FILE"
Content-Type: application/pdf
or
HTTP 200 OK
Content-Type: application/json
Response bodyShipment label PDF.
or
Download link.
Error responseHTTP 4xx
Error response bodyError

13.E.3 Parameters

id
Data type: uuid
The id of the order for which the packing slip is created. You can specify multiple orders by semicolon separating them.

13.D.4 Examples

Create packing slips for orders with id 3f86a6d1-6607-45a8-a815-13048fc18d7b and 6ba9d50c-4851-4ccd-bae7-68bba0f7349a.

Edit this page
Last updated: 
Contributors Peter-MyParcel