Barcode Generator

Generate barcodes in multiple industry-standard formats. Returns a raw PNG image or base64-encoded JSON, supporting Code 128, Code 93, Code 39, EAN-8, and EAN-13.

Get API Key

Descripción general

Casos de uso

  • Product labeling and inventory management
  • Retail point-of-sale systems
  • Shipping and logistics labels
  • Library and asset tracking systems
  • Event ticketing and check-in workflows

Funcionalidades

Five barcode formats (Code 128, Code 93, Code 39, EAN-8, EAN-13)
Dedicated endpoints for raw PNG and base64-encoded JSON
EAN types validate input length and digit-only content before encoding
Fixed 300×100 px output suitable for standard label widths

Puntos finales de la API

Generate Barcode (PNG)

Returns a raw PNG image of the barcode. Ideal for direct embedding or file download.

GET
https://requiems.xyz/v1/technology/barcode

Parámetros

Nombre Tipo Obligatorio Descripción
data string Obligatorio The text or numeric string to encode in the barcode
type string Obligatorio Barcode format: code128, code93, code39, ean8, ean13

Pruébalo

Demostración en vivo
Solicitud

The text or numeric string to encode in the barcode

Barcode format: code128, code93, code39, ean8, ean13

Campos de respuesta

Campo Tipo Descripción
(binary) bytes Raw PNG image bytes. Content-Type is image/png.

Ejemplos de código

# Save a Code 128 barcode as PNG
curl "https://requiems.xyz/v1/technology/barcode?data=123456789&type=code128" \
  -H "requiems-api-key: YOUR_API_KEY" \
  --output barcode.png

# Save an EAN-13 barcode (12 digits, checksum auto-calculated)
curl "https://requiems.xyz/v1/technology/barcode?data=123456789012&type=ean13" \
  -H "requiems-api-key: YOUR_API_KEY" \
  --output barcode.png

Respuestas de error

400

bad_request

Missing or invalid parameters (e.g. data not provided, unsupported type)

422

unprocessable_entity

Data is invalid for the chosen barcode type (e.g. wrong digit count for EAN-8/EAN-13, non-numeric EAN data)

Generate Barcode (Base64 JSON)

Returns a JSON envelope containing the barcode as a base64-encoded PNG string, along with its type and dimensions.

GET
https://requiems.xyz/v1/technology/barcode/base64

Parámetros

Nombre Tipo Obligatorio Descripción
data string Obligatorio The text or numeric string to encode in the barcode
type string Obligatorio Barcode format: code128, code93, code39, ean8, ean13

Pruébalo

Demostración en vivo
Solicitud

The text or numeric string to encode in the barcode

Barcode format: code128, code93, code39, ean8, ean13

Campos de respuesta

Campo Tipo Descripción
image string Base64-encoded PNG image data
type string The barcode format that was used
width integer Width of the generated image in pixels
height integer Height of the generated image in pixels

Ejemplos de código

curl "https://requiems.xyz/v1/technology/barcode/base64?data=123456789&type=code128" \
  -H "requiems-api-key: YOUR_API_KEY"

Respuestas de error

400

bad_request

Missing or invalid parameters (e.g. data not provided, unsupported type)

422

unprocessable_entity

Data is invalid for the chosen barcode type (e.g. wrong digit count for EAN-8/EAN-13, non-numeric EAN data)

Generate Barcodes (Batch)

Generate up to 20 barcodes in a single request. Each barcode is processed independently and results are returned in the same order as the input. Invalid items do not fail the entire request.

POST
https://requiems.xyz/v1/technology/barcode/batch

Parámetros

Nombre Tipo Obligatorio Descripción
items array<object> Obligatorio Array of barcode generation requests. Min: 1, Max: 20.

Pruébalo

Demostración en vivo
Solicitud

Array of barcode generation requests. Min: 1, Max: 20.

Campos de respuesta

Campo Tipo Descripción
results array<object> List of barcode generation results preserving input order
results[].image string Base64-encoded PNG image
results[].type string Barcode format used
results[].width integer Image width in pixels
results[].height integer Image height in pixels
results[].success boolean Whether barcode generation succeeded
results[].error string Error message when generation fails
total integer Number of items processed

Ejemplos de código

curl -X POST https://requiems.xyz/v1/technology/barcode/batch \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "data": "123456789",
        "type": "code128"
      },
      {
        "data": "HELLO",
        "type": "code93"
      }
    ]
  }'

Respuestas de error

validation_failed

Valid request body that fails validation (empty items array, more than 20 items, missing data field, or unsupported barcode type).

bad_request

Invalid JSON or malformed request body.

internal_error

Unexpected server error.

Preguntas frecuentes