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 required Linked to resource Customers
orderid integer generated Per-account order number
deliveryname string optional Name of delivery address
deliverycontact string optional Contact name of delivery address
deliveryaddress string optional Address rule of delivery address
deliveryaddress2 string optional Second address rule. Not accepted by all shipping providers
deliveryzipcode string optional ZIP code of delivery address
deliverycity string optional City of delivery address
deliverycountry string optional Country of delivery address (needs to be ISO 3166 2-char code)
invoicename string optional Name of invoice address
invoicecontact string optional Contact name of invoice address
invoiceaddress string optional Address rule of invoice address
invoiceaddress2 string optional Second address rule. Not accepted by all invoice providers.
invoicezipcode string optional ZIP code of invoice address
invoicecity string optional City of invoice address
invoicecountry string optional Country of invoice address (needs to be ISO 3166 2-char code)
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
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.
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
pickup_point_data array optional Information about pickup point for shipping provider See examples for pickup point data

Get all orders

GET https://example.picqer.com/api/v1/orders
HTTP/1.1 200 OK [ { "idorder": 6576, "idcustomer": 5633, "orderid": "20130012", "deliveryname": "Triangle B.V.", "deliverycontactname": "Jos Triepels", "deliveryaddress": "Koppeling 15", "deliveryaddress2": null, "deliveryzipcode": "6983 HX", "deliverycity": "Doesburg", "deliverycountry": "NL", "invoicename": "Triangle B.V.", "invoicecontactname": "Crediteurenadministratie", "invoiceaddress": "Koppeling 15", "invoiceaddress2": null, "invoicezipcode": "6983 HX", "invoicecity": "Doesburg", "invoicecountry": "NL", "reference": "", "partialdelivery": true, "discount": 15.60, "pickup_point_data": null, "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": [ { "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 64.46, "amount": 1, "weight": 9828 }, { "idproduct": 653, "idvatgroup": 18, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 164.46, "amount": 1, "weight": 1821 } ], "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", "deliverycountry": "NL", "invoicename": "Triangle B.V.", "invoicecontactname": "Crediteurenadministratie", "invoiceaddress": "Koppeling 15", "invoiceaddress2": null, "invoicezipcode": "6983 HX", "invoicecity": "Doesburg", "invoicecountry": "NL", "reference": "", "partialdelivery": true, "discount": 0, "pickup_point_data": null, "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": [ { "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 64.46, "amount": 1, "weight": 9828 }, { "idproduct": 653, "idvatgroup": 18, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 164.46, "amount": 1, "weight": 1821 } ], "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
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, "orderid": "20130012", "deliveryname": "Triangle B.V.", "deliverycontactname": "Jos Triepels", "deliveryaddress": "Koppeling 15", "deliveryaddress2": null, "deliveryzipcode": "6983 HX", "deliverycity": "Doesburg", "deliverycountry": "NL", "invoicename": "Triangle B.V.", "invoicecontactname": "Crediteurenadministratie", "invoiceaddress": "Koppeling 15", "invoiceaddress2": null, "invoicezipcode": "6983 HX", "invoicecity": "Doesburg", "invoicecountry": "NL", "reference": "", "partialdelivery": true, "discount": 15.60, "pickup_point_data": null, "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": [ { "idproduct": 633, "idvatgroup": 18, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 64.46, "amount": 1, "weight": 9828 }, { "idproduct": 653, "idvatgroup": 18, "productcode": "6531-RE", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "remarks": "", "price": 164.46, "amount": 1, "weight": 1821 } ], "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", "deliverycountry": "NL", "invoicename": "Klaassen B.V.", "invoicecontactname": null, "invoiceaddress": "De Koppeling 15a", "invoiceaddress2": null, "invoicezipcode": "6986 CS", "invoicecity": "Doesburg", "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" } ] }

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, deliverycountry, invoicename, invoicecontactname, invoiceaddress, invoiceaddress2, invoicezipcode, invoicecity, invoicecountry, telephone, emailaddress, calculatevat, discount, pickup_point_data, 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", "deliverycountry": "NL", "invoicename": "Klaassen B.V.", "invoicecontactname": null, "invoiceaddress": "De Koppeling 15a", "invoiceaddress2": null, "invoicezipcode": "6986 CS", "invoicecity": "Doesburg", "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

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

When an order is processed, the needed picklists and backorders will be generated.

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", "deliverycountry": "NL", "invoicename": "Klaassen B.V.", "invoicecontactname": null, "invoiceaddress": "De Koppeling 15a", "invoiceaddress2": null, "invoicezipcode": "6986 CS", "invoicecity": "Doesburg", "invoicecountry": "NL", "reference": null, "partialdelivery": true, "discount": 0, "pickup_point_data": null, "status": "processing", "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 } ] }

Delete an order

Only 'new' orders can be deleted.

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

Get status per order rule

With this call you can get the status of all the order rules 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 } ] }

Add a note to 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.

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.

PUT 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.

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