apyhub
SMART GENERATION

Generate Barcode API

Hosted on ApyHub

What it does

Barcode Generator turns a text value into a Code128 barcode and gives you the result as either a downloadable file or a cloud link. Send the content string in the request body, and choose whether you want a binary download or a pre-signed JPEG URL.

Use POST /download when you want the barcode file returned directly. Use POST /link when your workflow needs a hosted asset instead of a file response. Both endpoints accept the same input: the text to encode as content, plus an optional output query string for the file name or asset name.

The download endpoint returns binary data, which fits well for printing labels, generating packing slips, or embedding barcodes into documents on your own infrastructure. The link endpoint returns a JSON object with a data field containing a URI, which is useful when you want to store or share the generated barcode without handling file transfer yourself.

Barcode Generator is a straightforward fit for inventory systems, order fulfillment flows, ticketing, and any app that needs to turn an identifier into a scannable Code128 barcode.

▣ ENDPOINT 01 / 02
POST
Generate barcode — download file
http://localhost:8080/apyhub/generate-barcode/download
QUICKSTARTGUIDE

Quickstart

Generate a Code128 barcode from a text string and download the result.

curl -X POST "http://localhost:8080/apyhub/generate-barcode/download?output=my-barcode" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"1234567890"}'

What you'll get back

Returns a binary file (string with format: binary) containing the generated barcode image.

TRY ITLIVE · 30 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Text to encode as a Code128 barcode.

About this endpoint

What it does

Generates a Code128 barcode from the provided text content and returns the result as a binary file download.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoName to use for the downloaded file.

Request Body

ParameterTypeMandatoryDescription
contentStringYesText to encode as a Code128 barcode.

Response

Returns a binary file download as the response body. The output schema is a string with format: binary, so the successful response is a raw file stream rather than JSON.

ParameterTypeMandatoryDescription
Binary file content.

Query parameters

Name
Type
Description
outputOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.