curl --request POST \
--url https://api.thingidentity.com/codes/render/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.thingidentity.public.v1+json' \
--data '
{
"codes": [
{
"reference": "product-label",
"mode": "QR_GS1_DIGITAL_LINK_URI",
"digitalLinkStem": "https://gtin.at",
"primaryKey": {
"key": "01",
"value": "09521234543213"
},
"ais": [
{
"key": "10",
"value": "LOT42"
}
]
}
]
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/vnd.thingidentity.public.v1+json'
},
body: JSON.stringify({
codes: [
{
reference: 'product-label',
mode: 'QR_GS1_DIGITAL_LINK_URI',
digitalLinkStem: 'https://gtin.at',
primaryKey: {key: '01', value: '09521234543213'},
ais: [{key: '10', value: 'LOT42'}]
}
]
})
};
fetch('https://api.thingidentity.com/codes/render/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thingidentity.com/codes/render/batch"
payload = { "codes": [
{
"reference": "product-label",
"mode": "QR_GS1_DIGITAL_LINK_URI",
"digitalLinkStem": "https://gtin.at",
"primaryKey": {
"key": "01",
"value": "09521234543213"
},
"ais": [
{
"key": "10",
"value": "LOT42"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.thingidentity.public.v1+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"codes": [
{
"reference": "product-label",
"barcodeText": "https://gtin.at/01/09521234543213/10/LOT42",
"hri": "(01)09521234543213(10)LOT42",
"image": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij48bWV0YWRhdGEgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIj48ZGM6Y3JlYXRvcj5UaGluZyBJZGVudGl0eTwvZGM6Y3JlYXRvcj48ZGM6c291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TTUsMTNoM3YxaC0zek05LDEzaDJ2MWgtMnpNMTQsMTNoMXYxaC0xek0xLDE0aDF2MWgtMXpNNCwxNGgzdjFoLTN6TTEwLDE0aDV2MWgtNXpNMTYsMTRoMXYxaC0xek0xLDE1aDJ2MWgtMnpNOCwxNWgydjFoLTJ6TTEyLDE1aDF2MWgtMXpNMTUsMTVoMXYxaC0xek0xLDE2aDE2djFoLTE2eiIvPjwvc3ZnPg=="
}
],
"errors": []
}Batch Render 2D barcodes
Render up to 10 code definitions as Base64-encoded SVG images in one JSON response.
curl --request POST \
--url https://api.thingidentity.com/codes/render/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.thingidentity.public.v1+json' \
--data '
{
"codes": [
{
"reference": "product-label",
"mode": "QR_GS1_DIGITAL_LINK_URI",
"digitalLinkStem": "https://gtin.at",
"primaryKey": {
"key": "01",
"value": "09521234543213"
},
"ais": [
{
"key": "10",
"value": "LOT42"
}
]
}
]
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/vnd.thingidentity.public.v1+json'
},
body: JSON.stringify({
codes: [
{
reference: 'product-label',
mode: 'QR_GS1_DIGITAL_LINK_URI',
digitalLinkStem: 'https://gtin.at',
primaryKey: {key: '01', value: '09521234543213'},
ais: [{key: '10', value: 'LOT42'}]
}
]
})
};
fetch('https://api.thingidentity.com/codes/render/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thingidentity.com/codes/render/batch"
payload = { "codes": [
{
"reference": "product-label",
"mode": "QR_GS1_DIGITAL_LINK_URI",
"digitalLinkStem": "https://gtin.at",
"primaryKey": {
"key": "01",
"value": "09521234543213"
},
"ais": [
{
"key": "10",
"value": "LOT42"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.thingidentity.public.v1+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"codes": [
{
"reference": "product-label",
"barcodeText": "https://g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WgxdjFoLTF6TTExLDloMXYxaC0xek0xMyw5aDN2MWgtM3pNMSwxMGgydjFoLTJ6TTYsMTBoMnYxaC0yek0xMCwxMGgxdjJoLTF6TTEzLDEwaDR2MWgtNHpNMSwxMWgxdjFoLTF6TTQsMTFoMXYxaC0xek04LDExaDF2MWgtMXpNMTQsMTFoMXYxaC0xek0xLDEyaDV2MWgtNXpNNywxMmgxdjFoLTF6TTksMTJoMXYxaC0xek0xMSwxMmgydjFoLTJ6TTE1LDEyaDJ2MWgtMnpNMSwxM2gydjFoLTJ6TTUsMTNoM3YxaC0zek05LDEzaDJ2MWgtMnpNMTQsMTNoMXYxaC0xek0xLDE0aDF2MWgtMXpNNCwxNGgzdjFoLTN6TTEwLDE0aDV2MWgtNXpNMTYsMTRoMXYxaC0xek0xLDE1aDJ2MWgtMnpNOCwxNWgydjFoLTJ6TTEyLDE1aDF2MWgtMXpNMTUsMTVoMXYxaC0xek0xLDE2aDE2djFoLTE2eiIvPjwvc3ZnPg=="
}
],
"errors": []
}codes and errors
structure as batch generation.
Each successful code also contains image, the SVG document encoded as Base64.
Request
{
"codes": [
{
"reference": "product-label",
"mode": "QR_GS1_DIGITAL_LINK_URI",
"digitalLinkStem": "https://gtin.at",
"primaryKey": { "key": "01", "value": "09521234543213" },
"ais": [{ "key": "10", "value": "LOT42" }]
}
]
}
L. This endpoint requires write:codes.
Results
Successful entries containreference, barcodeText, hri and image.
Decode the Base64 value in image to UTF-8 SVG bytes and save them as an .svg file.
Invalid items appear in errors with reference and an errors list containing
code, path and args. They do not prevent other items from rendering.
The response remains 200 OK, including when all items fail.
Your reference is echoed unchanged. If omitted or null, the original zero-based position
is returned as a string. Empty references are preserved.
More than 10 items returns 422 with Validation.TooMany.codes before any rendering starts.Authorizations
The access_token from POST /oauth/token.
Body
10Hide child attributes
Hide child attributes
Barcode type. Digital Link modes require digitalLinkStem.
GS1_DATAMATRIX, DATAMATRIX_GS1_DIGITAL_LINK_URI, GS1_QR, QR_GS1_DIGITAL_LINK_URI "QR_GS1_DIGITAL_LINK_URI"
The identifying application identifier. With a digitalLinkStem it must be a GS1 Digital Link primary key in the GS1 Barcode Syntax Dictionary; without one, 03 is additionally accepted, the identifier for made-to-order trade items.
GTIN (01) accepts 8, 12, 13 or 14 digits, verifies the mod-10 check digit and normalises the value to 14 digits, so the value you get back may be longer than the one you sent.
Hide child attributes
Hide child attributes
GS1 application identifier. Browse the official GS1 Application Identifiers directory for meanings, value formats, required associations and Digital Link usage. The API validates identifiers against its bundled GS1 Barcode Syntax Dictionary; not every AI is valid as a primary key or in every combination.
"01"
"09521234543213"
QR only: L, M, Q or H. Omitted or null selects L for QR. For Data Matrix omit or send null.
L, M, Q, H, null Further application identifiers. Pass [] for none.
Each key must exist in the GS1 Barcode Syntax Dictionary and its value must match the format that dictionary declares. An AI may not repeat the primary key, keys may not repeat each other, and GS1 "requires" and "excludes" relations between AIs are enforced.
With a digitalLinkStem every AI must be either a path qualifier of the chosen primary key, taken from a single consistent qualifier sequence, or a data attribute that GS1 Digital Link URI Syntax allows in the query string. Qualifiers keep the order GS1 defines, not the order you send.
Temperature AIs (4330 to 4333) are normalised for you: the magnitude is padded to six digits and a negative value keeps its trailing minus.
Hide child attributes
Hide child attributes
GS1 application identifier. Browse the official GS1 Application Identifiers directory for meanings, value formats, required associations and Digital Link usage. The API validates identifiers against its bundled GS1 Barcode Syntax Dictionary; not every AI is valid as a primary key or in every combination.
"01"
"09521234543213"
Optional custom query parameters appended to a GS1 Digital Link URI. Omit, send null or pass [] for none.
Only with a digitalLinkStem; a non-empty list without one is rejected. Keys must not be linkType or context, must contain at least one non-digit, must be unique, and both keys and values are limited to unreserved ASCII and URI punctuation.
The origin a GS1 Digital Link path is appended to. Supplying it is what makes this a GS1 Digital Link: send a stem and you get a URI, leave it out and you get a GS1 element string. Must be http or https with a host, and carry no userinfo, query or fragment. A single trailing slash is stripped; empty path segments are rejected.
"https://gtin.at"
The GS1 link type the URI resolves to. Only with a digitalLinkStem. A gs1: value must be one the generator offers from the GS1 Web Vocabulary page types; gs1:defaultPage, gs1:defaultPageMulti and gs1:handledBy are not selectable. Any other value must be an absolute http or https URI.
"gs1:pip"
Value for the GS1 Digital Link context query parameter. Only with a digitalLinkStem, same character rules as extension parameter values.
"dpp"
Optional correlation identifier, echoed unchanged on success or failure. When omitted or null, the API returns the zero-based input position as a string, e.g. 0 becomes "0". Empty strings are preserved. Avoid collisions with generated references. This is not an idempotency key.
"product-label"
Response
Successful codes and per-item errors. Inspect errors even when the HTTP status is 200.
Hide child attributes
Hide child attributes
The supplied reference unchanged, or the zero-based input position as a string when omitted or null.
The payload to encode. With a digitalLinkStem the GS1 Digital Link URI; without one, the GS1 element string, where parentheses inside a value are escaped as ^040 and ^041 so that a renderer places the FNC1 separators correctly.
"https://gtin.at/01/09521234543213"
Human readable interpretation, the (AI)value text printed under the symbol.
"(01)09521234543213"
Base64-encoded SVG document (UTF-8).
Hide child attributes
Hide child attributes
The supplied reference unchanged, or the zero-based input position as a string when omitted or null.