barcodebuddy
barcodebuddy copied to clipboard
Custom webhook lookup provider
This is based on the work I did in https://github.com/Forceu/barcodebuddy/pull/285
That allows the user to use webhooks to look up products. Those could be make.com / n8n automations etc.
Each webhook is expected to accept a barcode query param with the scanned barcode. Each webhook is expected to return a JSON object like this:
{
"lookups": [
{
"name": "Product name",
"genericName": "Generic Product Name"
},
{...}
]
}
If more than one lookup is present the first one is the suggested one, the others are treated as BBuddy Federation alt names.
Webhooks are queried from top to bottom and the providers concludes once it gets the first non-empty response.
That again adds flexibility to introduce new lookup providers in much easier fashion :)