Naar de inhoud

Reference

Orders

Attributes

Name Type Required Description
id string generated Unique reference
reference string optional Reference of the order
recipient.company_name string optional Company name
recipient.first_name string required First name
recipient.last_name string required Last name
recipient.street string required Street name
recipient.house_number string required House number
recipient.house_number_extension string optional House number extension
recipient.address_line_2 string optional Optional second address line
recipient.zipcode string required Zipcode
recipient.city string required City
recipient.state string optional State
recipient.country string required Country (needs to be ISO 3166 2-char code)
recipient.email string optional E-mail address
recipient.phone string optional Phone number
desired_shipping_method string optional Desired shipping method, this can be used to trigger order rules to assign a carrier service for example
products array optional Array with one or multiple products
products.name string required Name of product
products.product_code string required Product code of product
products.weight integer optional Product weight in grams
products.price_including_vat float optional Price including VAT of product
products.price_excluding_vat float optional Price excluding VAT of product
products.quantity integer required Amount of products
products.weight integer optional Weight of product in grams
ordered_at date optional YYYY-mm-dd
delivery_date date optional YYYY-mm-dd
pickup_point_id string optional Pickup point ID of carrier
pickup_point_type string optional
pickup_point_carrier string optional

Create new order

POST https://dashboard.pakketpartner.nl/api/v1/orders

request

{ “recipient”: { “company”: “Pakketpartner”, “first_name”: “Jan”, “last_name”: “Jansen”, “street”: “Kerkstraat”, “house_number”: “42”, “zipcode”: “6941 AH”, “city”: “Didam”, “country”: “nl”, “phone”: “0316220266”, “email”: “info@pakketpartner.nl” }, “products”: [{ “name”: “Test product”, “product_code”: “TEST124”, “quantity”: 1, “price_including_vat”: 10, “price_excluding_vat”: 8, “weight”: 1500 }], “order_date”: “2023-03-21”, “delivery_date”: “2023-04-04”, “customer_remarks”: “Testing..”, “reference”: “Order #1234”, “desired_shipping_method”: “Avondlevering” } successful response

HTTP/1.1 200 OK { “data”: { “id”: 255, “ordered_at”: “2023-03-21”, “shipping_company”: “”, “shipping_first_name”: “Jan”, “shipping_last_name”: “Jansen”, “shipping_phone”: “+31 316220266”, “shipping_email”: “info@pakketpartner.nl”, “shipping_street”: “Kerkstraat”, “shipping_house_number”: “42”, “shipping_house_number_extension”: “”, “shipping_address_line_2”: “”, “shipping_city”: “Didam”, “shipping_state”: null, “shipping_zipcode”: “6941 AH”, “shipping_country”: “nl”, “pickup_point”: null, “shipping_method_name”: “Avondlevering”, “delivery_date”: “2023-04-04”, “products”: [ { “name”: “Test product”, “product_code”: “TEST124”, “price_including_vat”: 10, “price_excluding_vat”: 8, “quantity”: 1, “weight”: 1500, “hs_code”: null, “country_of_origin”: null } ], “reference”: “Order #1234”, “customer_remarks”: “Testing..” } } error response

HTTP/1.1 422 Bad request { “message”: “The given data was invalid.”, “errors”: { “reference”: [ “Referentie is verplicht.” ] } }