Migrating to v2 receipts
We are currently rolling out a new way of receiving products in Picqer. The main difference is that, in the new version, products will be added directly to the stock. Whereas before this would happen upon completing the receipt.
A user can change the version of a receipt on a per-receipt basis, which means you’ll have to support both versions simultaneously. Once a receipt has been created and at least one product is received, the version of that specific receipt cannot be changed anymore.
From early 2025 it will no longer be possible to create receipts in the old (v1) way.
Main differences in v2
When viewing receipts:
- Products in the products list are already added to the stock.
- We removed some amount fields, as those numbers did not give a good representation of the current state.
- remarks field is removed, as we support comments on receipts
When creating or updating receipts:
- The flow for adding products is changed
- Expected products can be requested through a new endpoint: /api/v1/receipts/{idreceipt}/expected-products
- Adding products to the receipt does not support the barcode field anymore.
- As products are directly added to the stock, you cannot change added products anymore. Receipt products are immutable, but can be reverted through a new endpoint.
- We removed the mark-all-received endpoint
Changes in the "receipt" resource
You can identify the version of receipt by the version property in the receipt.
One of the main differences in this new resource is that expected products are no longer exposed. Instead, the "products" key exposes the products that are actually received and thus added to the stock.
This new resource is returned in both the collection as the detail endpoint mixed with v1 receipts.
Change | V1 | V2 |
---|---|---|
Added field | version (also added to v1 resource) | version |
Changed field | products.stock_location | products.location |
Removed field | remarks | - |
Removed field | amount_received_excessive | - |
Removed field | products.amount_backorders | - |
Removed field | products.amount_more_than_ordered | - |
Removed field | products.amount_previously_received | - |
Removed field | products.amount_receiving | - |
Removed field | products.candidate_purchaseorders | - |
Removed field | products.locations | - |
Removed field | products.product_locations | - |
Removed field | products.stock | - |
Added field | - | products.created_at |
Added field | - | products.received_by_iduser |
Added field | - | products.reverted_at |
Added field | - | products.reverted_by_iduser |
See a full example of a v2 receipt
Creating and editing receipts
The flow of creating and editing receipts is different in v2. We have a new seperate endpoint to get the expected products, and you can choose a strategy for which purchase order needs to be used. Added products can not be changed or removed, but can be reverted.
See the receiving products section about the new steps.
Deprecated endpoints
The following endpoints will not work for v2 receipts anymore: