Files
InvenTree/docs/docs/barcodes/custom.md
T
Oliver 65efa51524 [docs] Report discovery (#12449)
* Adds decorator to mark an attribute for report context discovery

* Update context variables in docs

* Include fields captured against each model type

* Expose more properties

* Image URL tags

* Add more attributes

* Rearrange docs

* Simplify docs

* Enforce type hinting for reportable properties

* Expose more properties for the Order model

* Auto-discover related / linked models

* Remove extra text

* Collapsible blocks

* Reduce boilerplate

* Remove cruft

* Enhance documentation for filename generation

* Cleanup
2026-07-23 21:43:55 +10:00

1.9 KiB

title
title
Custom Barcodes

Custom Barcode Functionality

With the provision of internal and external barcode support, a lot of potential use-cases are already supported directly by InvenTree.

However, if further customization is required, or a bespoke barcode workflow which is not supported already, then this can easily be implemented using the plugin system.

A custom barcode plugin can be used to (for example) perform a particular action when a barcode is scanned.

Scanning a Barcode

To scan (process) a barcode, the barcode data is sent via a POST request to the /api/barcode/ API endpoint.

Barcode Scanning Priority

When a barcode is scanned (sent to the /barcode/scan/ endpoint), each available "plugin" is checked to see if it returns a valid result for the provided barcode data. The first plugin to return a result prevents any further plugins from being checked.

The barcode is tested as follows, in decreasing order of priority:

!!! tip "Plugin Loading Order" The first custom plugin to return a result "wins". As the loading order of custom plugins is not defined (or configurable), take special care if you are running multiple plugins which support barcode actions.

Builtin Supplier Barcode Plugins

InvenTree comes with a few builtin supplier plugins, which handle their respective barcode formats.

Scanning a supplier barcode for a supplied part will link to the corresponding supplier part if the SKU from the barcode could be matched.

The following suppliers (and barcode formats) are currently supported:

  • DigiKey (2D Data Matrix code)
  • Mouser (2D Data Matrix code)
  • LCSC (QR code)
  • TME (QR code & 2D Data Matrix code)