Generate Barcode
Produce a valid barcode value for a symbology. Code128/Code39/Code93 derive from the SKU when supplied (or a random alphanumeric); retail types (EAN/UPC) return a check-digit-valid number. Never emits an invalid retail code.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Header Parameters
API contract version to target. See the Changelog for what changed in each version.
"2.0.0""2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
"CODE_128" | "EAN_13" | "EAN_8" | "CODE_39" | "CODE_39_VIN" | "CODABAR" | "UPC_A" | "UPC_E" | "INTERLEAVED_2_OF_5" | "STANDARD_2_OF_5" | "CODE_93"Must not be greater than 191 characters.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.flavours.sa/dev/api/v2/products/modifiers/barcode/generate" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "type": "dolor" }'{
"meta": {
"code": 200,
"status": "success",
"message": "Barcode generated successfully."
},
"data": {
"barcode": "7293205432773",
"barcode_type": "EAN_13"
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}Barcode Variants GET
Paginated, searchable list of every barcode-bearing modifier for the export drawer table. Each row carries the owning product (localized name + id), the variant's own localized name and its `kind` (`OPTION` for a product option, `ADD_ON` for an add-on, `ADD_ON_GROUP` for an add-on-group option), the `barcode` value and `barcode_type`, and the `id` the frontend sends back to `/export/product-barcode`. Only rows with a non-empty barcode are returned, scoped to the caller's tenant (market). `search` matches the barcode, the variant name, and the product name. Add-on and add-on-group barcodes are included (the older product-key export dropped them).
Preview Barcode GET
Stream a freshly rendered PNG for a modifier's stored barcode, or for a what-if value/type override, on a white (default) or transparent background. `padding` (boolean, default true) wraps the bars in a uniform quiet-zone margin (white or transparent to match the background); send `padding=0` for bars flush to the edge. Nothing is stored. Responds with image/png bytes.