Orders

Attributes

The optional fields will be filled based on the selected customer, if fields are empty.

Name Type Required Description
idorder integer generated Unique Picqer reference
idcustomer integer optional Linked to resource Customers, when idcustomer is not given, a guest-order will be created
idtemplate integer optional Linked to resource Templates, if null the default template will be selected
idshippingprovider_profile integer optional The preferred shipping provider profile for this order
orderid integer generated Per-account order number
deliveryname string optional* Name of delivery address
deliverycontactname string optional Contact name of delivery address
deliveryaddress string optional Address line of delivery address
deliveryaddress2 string optional Second address line. Not accepted by all shipping providers
deliveryzipcode string optional ZIP code of delivery address
deliverycity string optional City of delivery address
deliveryregion string optional Region, province or state of delivery address
deliverycountry string optional* Country of delivery address (needs to be ISO 3166 2-char code)
full_delivery_address string optional Delivery address formatted as they do locally
invoicename string optional* Name of invoice address
invoicecontactname string optional Contact name of invoice address
invoiceaddress string optional Address line of invoice address
invoiceaddress2 string optional Second address line. Not accepted by all invoice providers.
invoicezipcode string optional ZIP code of invoice address
invoicecity string optional City of invoice address
invoiceregion string optional Region, state or province of invoice address
invoicecountry string optional* Country of invoice address (needs to be ISO 3166 2-char code)
full_invoice_address string optional Invoice address formatted as they do locally
telephone string optional Telephone number of the customer
emailaddress string optional Email address of the customer
reference string optional Reference for customer, will be printed on invoice and pickling list
customer_remarks string optional Remarks from the customer, will be printed on pickling and packing list
partialdelivery boolean optional If Picqer AutoSplit is enabled, order can be split over multiple picklists over multiple warehouses. Is disabled, it will wait for all products to be available
discount float optional Discount percentage of order
invoiced boolean optional If this order is already invoiced, set this to true. This will make sure Picqer will not invoice this order.
status string generated Status of the order (concept, processing, completed or cancelled)
warehouses array optional Warehouses that can be used to fulfil this order. If not provided, it will be filled with all warehouses that accept orders.
tags array optional Tags linked to this order
pickup_point_data array optional Information about pickup point for shipping provider See examples for pickup point data
preferred_delivery_date date optional Customer supplied preferred delivery date
language string optional Language used for communication with customer, 'nl' or 'en'
products array required Products in this order
products.idproduct integer required Linked to resource Products
products.amount integer required Amount of products
products.productcode varchar optional Override the productcode
products.name varchar optional Override the name
products.remarks varchar optional Override the description of the product
products.price float optional Override the price
products.idvatgroup integer optional Override the vatgroup, linked to resource Vatgroups

*) These fields are required, but if an idcustomer is provided Picqer will copy these fields from the customer object. Fulfilment customers should always give these fields, because they are creating guest orders without an idcustomer.

Get all orders

GET https://example.picqer.com/api/v1/orders
HTTP/1.1 200 OK [ { "idorder": 6576, "idcustomer": 5633, "idtemplate": 338, "idshippingprovider_profile": null, "orderid": "30130012", "deliveryname": "Triangle B.V.", "deliverycontactname": "Jos Triepels", "deliveryaddress": "Koppeling 15", "deliveryaddress2": null, "deliveryzipcode": "6983 HX", "deliverycity": "Doesburg", "deliveryregion": null, "deliverycountry": "NL", "full_delivery_address": "Triangle B.V.\nJos Triepels\nKoppeling 15\n6983 HX Doesburg\nNederland", "invoicename": "Triangle B.V.", "invoicecontactname": "Crediteurenadministratie", "invoiceaddress": "Koppeling 15", "invoiceaddress2": null, "invoicezipcode": "6983 HX", "invoicecity": "Doesburg", "invoiceregion": null, "invoicecountry": "NL", "full_invoice_address": "Triangle B.V.\nCrediteurenadministratie\nKoppeling 15\n6983 HX Doesburg\nNederland", "telephone": null, "emailaddress": null, "reference": null, "customer_remarks": null, "pickup_point_data": null, "partialdelivery": true, "auto_split": true, "invoiced": false, "preferred_delivery_date": null, "discount": 0, "calculatevat": true, "language": "nl", "status": "processing", "public_status_page": "https://example.picqer.com/s/eB1KLYRIN41p5xt2", "created": "2013-07-17 16:01:42", "updated": "2013-07-17 16:02:14", "warehouses": [ 1829, 2811 ], "products": [ { "idorder_product": 86868, "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 64.46, "amount": 1, "amount_cancelled": 0, "weight": 283, "partof_idorder_product": null, "has_parts": true }, { "idorder_product": 86869, "idproduct": 653, "idvatgroup": 18, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 164.46, "amount": 1, "amount_cancelled": 0, "weight": 1821, "partof_idorder_product": null, "has_parts": true } ], "tags": { "TopWebshop": { "idtag": 1075, "title": "TopWebshop", "color": "#5993be", "inherit": true, "textColor": "#000000" }, "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } }, { "idorder": 6754, "idcustomer": 5633, "orderid": "20130014", "deliveryname": "Triangle B.V.", "deliverycontactname": "Jos Triepels", "deliveryaddress": "Koppeling 15", "deliveryaddress2": null, "deliveryzipcode": "6983 HX", "deliverycity": "Doesburg", "deliveryregion": null, "deliverycountry": "NL", "full_delivery_address": "Triangle B.V.\nJos Triepels\nKoppeling 15\n6983 HX Doesburg\nNederland", "invoicename": "Triangle B.V.", "invoicecontactname": "Crediteurenadministratie", "invoiceaddress": "Koppeling 15", "invoiceaddress2": null, "invoicezipcode": "6983 HX", "invoicecity": "Doesburg", "invoiceregion": null, "invoicecountry": "NL", "full_invoice_address": "Triangle B.V.\nCrediteurenadministratie\nKoppeling 15\n6983 HX Doesburg\nNederland", "telephone": null, "emailaddress": null, "reference": null, "customer_remarks": null, "pickup_point_data": null, "partialdelivery": true, "auto_split": true, "invoiced": false, "preferred_delivery_date": null, "discount": 0, "calculatevat": true, "language": "nl", "status": "processing", "public_status_page": "https://example.picqer.com/s/eB1KLYRIN41p5xt2", "created": "2013-07-17 16:11:42", "updated": "2013-07-17 16:12:14", "warehouses": [ 1829, 2811 ], "products": [ { "idorder_product": 86879, "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 64.46, "amount": 1, "amount_cancelled": 0, "weight": 9828, "partof_idorder_product": null, "has_parts": true }, { "idorder_product": 86880, "idproduct": 653, "idvatgroup": 18, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 164.46, "amount": 1, "amount_cancelled": 0, "weight": 1821, "partof_idorder_product": null, "has_parts": true } ], "tags": { "TopWebshop": { "idtag": 1075, "title": "TopWebshop", "color": "#5993be", "inherit": true, "textColor": "#000000" }, "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } } ]

Filters

You can filter the orders with the following parameters. Add these filters as querystring parameters to the URL.

Attribute Description Example
search Search through the fields orderid, reference, customer name and customer contact name.
sinceid Get the orders with a later idorder then given. 201992
sincedate Get the orders that are added after this date and time. 2015-01-01 12:00:00
orderid Get the orders that have this value as orderid. O2015-29188
status Get the orders that have this status. concept
reference Get the orders that have this value as reference.
idcustomer Get all orders for this customer.
idwarehouse Get the orders that can be delivered from this warehouse.

Get single order

GET https://example.picqer.com/api/v1/orders/{idorder}
HTTP/1.1 200 OK { "idorder": 6576, "idcustomer": 5633, "idtemplate": 323, "idshippingprovider_profile": null, "orderid": "20130012", "deliveryname": "Triangle B.V.", "deliverycontactname": "Jos Triepels", "deliveryaddress": "Koppeling 15", "deliveryaddress2": null, "deliveryzipcode": "6983 HX", "deliverycity": "Doesburg", "deliveryregion": null, "deliverycountry": "NL", "full_delivery_address": "Triangle B.V.\nJos Triepels\nKoppeling 15\n6983 HX Doesburg\nNederland", "invoicename": "Triangle B.V.", "invoicecontactname": "Crediteurenadministratie", "invoiceaddress": "Koppeling 15", "invoiceaddress2": null, "invoicezipcode": "6983 HX", "invoicecity": "Doesburg", "invoiceregion": null, "invoicecountry": "NL", "full_invoice_address": "Triangle B.V.\nCrediteurenadministratie\nKoppeling 15\n6983 HX Doesburg\nNederland", "telephone": null, "emailaddress": null, "reference": null, "customer_remarks": null, "pickup_point_data": null, "partialdelivery": true, "auto_split": true, "invoiced": false, "preferred_delivery_date": null, "discount": 0, "calculatevat": true, "status": "complete", "public_status_page": "https://example.picqer.com/s/eB1KLYRIN41p5xt2", "created": "2013-07-17 16:01:42", "updated": "2013-07-17 16:02:14", "warehouses": [ 1829, 2811 ], "products": [ { "idorder_product": 86868, "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 64.46, "amount": 1, "amount_cancelled": 0, "weight": 0, "partof_idorder_product": null, "has_parts": true }, { "idorder_product": 86879, "idproduct": 653, "idvatgroup": 18, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 164.46, "amount": 1, "amount_cancelled": 0, "weight": 1821, "partof_idorder_product": null, "has_parts": true } ], "tags": { "TopWebshop": { "idtag": 1075, "title": "TopWebshop", "color": "#5993be", "inherit": true, "textColor": "#000000" }, "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } }, "orderfields": [ { "idorderfield": 35, "title": "Klantreferentie", "value": "1029371980276" } ] }

Create new order

POST https://example.picqer.com/api/v1/orders
{ "idcustomer": 5633, "products": [ { "idproduct": 633, "amount": 1 } ], "orderfields": [ { "idorderfield": 35, "value": "1029371980276" } ] }
HTTP/1.1 201 Created { "idorder": 16860, "idcustomer": 5633, "orderid": "20130028", "deliveryname": "Klaassen B.V.", "deliverycontactname": null, "deliveryaddress": "De Koppeling 15a", "deliveryaddress2": null, "deliveryzipcode": "6986 CS", "deliverycity": "Doesburg", "deliveryregion": null, "deliverycountry": "NL", "invoicename": "Klaassen B.V.", "invoicecontactname": null, "invoiceaddress": "De Koppeling 15a", "invoiceaddress2": null, "invoicezipcode": "6986 CS", "invoicecity": "Doesburg", "invoiceregion": null, "invoicecountry": "NL", "reference": null, "partialdelivery": true, "discount": 0, "pickup_point_data": null, "status": "concept", "public_status_page": "https://example.picqer.com/s/eB1KLYRIN41p5xt2", "created": "2013-07-17 21:28:17", "updated": "2013-07-17 21:28:17", "warehouses": [ 1829, 2811 ], "products": [ { "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 54.46, "amount": 1, "weight": 200 } ], "orderfields": [ { "idorderfield": 35, "title": "Klantreferentie", "value": "1029371980276" } ] }

Create an guest order

Example of creating a guest order. Give idcustomer as null, but now you are required to provide the delivery and invoice name and address.

POST https://example.picqer.com/api/v1/orders
{ "idcustomer": null, "deliveryname": "John Strijbos", "deliveryaddress": "Vrije Water 12", "deliveryzipcode": "3928 DM", "deliverycity": "Zeist", "deliverycountry": "nl", "invoicename": "John Strijbos", "invoiceaddress": "Vrije Water 12", "invoicezipcode": "3928 DM", "invoicecity": "Zeist", "invoicecountry": "nl", "products": [ { "idproduct": 633, "amount": 1 } ] }

Update order

You can change the order after you created it. This is helpful if you want to change the delivery address or you want to change the shipping method.

Only a handful of parameters can be changed at the moment: idtemplate, deliveryname, deliverycontactname, deliveryaddress, deliveryaddress2, deliveryzipcode, deliverycity, deliveryregion, deliverycountry, invoicename, invoicecontactname, invoiceaddress, invoiceaddress2, invoicezipcode, invoicecity, invoiceregion, invoicecountry, telephone, emailaddress, calculatevat, discount, pickup_point_data, preferred_delivery_date, customer_remarks, reference, invoiced, idshippingprovider_profile

PUT https://example.picqer.com/api/v1/orders/{idorder}
{ "deliveryname": "Dirksen B.V.", "reference": "Webshop order #9927882", "idshippingprovider_profile": 821 }
HTTP/1.1 200 OK { "idorder": 16860, "idcustomer": 5633, "orderid": "20130028", "deliveryname": "Dirksen B.V.", "deliverycontactname": null, "deliveryaddress": "De Koppeling 15a", "deliveryaddress2": null, "deliveryzipcode": "6986 CS", "deliverycity": "Doesburg", "deliveryregion": null, "deliverycountry": "NL", "invoicename": "Klaassen B.V.", "invoicecontactname": null, "invoiceaddress": "De Koppeling 15a", "invoiceaddress2": null, "invoicezipcode": "6986 CS", "invoicecity": "Doesburg", "deliveryregion": null, "invoicecountry": "NL", "reference": "Webshop order #9927882", "partialdelivery": true, "discount": 0, "pickup_point_data": null, "status": "concept", "public_status_page": "https://example.picqer.com/s/eB1KLYRIN41p5xt2", "idshippingprovider_profile": 821, "created": "2013-07-17 21:28:17", "updated": "2013-07-17 21:28:17", "warehouses": [ 1829, 2811 ], "products": [ { "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 54.46, "amount": 1, "weight": 200 } ], "orderfields": [ { "idorderfield": 35, "title": "Klantreferentie", "value": "1029371980276" } ] }

Process an order

Orders with the status 'concept' can be 'processed'. When you process an order it becomes final and cannot be edited anymore.

With processing Picqer will create a picklist or backorders for this order.

The processing itself will take place in the background after you received the response. This is why you still see the status 'concept' in the response. When you check back in after a minute or two, the order will be processed.

POST https://example.picqer.com/api/v1/orders/{idorder}/process
HTTP/1.1 200 OK { "idorder": 16860, "idcustomer": 5633, "orderid": "20130028", "deliveryname": "Klaassen B.V.", "deliverycontactname": null, "deliveryaddress": "De Koppeling 15a", "deliveryaddress2": null, "deliveryzipcode": "6986 CS", "deliverycity": "Doesburg", "deliveryregion": null, "deliverycountry": "NL", "invoicename": "Klaassen B.V.", "invoicecontactname": null, "invoiceaddress": "De Koppeling 15a", "invoiceaddress2": null, "invoicezipcode": "6986 CS", "invoicecity": "Doesburg", "deliveryregion": null, "invoicecountry": "NL", "reference": null, "partialdelivery": true, "discount": 0, "pickup_point_data": null, "status": "concept", "public_status_page": "https://example.picqer.com/s/eB1KLYRIN41p5xt2", "created": "2013-07-17 21:28:17", "updated": "2013-07-17 21:31:09", "warehouses": [ 1829, 2811 ], "products": [ { "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 54.46, "amount": 1, "weight": 200 } ] }

Reopen an order

When you re-open an order, it will get the 'concept' status again and you can change the order. Only orders that are 'processing' without picklists can be reopend.

POST https://example.picqer.com/api/v1/orders/{idorder}/reopen
HTTP/1.1 200 OK { "idorder": 2918, ... }

Cancel an order (delete)

Only orders with status 'concept' or 'expected' can be removed.

DELETE https://example.picqer.com/api/v1/orders/{idorder}
HTTP/1.1 204 No Content

Forced cancelling

If you really want an order cancelled that is already processing or even completed, you can use the forced method. This will remove any attached picklists, even when they are already picked.

DELETE https://example.picqer.com/api/v1/orders/{idorder}?force=true
HTTP/1.1 204 No Content

Re-open cancelled order

Only orders with status 'cancelled' can be used for undo cancellation.

POST https://example.picqer.com/api/v1/orders/{idorder}/undo-cancellation
HTTP/1.1 200 OK { "idorder": 2918, ... }

Get status per order line

With this call you can get the status of all the order lines in the order. Per product you get the amount of products delivered, how many are in backorder, and how many are waiting to be picked.

GET https://example.picqer.com/api/v1/orders/{idorder}/productstatus
HTTP/1.1 200 OK { "products": [ { "idproduct": 633, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "amount": 1, "delivered": 1, "backorder": 0, "picklist": 0, "allocated": 0 }, { "idproduct": 653, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "amount": 1, "delivered": 0, "backorder": 1, "picklist": 0, "allocated": 0 } ] }

Get notes from an order

Orders can have notes, which will be shown in the interface at the order and picklists. It will also show up on the printed picklists. It will never be shown to the customer.

GET https://example.picqer.com/api/v1/orders/{idorder}/notes
HTTP/1.1 200 OK [ { "idorder_log":285078, "iduser":24, "idorder":119088, "idpicklist":0, "type":"note", "action":null, "description":"This is a special delivery, handle with care!", "details":null, "created_at":"2014-08-21 12:37:06" } ]

Add a note to an order

POST https://example.picqer.com/api/v1/orders/{idorder}/notes
{ "note": "This is a special delivery, handle with care!" }
HTTP/1.1 200 OK { "idorder_log":285078, "iduser":24, "idorder":119088, "idpicklist":0, "type":"note", "action":null, "description":"This is a special delivery, handle with care!", "details":null, "created_at":"2014-08-21 12:37:06" }

Get tags from an order

Orders can have tags linked to them.

GET https://example.picqer.com/api/v1/orders/{idorder}/tags
HTTP/1.1 200 OK [ { "idtag":11, "title":"Winter", "color":"#03008a", "inherit":false, "textColor":"#FFFFFF" }, { "idtag":13, "title":"Hoeden", "color":"#03008a", "inherit":false, "textColor":"#FFFFFF" } ]

Add tag to order

Assosiate a tag with an order.

POST https://example.picqer.com/api/v1/orders/{idorder}/tags
{ "idtag": 223 }
HTTP/1.1 201 Created { "idtag":223, "title":"Zomer", "color":"#03008a", "inherit":false, "textColor":"#FFFFFF" }

Remove tag from order

DELETE https://example.picqer.com/api/v1/orders/{idorder}/tags/{idtag}
HTTP/1.1 204 No Content

Allocate stock to concept order

When an order has the status 'concept', there is no stock reserved for the order. With 'allocating' you can tell Picqer to allocate stock to this order so it is guaranteed that there is stock when you process the order at a later moment.

POST https://example.picqer.com/api/v1/orders/{idorder}/allocate
HTTP/1.1 200 OK { "idorder": 2918, ... }

De-allocate stock from concept order

When an order has allocated stock, you can release that allocation with a de-allocate.

POST https://example.picqer.com/api/v1/orders/{idorder}/deallocate
HTTP/1.1 200 OK { "idorder": 2918, ... }

Products

You can use the endpoint /api/v1/orders/{idorder}/products to only get the details of ordered products for an order.

To add a new product to an existing order, you can POST that product with the following example.

You can only add 1 product per call. Required fields are: idproduct and amount. Picqer will auto-complete the name and price, but you can also override those. You can only add products to an order with status 'concept'.

POST https://example.picqer.com/api/v1/orders/{idorder}/products
{ "idproduct": 1105257, "price": 12.95, "amount": 1 }
HTTP/1.1 200 OK { "idorder_product": 1272513, "idproduct": 1105248, "idvatgroup": 5, "productcode": "AR2954212", "name": "Philips Hue kit", "remarks": null, "price": 12.95, "amount": 1, "amount_cancelled": null, "weight": 1793, "partof_idorder_product": null, "has_parts": null }

To update a product, you can send a PUT request to endpoint /api/v1/orders/{idorder}/products/{idorder_product} to update name, price, amount or remarks. Amounts can only be changed if the order has status 'concept'.

To delete an ordered product, send a DELETE request to endpoint /api/v1/orders/{idorder}/products/{idorder_product}. You can only remove products from an order with the status 'concept'.

Read more Picklists