Candybar Barcode API

FREE
By wildidea | Updated il y a un mois | Tools
Popularity

7.6 / 10

Latency

123ms

Service Level

100%

Health Check

N/A

README

Candybar APIs Documentation

Welcome to Candybar. Our easy-to-use APIs offer seamless integration for generating various types of barcodes and decoding barcode images. This documentation will introduce you to the available endpoints and guide you on how to utilize these APIs effectively.

Base URL

The base URL for all Candybar endpoints is:

https://{rapidApi}/v1

Authentication

To access the Candybar APIs, you need an API key from {rapidApi}. Please obtain your API key from {rapidApi} and include it in the request headers as follows:

Authorization: YOUR_RAPID_API_KEY

Supported Endpoints

1. Get Code128

Generates a Code128 barcode, which is a high-density linear barcode used for encoding alphanumeric data. It supports all 128 ASCII characters.

Endpoint:

GET /v1/code128

Parameters:

  • data (required): The text or data to be encoded in the barcode.

Example Request:

GET /v1/code128?data=Hello123

Example Response:

The API will return a PNG image of the generated Code128 barcode:

Code128 Barcode

2. Get Code39

Creates a Code39 barcode, a variable-length, discrete barcode symbology that supports alphanumeric characters.

Endpoint:

GET /v1/code39

Parameters:

  • data (required): The text or data to be encoded in the barcode.

Example Request:

GET /v1/code39?data=World456

Example Response:

The API will return a PNG image of the generated Code39 barcode:

Code39 Barcode

3. Get PDF417

Generates a PDF417 barcode, a stacked linear barcode symbol format used mainly for 2D barcode applications like identification cards and transport tickets.

Endpoint:

GET /v1/pdf417

Parameters:

  • data (required): The text or data to be encoded in the barcode.

Example Request:

GET /v1/pdf417?data=SamplePDF417

Example Response:

The API will return a PNG image of the generated PDF417 barcode:

PDF417 Barcode

4. Get QR Code

Creates a QR Code (Quick Response Code) barcode, a popular type of 2D barcode often used for URLs, product information, and various applications.

Endpoint:

GET /v1/qrcode

Parameters:

  • data (required): The text or data to be encoded in the barcode.

Example Request:

GET /v1/qrcode?data=https://www.example.com

Example Response:

The API will return a PNG image of the generated QR Code barcode:

QR Code Barcode

5. Decode a Barcode

Decodes a barcode image and returns the decoded data along with the barcode type.

Endpoint:

POST /v1/decode

Parameters:

  • file (required): The barcode image file to be decoded. (Multipart form)

Example Request:

POST /v1/decode

Headers:
Authorization: YOUR_RAPID_API_KEY
Content-Type: multipart/form-data

Body:
{
  "file": (barcode_image_file)
}

Example Response:

[
  {
    "code_type": "CODE39",
    "contents": "123123"
  }
]

Error Handling

If an error occurs while processing your request, you will receive an error response with a corresponding HTTP status code and a message describing the issue.

Example Error Response:

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "error": "Invalid data. Data must be alphanumeric."
}

Conclusion

Congratulations! You now have an overview of our Candybar APIs, and you are ready to start integrating barcoding functionality into your applications. Donโ€™t forget to obtain your API key from Rapid API to access the APIs securely.

If you have any further questions or need assistance, feel free to reach out to our support team through the Candybar forum on Rapid API.

Happy barcoding!

Followers: 0
Resources:
Product Website Terms of use
API Creator:
Rapid account: Wildidea
wildidea
scottu
Log In to Rate API
Rating: 5 - Votes: 1