Receipts, receiving purchases

With "Receipts" you register received purchase orders.

Receipts can be linked to a specific purchase order or to a supplier to register received products from multiple purchase orders.

You can also receive products that are not on purchase orders. Picqer will then create a new purchase order with the products that are received that were not purchased.

Receipts with v1 are deprecated

Still using v1 of the receipts API? Please migrate to the v2 API, as v1 will be phased out in 2026.

See the migration guide for the technical and conceptual changes.

The rest of this page only describes v2 receipts.

Attributes

Name Type Required Description
idreceipt integer generated Unique Picqer reference
idwarehouse integer optional Linked to resource Warehouses. If you do not provide a idwarehouse, we will select the first warehouse.
version integer optional The version of this receipt (currently 1 or 2).
supplier array optional* Linked to resource Suppliers. Either a supplier or a purchase order is required.
purchaseorder array optional* Linked to resource Purchase orders. Either a supplier or a purchase order is required.
receiptid string generated Per-account receipt number
status string read-only Status of receipt: processing or completed
completed_by array optional* User that completed the receipt, empty when the receipt is not yet completed.
completed_by.iduser integer read-only Unique Picqer reference of the user that completed the receipt.
completed_by.name string read-only The name of the user that completed the receipt
amount_received integer read-only Amount of products in this receipt
completed_at string read-only Datetime that this receipt is completed
created string read-only Datetime that this receipt is created
products array required Products in this receipt
products.idreceipt_product integer generated Unique id of this line item
products.idpurchaseorder_product integer read-only Linked to line of purchase order, the product that is being received
products.idproduct integer required Linked to resource Products
products.idpurchaseorder integer read-only Linked to resource Purchase order, as each product can come from a different purchase order
products.productcode string read-only Productcode of product
products.name string read-only Name of product
products.amount integer required Amount that is being received in this receipt
products.amount_ordered integer read-only Amount that was ordered in the purchase order
products.added_by_receipt boolean read-only False if this product was originally ordered, true if this product was added by this receipt
products.location array read-only Currently linked location to add the stock to on receiving
products.created_at string read-only The datetime a product is received
products.received_by_iduser integer read-only The iduser who registered this product
products.reverted_at string read-only The datetime this product is reverted
products.reverted_by_iduser integer read-only The iduser who reverted this product

Get all receipts

GET https://example.picqer.com/api/v1/receipts
HTTP/1.1 200 OK [ { "idreceipt": 469364, "idwarehouse": 18, "version": 1, "supplier": { "idsupplier": 55151, "name": "Schoenmaker Kramer" }, "purchaseorder": { "idpurchaseorder": 612084, "purchaseorderid": "20201023" }, "receiptid": "RC2020-1071", "status": "processing", "remarks": null, "completed_by": null, "amount_received": 5, "amount_received_excessive": 0, "completed_at": null, "created": "2020-11-11 14:18:42", "updated": "2020-11-11 14:18:42", "products": [ { "idreceipt_product": 14959405, "idpurchaseorder_product": 9473892, "idproduct": 13177709, "idpurchaseorder": 612084, "productcode": "AA568904", "productcode_supplier": "SEC-AA568904", "name": "Secrid Eco Drive Calculator Lumix", "barcode": "5480962989264", "amount": 0, "amount_ordered": 5, "amount_receiving": 0, "added_by_receipt": false, "abc_classification": null }, { "idreceipt_product": 14959407, "idpurchaseorder_product": 9473893, "idproduct": 13177679, "idpurchaseorder": 612084, "productcode": "AT298759", "productcode_supplier": "NES-AT298759", "name": "Nestle Watch Graphing Lumix S", "barcode": "3376627429184", "amount": 3, "amount_ordered": 5, "amount_receiving": 0, "added_by_receipt": false, "abc_classification": null } ] }, ... ]
This endpoint uses pagination.

Filters

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

Attribute Description Example
receiptid Get the receipt that have this value as receiptid. RC2022-1003
status Only receipts with this status processing
idpurchaseorder Receipts for this purchase order.
idsupplier Receipts for this supplier.
updated_after Get the receipts that are changed since this date and time. 2022-01-01 16:00:00
completed_after Get the receipts that are completed since this date and time. 2022-01-01 16:00:00
include_indirect_receipts In combination with idpurchaseorder, if true, this will return all receipts that received products from this purchase order. Including receipts that are linked to multiple orders. Without this key, only receipts that are directly linked to this purchase order will be returned. true

Get single receipt

Products in a receipt are already received and added to the stock. Use expected products to get which products are still expected to be registered.

GET https://example.picqer.com/api/v1/receipts/{idreceipt}
HTTP/1.1 200 OK { "idreceipt": 469364, "receiptid": "RC2020-1071", "idwarehouse": 18, "version": 2, "status": "processing", "supplier": { "idsupplier": 55151, "name": "Schoenmaker Kramer" }, "purchaseorder": { "idpurchaseorder": 612084, "purchaseorderid": "20201023" }, "remarks": null, "completed_by": null, "amount_received": 1, "completed_at": null, "created": "2020-11-11 14:18:42", "updated": "2020-11-11 14:18:42", "products": [ { "idreceipt_product": 14959405, "idpurchaseorder_product": 9473892, "idproduct": 13177709, "idpurchaseorder": 612084, "productcode": "AA568904", "productcode_supplier": "SEC-AA568904", "name": "Secrid Eco Drive Calculator Lumix", "barcode": "5480962989264", "amount": 1, "amount_ordered": 5, "added_by_receipt": false, "abc_classification": null, "received_by_iduser: 1, "reverted_at": null, "reverted_by_iduser": null, "image": null, "location": { "idlocation": 2059474, "idwarehouse": 18, "parent_idlocation": 2059472, "type": "location", "name": "A.2.1.2", "remarks": null, "unlink_on_empty": false, "location_type": { "idlocation_type": 1, "name": "Standaard", "default": true, "color": "#0000f0" }, "is_bulk_location": false } } ] }

Receiving products

The steps to receive products via the API are:

Create a new receipt

You can create a receipt for a purchase order by providing 'idpurchaseorder', or for a supplier by providing 'idsupplier'.

POST https://example.picqer.com/api/v1/receipts
{ "idpurchaseorder": 666379, "version": 2 }
HTTP/1.1 201 Created { "idreceipt": 469364, "receiptid": "RC2020-1071", "idwarehouse": 18, "version": 2, "status": "processing", "supplier": { "idsupplier": 55151, "name": "Schoenmaker Kramer" }, "purchaseorder": { "idpurchaseorder": 612084, "purchaseorderid": "20201023" }, "remarks": null, "completed_by": null, "amount_received": 0, "completed_at": null, "created": "2020-11-11 14:18:42", "updated": "2020-11-11 14:18:42", "products": [] }

Get expected products

This endpoint returns the expected-products, including the strategies that you can use to receive this product. See "Add product" to find out more on using these strategies.

GET https://example.picqer.com/api/v1/receipts/{idreceipt}/expected-products
HTTP/1.1 200 OK [ { "product": { "idproduct": 114, "idvatgroup": 1, "idsupplier": 4, "productcode": "0195949018510", "name": "Apple iPhone 15 Pro", "price": 1000, "fixedstockprice": 0, "productcode_supplier": "", "deliverytime": 0, "description": "", "barcode": "", "unlimitedstock": false, "assembled": false, "type": "normal", "weight": 0, "length": null, "width": null, "height": null, "minimum_purchase_quantity": 0, "purchase_in_quantities_of": 0, "hs_code": "", "country_of_origin": "", "show_on_portal": true, "active": true, "comment_count": 0, "analysis_abc_classification": null, "analysis_pick_amount_per_day": null, "tags": {}, "productfields": [], "images": [], "stock": [], "pricelists": [] }, "totals": { "expected": 10, "received": 5, "remaining": 5 }, "strategies": [ { "strategy": "automatic", "parameters": {}, "ordered": 10, "received": 5, "remaining": 5 }, { "strategy": "purchaseorder_product", "parameters": { "idpurchaseorder_product": 572 }, "purchaseorderid": "PO2024-1163", "ordered": 10, "received": 5, "remaining": 5 }, { "strategy": "new", "parameters": {}, "idpurchaseorder": null, "purchaseorderid": null } ] } ]

You can also request the applicable strategies for a specific product by providing an 'idproduct'.

GET https://example.picqer.com/api/v1/receipts/{idreceipt}/expected-products/{idproduct}
HTTP/1.1 200 OK { "product": { "idproduct": 114, "idvatgroup": 1, "idsupplier": 4, "productcode": "0195949018510", "name": "Apple iPhone 15 Pro", "price": 1000, "fixedstockprice": 0, "productcode_supplier": "", "deliverytime": 0, "description": "", "barcode": "", "unlimitedstock": false, "assembled": false, "type": "normal", "weight": 0, "length": null, "width": null, "height": null, "minimum_purchase_quantity": 0, "purchase_in_quantities_of": 0, "hs_code": "", "country_of_origin": "", "show_on_portal": true, "active": true, "comment_count": 0, "analysis_abc_classification": null, "analysis_pick_amount_per_day": null, "tags": {}, "productfields": [], "images": [], "stock": [], "pricelists": [] }, "totals": { "expected": 10, "received": 5, "remaining": 5 }, "strategies": [ { "strategy": "automatic", "parameters": {}, "ordered": 10, "received": 5, "remaining": 5 }, { "strategy": "purchaseorder_product", "parameters": { "idpurchaseorder_product": 572 }, "purchaseorderid": "PO2024-1163", "ordered": 10, "received": 5, "remaining": 5 }, { "strategy": "new", "parameters": {}, "idpurchaseorder": null, "purchaseorderid": null } ] } ]

Add product

You can receive a product by providing the associated purchase-order product. The amount and location will be used to directly add the product to the stock at the given location, this can also be a container.

POST https://example.picqer.com/api/v1/receipts/{idreceipt}/products
{ "idproduct": 78, "idpurchaseorder_product": 493, "amount": 1, "idlocation": 664 }
HTTP/1.1 200 OK [ { "idreceipt_product": 946, "idpurchaseorder": 113, "idpurchaseorder_product": 493, "idproduct": 78, "purchaseorderid": "PO2024-1112", "productcode": "AU605533", "productcode_supplier": "APP-AU605533", "name": "Apple Watch Color", "barcode": "4728410784335", "abc_classification": null, "image": null, "amount": 1, "amount_ordered": 10, "added_by_receipt": false, "received_by_iduser: 1, "reverted_at": null, "reverted_by_iduser": null, "location": { "idlocation": 664, "idwarehouse": 1, "type": "container", "name": "Container 2", "remarks": "" } } ]

You can use different strategies for selecting the purchase order when adding a product to a receipt.

There are 3 strategies:

  1. purchaseorder_product (default) - This strategy will register the amount on a specific purchaseorder product. Provide the idpurchaseorder_product in the request.
  2. automatic - This strategy will automatically divide the amount over open purchaseorder products. This strategy is only relevant for receipts not based on a specific purchase order.
  3. new - This strategy will add the product to either the linked purchase order or a freshly created purchase order for excessive products.

Since the automatic strategy can result in multiple entries for different purchase order products the response has a collection of receipt-products instead of a single receipt-product.

To use a strategy other than purchaseorder_product:

POST https://example.picqer.com/api/v1/receipts/{idreceipt}/products
{ "idproduct": 78, "strategy": "automatic", "amount": 10, "idlocation": 664 }
HTTP/1.1 200 OK [ { "idreceipt_product": 946, "idpurchaseorder": 113, "idpurchaseorder_product": 493, "idproduct": 78, "purchaseorderid": "PO2024-1112", "productcode": "AU605533", "productcode_supplier": "APP-AU605533", "name": "Apple Watch Color", "barcode": "4728410784335", "abc_classification": null, "image": null, "amount": 5, "amount_ordered": 10, "added_by_receipt": false, "received_by_iduser: 1, "reverted_at": null, "reverted_by_iduser": null, "location": { "idlocation": 664, "idwarehouse": 1, "type": "container", "name": "Container 2", "remarks": "" } }, { "idreceipt_product": 947, "idpurchaseorder": 114, "idpurchaseorder_product": 494, "idproduct": 78, "purchaseorderid": "PO2024-1113", "productcode": "AU605533", "productcode_supplier": "APP-AU605533", "name": "Apple Watch Color", "barcode": "4728410784335", "abc_classification": null, "image": null, "amount": 5, "amount_ordered": 5, "added_by_receipt": false, "received_by_iduser: 1, "reverted_at": null, "reverted_by_iduser": null, "location": { "idlocation": 664, "idwarehouse": 1, "type": "container", "name": "Container 2", "remarks": "" } }, ]

Revert product

You can revert a received product only when the stock is still available, this will decrease the stock by the received amount and will mark the receipt-product as reverted.

POST https://example.picqer.com/api/v1/receipts/{idreceipt}/products/{idreceipt_product}/revert
HTTP/1.1 200 OK { "idreceipt_product": 946, "idpurchaseorder": 113, "idpurchaseorder_product": 493, "idproduct": 78, "purchaseorderid": "PO2024-1112", "productcode": "AU605533", "productcode_supplier": "APP-AU605533", "name": "Apple Watch Color", "barcode": "4728410784335", "abc_classification": null, "image": null, "amount": 1, "amount_ordered": 10, "added_by_receipt": false, "received_by_iduser: 1, "reverted_at": "2024-03-11 10:09", "reverted_by_iduser": 1243, "location": { "idlocation": 664, "idwarehouse": 1, "type": "container", "name": "Container 2", "remarks": "" } }

Complete receipt

If you complete a receipt, we will set the status to "completed". For v1 receipts, products are added to the stock at this point.

As a response you do not see the status changed, this will be done in the background. If you retrieve the receipt again, you see status changed to 'completed' and the user and date of the completion filled.

PUT https://example.picqer.com/api/v1/receipts/{idreceipt}
{ "status": "completed" }
HTTP/1.1 200 OK { "idreceipt": 496349, "idwarehouse": 18, "version": 1, "supplier": { "idsupplier": 63386, "name": "Heiku" }, "purchaseorder": { "idpurchaseorder": 666379, "purchaseorderid": "20201024" }, "receiptid": "RC2020-1073", "status": "processing", "remarks": null, "completed_by": null, "amount_received": 4, "amount_received_excessive": 4, "completed_at": null, "created": "2020-11-27 12:03:43", "updated": "2020-11-27 12:03:43", "products": [ ... ] }

Delete receipt

Only receipts where not a single product is received can be deleted.

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

Comments

Comments are supported on receipts.

Read more Returns