/generate-barcode

This API endpoint allows you to generate barcodes from a given text. You can customize the barcode by specifying various parameters such as the type of barcode, scale, and whether to include the text below the barcode. Additionally, you have the option to replace certain placeholders in the text before the barcode is generated.

Endpoint Information

  • Method: POST
  • Endpoint URL: https://node.nodetrigger.com/api/generate-barcode
  • Content Type: application/json

Example Requests


{
  "text": "#29225",
  "bcType": "code128",
  "scale": 3,
  "height": 10,
  "includetext": true,
  "textxalign": "center",
  "replacements": { "#": "test" }
}

Notes

  • The text parameter is required. It represents the string that will be encoded into the barcode.
  • You can specify the bcType to choose different barcode formats. The default is “code128”.
  • scale and height control the size of the barcode. If not specified, they default to 3 and 10, respectively.
  • includetext determines if the text should appear below the barcode image. It defaults to true.
  • The textxalign option specifies the alignment of the text below the barcode. It can be ‘left’, ‘center’, or ‘right’.
  • Before the barcode is generated, the API applies any replacements specified. This means you can substitute placeholders in your text with desired values.
  • If the barcode generation is successful, a URL pointing to the barcode image and the processed text will be returned.
  • Ensure your JSON request is correctly formatted to avoid errors.

“`