Generating a barcode

You can generate a code in the bot and send it to the client

To generate a code, you need to use the function https://store.salebot.ai/function/barcode_generator

Parameters:

text_for_qr - text that needs to be coded api_key - API access key from the project’s settings

class - the code class you need to generate. By default it’s ea13. Can take these values: 'code39', 'code128', 'ean', 'ean13', 'ean8', 'gs1', 'gtin', 'isbn', 'isbn10', 'isbn13', 'issn', 'jan', 'pzn', 'upc', 'upca'

without_text - (an optional parameter) if you convey it with any value then the barcode will be shown without the text or like in the image below

Change #{api_key} to the token from settings

Example: {"text":"#{barcode}","api_key":"#{api_key}", "class": "ean13"}

The function returns json with parameters status and qr_image_url if successful and error_message if unsuccessful

In the example text for coding lies in the variable barcode and the variable image_url sends as an image

Last updated