General Barcode Generation API Documentation

General Barcode Generation API
Category: QR Code & Barcode
Endpoint: POST https://api.gugudata.io/v1/barcode?appkey={{appkey}}
Description: A general barcode generation API
Overview
The General Barcode Generation API from GuGuData enables you to create barcodes from a wide array of 40 supported barcode types. With customizable width and height, you can generate images tailored to your specific needs—be it for inventory, retail, library systems, or any application requiring standard barcode formats. The API also provides a CDN link to the generated barcode, ensuring seamless distribution and quick retrieval.
Key highlights:
- Support for 40 barcode types – From UPC and EAN to CODE128, ITF14, CODE39, and more.
- Customizable dimensions – Set specific width and height in pixels.
- CDN-based hosting – Easily reference or display the barcode image using a provided URL.
- HTTPS compliance – Fully compatible with Apple ATS requirements.
Demo URL
https://api.gugudata.io/v1/barcode/demo
Request Parameters
Send a POST request to the endpoint, passing the following parameters (JSON or form-data body):
| Parameter | Type | Required | Default Value | Description |
type | string | Yes | YOUR_VALUE | The barcode format. Options include UPCA, EAN13, CODE128, etc. (see the full list in the remark). |
content | string | Yes | YOUR_VALUE | The data to encode in the barcode. Must comply with length restrictions of the chosen format. |
width | int | Yes | YOUR_VALUE | The barcode's width in pixels (e.g., 300). |
height | int | Yes | YOUR_VALUE | The barcode's height in pixels (e.g., 100). |
Example:
POST https://api.gugudata.io/v1/barcode?appkey=YOUR_APPKEY
Request Body (JSON): { "type": "EAN13", "content": "1234567890123", "width": 300, "height": 100 }
Response Parameters
On success, the API returns a JSON object with status details and a CDN link to the generated barcode image. Key fields include:
| Parameter | Type | Required | Description |
DataStatus.StatusCode | int | Yes | HTTP status code (e.g., 200). |
DataStatus.StatusDescription | string | Yes | A brief description of the request status. |
DataStatus.ResponseDateTime | string | Yes | Timestamp when the response was generated. |
DataStatus.DataTotalCount | int | Yes | Total data count, typically 1 for a single barcode response. |
Data.Content | string | Yes | BarcodeType:content reflecting your request. |
Data.Url | string | Yes | A CDN link for retrieving or displaying the generated barcode. |
Error Codes
Here are some common error codes and their meaning:
| Error Code | Error Content | Notes |
100 | Normal return | The request succeeded and a barcode was generated. |
101 | Parameter error | Missing or invalid parameters (e.g., content or type). |
102 | Request rate limited | Over 100 requests per second. |
103 | Account in arrears | Payment or subscription issue; account not in good standing. |
104 | APPKEY error | Verify your APPKEY from the developer center. |
110 | API response error | A server-side problem occurred; try again or contact support. |
Features
- Supports 40 types of barcodes – Create everything from UPC/EAN to CODE39, CODE128, and more.
- Customizable sizes – Adjust width and height to fit your UI, printing, or scanning needs.
- Direct CDN link – Quickly embed or reference the generated barcode in your apps and documents.
- HTTPS (TLS 1.0–1.3) – Secure data exchange, meeting Apple ATS standards.
- Nationwide CDN – Fast and consistent performance for barcode retrieval.
- Load-balanced environment – Ensures minimal latency and high availability.
Additional Notes for Developers
- Barcode type specifics: Some formats require numeric content only; others, like CODE128, can handle alphanumeric.
- Dimension choices: Consider the scanning distance and resolution of the device reading the barcode.
- Content validation: Always ensure your
contentadheres to the chosen barcode's length/format rules.
Getting Started
- Register at GuGuData.io – Acquire your
appkey. - Construct a POST request – Include
type,content,width, andheightin the body. - Review the response – Extract
Data.Urlto access or display the generated barcode. - Integrate – Incorporate barcodes into your POS systems, warehouse apps, or e-commerce platforms.
About GuGuData
GuGuData specializes in data-centric APIs, offering services like QR Code Generation and SSL Certificate Parsing. Our solutions underscore scalability, ease of use, and speed—helping developers bring advanced functionalities to market faster.
Key Highlights:
- Nine years in business – Reliable solutions trusted by global clients.
- 4.2k+ APIs – A rapidly expanding portfolio catering to diverse data needs.
- 95% happy customers – Backed by strong performance and excellent support.
Harness the General Barcode Generation API to enhance your product labeling, inventory management, or retail operations. Visit our official site for more data-driven services from GuGuData.