Skip to main content
POST
/
products
/
api
/
v1
/
qr
/
bulk
Generate a batch of QR codes asynchronously
curl --request POST \
  --url https://www.closient.com/products/api/v1/qr/bulk/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "gtin": "<string>",
  "items": [
    {
      "lot": "<string>",
      "serial": "<string>",
      "expiry": "<string>"
    }
  ],
  "format": "png",
  "size": 400
}
'
{
  "task_id": "<string>",
  "status": "pending",
  "items": 2500,
  "poll_url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.closient.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Body

application/json

Request body for the async bulk-QR endpoint.

Every item in the bundle shares the same parent GTIN, output format, and size; only lot/serial/expiry vary per item. Hard cap of :data:BULK_MAX_ITEMS items per request to keep a single Celery task's runtime and ZIP-bundle size bounded.

gtin
string
required

GTIN barcode (GTIN-8, 12, 13, or 14, with or without separators) shared by every item in the bundle. Normalized to GTIN-14 server-side.

Required string length: 8 - 17
Pattern: ^[\d\s\-]{8,17}$
items
QRBulkItem · object[]
required

List of items to render — must contain at least 1 and at most 5000 entries. Each entry varies only the GS1 AI values (lot, serial, expiry); the GTIN, format, and size come from the parent payload.

Required array length: 1 - 5000 elements
format
enum<string>
default:png

Output image format applied to every QR in the bundle. svg for vector output; png for raster output sized by size.

Available options:
svg,
png
size
integer
default:400

Target image side length in pixels (50-2000) for every QR in the bundle. Ignored when format='svg'.

Required range: 50 <= x <= 2000

Response

Accepted

Response for an accepted bulk job — always returned with HTTP 202.

Receipt only; the actual ZIP bundle is built asynchronously. Poll poll_url to retrieve the signed download URL once status flips to completed.

task_id
string
required

Celery task identifier (UUID4 format). Use to poll the status endpoint at GET /qr/bulk/{task_id}/.

status
enum<string>
required

Initial task status — always pending on this 202 receipt. Subsequent polls may return running, completed, or failed.

Available options:
pending,
running,
completed,
failed
items
integer
required

Number of QR codes that will be generated (mirrors the request's items length).

Required range: 1 <= x <= 5000
poll_url
string
required

Relative URL of the polling endpoint for this task — combine with the API host to retrieve status. Embeds the same task_id for convenience.