Modules
Barcodes
Look up a scanned code and manage additional and box barcodes.
Overview
The primary barcode is the barcode field of a product and works for every company. With the Barcodes module a product can also have additional codes: the supplier code, an older one or the code of a box. A box code linked to a unit (Box = 12) adds that unit when scanned in the point of sale. GET /v1/products?barcode= matches all of them.
Requires the Barcodes module. An owner or admin turns it on in Settings > Modules. While it is off, every endpoint on this page returns 403 with type permission_error and code module_disabled.
Endpoints
| Method | Path | Permission | Description |
|---|---|---|---|
GET | /v1/products/lookup?code= | read | Product of a code with stock, reserved, available, latest movements and sales |
GET | /v1/products/{id}/barcodes | read | Additional barcodes of a product |
POST | /v1/products/{id}/barcodes | write | Add a code (code, unit_conversion_id) |
DELETE | /v1/products/{id}/barcodes/{code_id} | write | Remove a code |
Look Up a Code
Bash
TypeScript
matchedsays what the code was:barcode,extra(additional or box code) oritem_codeproductisnullwhen no product has the codestockisnullwhen the Inventory module is offsales_summary.weekshas the units sold per week in the last 12 weeks, oldest first