This endpoint is used to generate a barcode image based on the provided parameters. The barcode can be customized in terms of type, scale, height, and inclusion of text.
Method: GET
Query Parameters
- text (required): The text that will be encoded into the barcode.
- bcType (optional): The type of barcode to generate. Default is ‘code128’.
- scale (optional): The scaling factor for the barcode. Default is 3.
- height (optional): The height of the barcode in millimeters. Default is 10.
- includetext (optional): Whether to include human-readable text. Default is true.
- textxalign (optional): The alignment of the text. Default is ‘center’.
How to Make a Call
To use this endpoint, send a GET request to the following URL with the appropriate query parameters:
https://node.nodetrigger.com/generate-barcode?text=<your_text>&bcType=<barcode_type>&scale=<scale_factor>&height=<height_in_mm>&includetext=<true_or_false>&textxalign=<alignment>
Real-life Examples
- Generate a code128 barcode with default settings:
https://node.nodetrigger.com/generate-barcode?text=HelloWorld
- Generate a QR code barcode with custom settings:
https://node.nodetrigger.com/generate-barcode?text=HelloWorld&bcType=qr&scale=2&height=15&includetext=false&textxalign=left