Start free
Developers

GS1 Digital Link API: REST API and webhooks

A GS1 Digital Link API for the systems that already hold your product data. Create products from their GTINs, set where each code resolves, download print-ready QR codes and receive signed events: everything the dashboard does, from your ERP, PIM or label software. JSON in, JSON out, the same GS1 validation as the UI. Machine-readable contract: /api/v1/openapi.json (OpenAPI 3.1).

Quick start: a GS1 QR code in three calls

The API is on every plan, including Free. Create an account, verify your email address, make a key under Integrations, and a product with a working QR code is three requests away.

1. Create the product from its barcode number.

curl -X POST https://paqlink.com/api/v1/products \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"gtin": "6001234567899", "name": "Rooibos Rusks 500 g"}'

2. Set where scans go. Use the id from the first answer.

curl -X PATCH https://paqlink.com/api/v1/products/42 \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"default_target": "custom", "custom_url": "https://example.com/rusks"}'

3. Download the print-ready code.

curl -H "Authorization: Bearer $KEY" -o rusks-qr.svg \
  https://paqlink.com/api/v1/products/42/qr.svg

Create a free account to get a key

See API keys and webhooks in the Help centre, and pricing for the plans. Sending scans to your own website needs a verified email address.

Two interfaces

The management API on this page creates and changes products and needs a key. The resolver is public and needs none: it is the interface the GS1 standard itself defines, and any software can ask it for a product's links. These run against a live demonstration product:

# the default link: a 307 redirect
curl -I https://paqlink.com/01/09520000000028
# one link type by name
curl -I "https://paqlink.com/01/09520000000028?linkType=gs1:pip"
# the linkset: every link, as JSON
curl -H "Accept: application/linkset+json" https://paqlink.com/01/09520000000028

How the hosted GS1 Digital Link resolver works. To check a link you built yourself, paste it into the GS1 Digital Link checker. For test data, GS1 sets the prefix 952 aside for demonstrations, so a number such as 9520000000011 is nobody's real product.

Authentication · Rate limits · Errors · Endpoints · Products · Idempotency & concurrency · QR codes & scans · Webhooks · Versioning · Changelog

Authentication

Create a key under Integrations in your workspace (owner only). Send it as a bearer token over HTTPS. Keys are hashed at rest and shown once.

curl -H "Authorization: Bearer pql_live_…" https://paqlink.com/api/v1/me

Scopes: every key can read; tick write to create, update and delete products. A key acts on behalf of the person who created it. If they leave the team or lose the products capability, the key stops working with them.

  • Expiry. Optional at creation (30 / 90 / 365 days). An expired key returns 401; GET /me reports key.expires_at so you can alert before it happens.
  • Rotation. “Rotate” mints a replacement with the same name, scopes and IP list; the old key keeps working for 24 hours, then expires. No downtime, no forgotten old key.
  • IP allow-list. Optionally pin a key to addresses or CIDR ranges. A valid key used from elsewhere returns 403 ip_not_allowed.
  • Revoke ends a key immediately, for a lost laptop or a leaked log.

Server to server only. The API sends no CORS headers, so a browser page cannot call it. That is by design, because a key in front-end code is a key in every visitor's hands. Call it from your backend, and keep keys out of logs and URLs (the Authorization header is the only place we read them). Responses are Cache-Control: no-store and Vary: Authorization.

Rate limits & sizes

LimitValueNotes
Requests per key600 / minuteEvery authenticated request. Sliding 60-second window.
QR renders per key120 / minuteqr.svg and qr.png; a 600 dpi PNG is CPU-bound. Cache the file, because the image for a product only changes when its GS1 data does.
Request body512 KB413 payload_too_large beyond that.
Page size100per_page is clamped, never rejected.

Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the window frees up). A 429 rate_limited also carries Retry-After; honour it rather than retrying in a tight loop.

Errors

Every error, including routing errors such as an unknown path or a wrong method, is JSON in one envelope. field is present when the problem is a specific input; request_id is on every response as X-Request-Id too (send your own, up to 64 characters of [A-Za-z0-9_-], and it is echoed back). Quote it to support.

{"error": {"code": "validation", "field": "gtin", "message": "GTIN check digit is invalid", "request_id": "req_4e7f98b262c08729"}}
StatusCodeWhen
400bad_requestThe request could not be understood.
400invalid_jsonThe body is not valid JSON.
401unauthorizedMissing, revoked, expired or unknown API key.
403forbiddenThe key lacks the scope this call needs.
403ip_not_allowedThe key carries an IP allow-list and this address is not on it.
403plan_limitThe workspace's plan does not allow another product.
404not_foundNo such resource in this workspace (existence elsewhere is never revealed).
405method_not_allowedThe path exists but not for this HTTP method; see the Allow header.
409conflictThe GTIN is already registered, and a GTIN can only be hosted once.
412precondition_failedIf-Match did not match the product's current ETag; re-read and retry.
413payload_too_largeThe body exceeds 512 KB.
415unsupported_media_typeA body was sent without Content-Type: application/json.
422validationA field failed validation; `field` names it when known.
422idempotency_mismatchThis Idempotency-Key was already used with a different request body.
429rate_limitedToo many requests; wait Retry-After seconds.
500server_errorSomething failed on our side; quote request_id to support.
503resolver_unavailableThe resolver did not confirm the change; the write was kept or refused as documented.

Endpoints

MethodPathWhatScope
GET/api/v1/meWho am I read
GET/api/v1/productsList products read
POST/api/v1/productsCreate a product write
GET/api/v1/products/{product_id}Get a product read
PATCH/api/v1/products/{product_id}Update a product write
DELETE/api/v1/products/{product_id}Delete a product write
DELETE/api/v1/products/{product_id}/imageRemove the product photo write
GET/api/v1/products/{product_id}/qr.svgPrint-ready QR (SVG, sized in mm) read
GET/api/v1/products/{product_id}/qr.pngPrint-ready QR (PNG, 600 dpi) read
GET/api/v1/products/{product_id}/scansDaily scan counts read
GET/api/v1/openapi.jsonThis document none

All responses are Cache-Control: no-store except the OpenAPI document. DELETE returns 204 with no body.

Products

GET /api/v1/products lists your workspace's products in id order with page, per_page, total and a next URL (or null on the last page). Filters: gtin (any GTIN length, matched on the 14-digit form), updated_since (ISO-8601, e.g. 2026-09-11T00:00:00Z, to poll for changes), q (substring of name or brand).

curl -X POST https://paqlink.com/api/v1/products \
  -H "Authorization: Bearer pql_live_…" -H "Content-Type: application/json" \
  -H "Idempotency-Key: erp-sku-88213-v1" \
  -d '{
    "gtin": "6001234567899",
    "name": "Chenin Blanc 2025",
    "brand": "Example Estate",
    "lot": "L2025A",
    "expiry_yymmdd": "271231",
    "default_target": "elabel",
    "elabel": {"langs": {"en": {"ingredients": "Grapes, sulphites", "alcohol": "12.5% vol",
                                 "nutrition": {"Energy": "289 kJ / 70 kcal"}}}},
    "extra_links": [{"type": "gs1:sustainabilityInfo", "url": "https://example.com/green", "title": "Recycling"}]
  }'

Response 201 (with an ETag header):

{"data": {
  "id": 42, "gtin14": "06001234567899", "slug": "BEZAbUX6", "name": "Chenin Blanc 2025",
  "digital_link_uri": "https://paqlink.com/01/06001234567899/10/L2025A?17=271231",
  "hosted_product_url": "https://paqlink.com/p/BEZAbUX6",
  "hosted_elabel_url": "https://paqlink.com/e/BEZAbUX6", "elabel_publishable": true,
  "default_target": "elabel", "synced_at": "2026-09-11T17:05:12Z",
  "created_at": "2026-09-11T17:05:12Z", "updated_at": "2026-09-11T17:05:12Z", …
}, "meta": {"resolver": "synced"}}
FieldTypeAccessDescription
id integer read-only Stable numeric id, used in every product URL.
gtin string create only GTIN-8/12/13/14 with a valid check digit. Stored zero-padded to 14 digits; immutable after creation.
gtin14 string read-only The 14-digit form of the GTIN, as encoded in the Digital Link URI.
slug string read-only Opaque id in hosted page URLs (/p/{slug}, /e/{slug}).
name string read / write Product name. Required.
brand string read / write Brand or producer name.
description string read / write Free-text description shown on the hosted product page.
image_url string read / write https:// image for the product page.
lot string read / write AI 10 batch/lot, GS1 CSET 82. Encoded in the QR.
serial string read / write AI 21 serial number, GS1 CSET 82. Encoded in the QR.
expiry_yymmdd string read / write AI 17 expiry as YYMMDD (DD may be 00 = end of month).
default_target string product · elabel · custom read / write Where a plain scan lands: the hosted product page, the hosted e-label, or custom_url.
custom_url string read / write https:// destination used when default_target is custom.
extra_links array read / write Additional GS1 linkTypes advertised in the linkset ({type, url, title}); the allowed types are listed in the schema.
elabel object | null read / write EU e-label content: {"langs": {"en": {"ingredients", "allergens", "alcohol", "nutrition": {"Energy": "…", …}}}}. Null clears it.
contact_email string read / write Producer contact shown on the hosted product page as a mailto: link. Empty hides it.
category string beer_cider · cosmetic · food_liquid · food_solid · general · spirits · supplement · wine read / write What kind of product this is. Decides which declaration rules apply and, for some categories, fixes the nutrition basis. Wine is the one category whose e-label must be complete before it can be the default target, because its bottle is allowed to carry the energy value alone. Defaults to "general", which applies no declaration rules.
nutrition_basis string per_100ml · per_100g read / write Reference quantity printed above the nutrition table, in the reader's language. Fixed by the regulation for some categories (wine is per_100ml, anything sold by weight is per_100g). Sending a different value for those returns a 422.
recall_active boolean read / write Switch the recall notice on or off. While on, every plain scan lands on the hosted product page (or e-label) carrying the notice, and gs1:recallStatus is advertised on the resolver. Emits product.recalled / product.recall_cleared.
recall_message string read / write What shoppers read. Required while recall_active is true.
recall_url string read / write Optional https:// page with more about the recall, linked from the notice.
recall_at string | null read-only When the current recall notice was switched on; null when none is active.
digital_link_uri string read-only The uncompressed GS1 Digital Link URI the QR encodes.
hosted_product_url string read-only
hosted_elabel_url string | null read-only Null until the e-label is publishable in every language.
elabel_publishable boolean read-only True when every language carries the EU mandatory particulars.
synced_at string | null read-only When the resolver last accepted this record; null while a write is pending.
created_at string read-only
updated_at string read-only Last change by any path (dashboard, CSV, API, resync). Filter with ?updated_since=.

Bodies must be JSON objects sent with Content-Type: application/json. Unknown fields are rejected (422 naming the field) rather than ignored, so a typo cannot silently drop an expiry. lot, serial and expiry_yymmdd go through the same GS1 validator as the dashboard; the API never accepts a code the resolver would refuse. Plan product limits apply exactly as in the dashboard (403 plan_limit). A GTIN can be hosted once on PaqLink: creating it again, in your workspace or anyone else's, returns 409 conflict.

An e-label is published (served at hosted_elabel_url, advertised in the linkset and eligible as default_target) only when it is complete for the product's category. For wine, every language must carry an ingredients list and all seven nutrition rows (Energy, Fat, of which saturates, Carbohydrate, of which sugars, Protein and Salt), with Energy in both kJ and kcal. For every other category, the e-label needs content in at least one language. Anything less is stored as a draft: elabel_publishable is false, hosted_elabel_url is null, and setting default_target: "elabel" returns 422 naming what is missing.

meta.resolver on every create and update is synced when the resolver accepted the record, or pending with a meta.warning when it did not. The write is stored either way, but the printed QR keeps serving its previous destination until the nightly retry succeeds (or you PATCH again). DELETE returns 503 resolver_unavailable and keeps the product when the resolver cannot confirm removal, so a printed code is never left pointing at a product you can no longer see.

Idempotency & concurrency

Retries. Send an Idempotency-Key header (your own string, up to 255 characters, unique per create) on POST /products. If the request is retried within 24 hours the stored response is returned with Idempotent-Replayed: true instead of creating a second product or returning a 409. The same key with a different body is a client bug and returns 422 idempotency_mismatch.

Lost updates. GET, POST and PATCH return an ETag. Send it back as If-Match on PATCH or DELETE and the call fails with 412 precondition_failed if the product changed in between (from the dashboard, a CSV import or another integration). Omit the header to keep last-write-wins.

ETAG=$(curl -sI -H "Authorization: Bearer $KEY" https://paqlink.com/api/v1/products/42 | grep -i '^etag' | cut -d' ' -f2 | tr -d '\r')
curl -X PATCH https://paqlink.com/api/v1/products/42 \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "If-Match: $ETAG" \
  -d '{"default_target": "custom", "custom_url": "https://example.com/vintage-2025"}'

QR codes & scans

GET /api/v1/products/{id}/qr.svg?x_dim=0.495 · GET /api/v1/products/{id}/qr.png (600 dpi). x_dim is the module size in millimetres, within the GS1 retail range, else 422. The image encodes the uncompressed GS1 Digital Link URI. GET /api/v1/products/{id}/scans?days=30 → {"data": {"total": 12, "daily": {"2026-08-27": 5, …}}}. Scan counters are daily aggregates only, so no per-scan data exists to return.

Webhooks

Add an https endpoint under Integrations and pick events. Use “Send test event” to receive a ping.

EventWhen
product.createdA product was created (dashboard, CSV import or API).
product.updatedA product was changed by any path.
product.deletedA product was deleted and its resolver record removed.
product.recalledA recall notice was switched on: shoppers now see it on every scan.
product.recall_clearedThe recall notice was switched off.
scan.daily_digestOnce a day (after 01:30 UTC): yesterday's scan count per product.
pingSent by the dashboard's “Send test event” button and never otherwise.
POST https://example.com/paqlink
Content-Type: application/json
X-PaqLink-Event: product.created
X-PaqLink-Delivery: evt_1f3a…
X-PaqLink-Timestamp: 1757610312
X-PaqLink-Signature: sha256=…

{"id": "evt_1f3a…", "event": "product.created", "created_at": "2026-09-11T17:05:12Z",
 "data": {"id": 42, "gtin14": "06001234567899", "name": "…", "brand": "…", "default_target": "elabel",
          "slug": "BEZAbUX6", "synced_at": "2026-09-11T17:05:12Z", "updated_at": "2026-09-11T17:05:12Z"}}
HeaderMeaning
X-PaqLink-EventThe event name.
X-PaqLink-DeliveryThe event id (evt_…). It is identical on a redelivery, so de-duplicate on it.
X-PaqLink-TimestampUnix seconds when the delivery was signed; reject if older than the replay window.
X-PaqLink-Signaturesha256=<hex>, the HMAC-SHA256 of `<timestamp>.<raw body>` with your signing secret. During a secret rotation two comma-separated values are sent; accept either.

Verifying a delivery

The signature is HMAC-SHA256, with your webhook secret, over <X-PaqLink-Timestamp>.<raw body>: the timestamp, a full stop, then the exact bytes received (do not re-serialise the JSON). Compare in constant time, and reject deliveries whose timestamp is more than 300 seconds old so a captured request cannot be replayed. During a secret rotation the header carries two comma-separated signatures (new secret first, old second); accept the delivery if any of them matches.

# Python (Flask / any WSGI)
import hmac, hashlib, time

def verify(secret, raw_body, headers, tolerance=300):
    ts = headers["X-PaqLink-Timestamp"]
    if abs(time.time() - int(ts)) > tolerance:
        return False
    expected = "sha256=" + hmac.new(secret.encode(), f"{ts}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(expected, sig.strip())
               for sig in headers["X-PaqLink-Signature"].split(","))
// Node (Express: mount with express.raw({ type: "application/json" }) so req.body is the raw Buffer)
const crypto = require("crypto");

function verify(secret, rawBody, headers, tolerance = 300) {
  const ts = headers["x-paqlink-timestamp"];
  if (Math.abs(Date.now() / 1000 - Number(ts)) > tolerance) return false;
  const expected = "sha256=" + crypto.createHmac("sha256", secret)
    .update(Buffer.concat([Buffer.from(`${ts}.`), rawBody])).digest("hex");
  return headers["x-paqlink-signature"].split(",").some((sig) => {
    const a = Buffer.from(expected), b = Buffer.from(sig.trim());
    return a.length === b.length && crypto.timingSafeEqual(a, b);
  });
}

Delivery semantics

  • Deliveries are attempted once, synchronously, with a 5-second timeout. Respond 2xx quickly and process asynchronously.
  • There is no automatic retry. Failed deliveries are listed on the Integrations page with a Redeliver button, which re-sends the identical body under the same X-PaqLink-Delivery id with a fresh timestamp and signature. De-duplicate on that id.
  • Twenty consecutive failures disable the webhook; re-enable it from the dashboard once your endpoint is fixed.
  • Endpoints must be public https on port 443; private and loopback addresses are refused, and redirects are not followed.
  • Rotate a signing secret from the dashboard at any time; both secrets sign for 24 hours.

Versioning & compatibility

The version is in the path (/api/v1/). Within v1 we only make additive changes: new fields in responses, new optional parameters, new event types, new error codes. Treat unknown JSON fields and unknown event names as ignorable, and match on error.code, not message. Anything that would break an existing client ships as /api/v2/ with at least 12 months of overlap. Changes are listed below and in info.x-changelog of the OpenAPI document.

Changelog

  • 2026-10-25: Product photos: `PUT /products/{id}/image` uploads the photo itself (JPEG, PNG or WebP, at most 10 MB) and `DELETE` removes it. `image_url` then points at the photo PaqLink hosts.
  • 2026-09-14: Recall notices (`recall_active`, `recall_message`, `recall_url`, `recall_at`) with the `product.recalled` / `product.recall_cleared` events; `contact_email` on the hosted product page; the product page now shows the expiry date carried in the scanned code (AI 17) and the additional links as buttons.
  • 2026-09-11: API hardening: JSON errors on every status (404/405/413/415/429/500) with `field` and `request_id`; 409 for a duplicate GTIN (was 422); `Idempotency-Key` on POST; ETag / If-Match on products; `updated_at`, `slug`; `?gtin=`, `?updated_since=`, `?q=` filters and `next` links; timestamps now end in Z; `X-RateLimit-*` and `Retry-After` headers; key expiry, rotation and IP allow-lists; webhook secret rotation with overlap, redelivery from the dashboard; OpenAPI 3.1 document at /api/v1/openapi.json.
  • 2026-08-28: v1 launched: API keys, products, QR rendering, scan counts, signed webhooks.

Resolver endpoints (no key needed)

The GS1-conformant resolver is public by design: GET /01/{gtin14} (307 to the default link), ?linkType=linkset or Accept: application/linkset+json for the RFC 9264 linkset, /.well-known/gs1resolver for the description file. See Standards.

Sources

Last reviewed by the PaqLink team. Each source below was opened and read on the date shown. Rules and fees change, so check the source before you rely on a figure.

  1. GS1 Digital Link standard: URI syntax, release 1.7.0 (August 2026). Checked 18 November 2026.
  2. GS1-Conformant Resolver standard, release 1.2.1 (August 2026). Checked 18 November 2026.
  3. GS1, test suite for the GS1-Conformant Resolver standard. Checked 18 November 2026.