API docs

The API makes barcodes, checks numbers and keeps your product register, from your own programs. Our tests send every example on this page to a test copy of the server and check the answer it shows.

Start here

  1. Make a free account. Accounts open soon.
  2. Confirm your email address: open the link we send you. Until then your keys do not work.
  3. On the Account page in the app, choose New key, give it a name and choose Make key.
  4. Copy the key straight away. It is shown once and never again. Keep it private, like a password.

Every plan can use the API, Free included. See Pricing for what each plan includes.

The address and your key

Every address on this page starts with https://api.launchdaylabs.com/v1. Send your key in a header: Authorization: Bearer followed by the key. Only GET /v1/types works without one.

The examples read the key from a setting called KEY, so it never sits in your code. Set it once in the terminal you run them from:

export KEY="paste-your-key-here"        # macOS, Linux, Git Bash
$env:KEY = "paste-your-key-here"        # Windows PowerShell

The curl examples are written for a macOS or Linux terminal, or Git Bash on Windows. The JavaScript examples need Node 18 or later. The Python examples need the requests package.

A request body is JSON, sent with Content-Type: application/json. A field an address does not know is refused, so a typing mistake is never ignored. Every answer is JSON, except the files you download: images, the CSV export and the handoff pack.

List the barcode types, the plans and the limits

GET /v1/types needs no key.

curl
curl -s "https://api.launchdaylabs.com/v1/types"
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/types");
console.log(res.status, await res.json());
Python
import requests

r = requests.get(
    "https://api.launchdaylabs.com/v1/types",
)
print(r.status_code, r.json())

The answer, status 200. A "…" marks where it is cut short.

{
  "types": [
    {
      "id": "upca",
      "label": "UPC-A",
      "family": "retail",
      "gs1": true,
      "formats": [
        "png",
        "svg",
        "pdf",
        "eps"
      ],
      "options": [
        "size",
        "height_mm",
        "dpi",
        "text",
        "bar_color",
        "background",
        "quiet_zone",
        "bar_width_reduction_mm"
      ]
    },
    "…"
  ],
  "plans": {
    "free": {
      "label": "Free",
      "monthly": 50,
      "formats": [
        "png",
        "svg"
      ],
      "batch": false,
      "burst": 10,
      "per_sec": 1,
      "products": 5,
      "import": false,
      "handoff": false,
      "price": null
    },
    "starter": "…",
    "pro": "…"
  },
  "limits": {
    "batch_max_items": 100,
    "body_max_bytes": "…",
    "batch_body_max_bytes": "…"
  }
}

Make a barcode

Send the type, the data and a file format. The answer holds the image, the checks and the printed size in millimetres. Each barcode made counts one against your month.

Make a UPC-A barcode as an SVG file

POST /v1/barcodes

curl
curl -s -X POST "https://api.launchdaylabs.com/v1/barcodes" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"upca","data":"036000291452","format":"svg"}'
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/barcodes", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "upca",
    "data": "036000291452",
    "format": "svg"
  }),
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.post(
    "https://api.launchdaylabs.com/v1/barcodes",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
    json={
        "type": "upca",
        "data": "036000291452",
        "format": "svg"
    },
)
print(r.status_code, r.json())

The answer, status 200. A "…" marks where it is cut short.

{
  "image": {
    "format": "svg",
    "mime": "image/svg+xml",
    "encoding": "utf8",
    "body": "<svg width=\"37.29mm\" height=\"25.94mm\" …"
  },
  "checks": [],
  "facts": {
    "data": "036000291452",
    "type": "upca",
    "width_mm": 37.29,
    "height_mm": 25.94,
    "bar_height_mm": 22.85,
    "module_mm": 0.33,
    "magnification": 100,
    "px_per_module": null,
    "bar_width_reduction_mm": 0,
    "wide_ratio": null,
    "bearer_mm": null
  }
}

In JSON, PNG and PDF images are base64 text, and SVG and EPS are plain text. To get the image file itself, name its type in an Accept header, such as Accept: image/png. The file answer carries the size in the Barcode-Width-Mm and Barcode-Height-Mm headers, and the codes of any warnings in Barcode-Warnings. The full warning sentences are only in the JSON answer.

Add product_id to also save the barcode's settings to one of your products. See Saved barcodes and the handoff pack.

Types and options

The table shows the types today. GET /v1/types gives the live list, with the plan table and the size limits. Every type makes PNG, SVG, PDF and EPS files; your plan sets which of them you can ask for.

The barcode types and the options each one takes
BarcodetypeGS1 typeOptions
UPC-AupcaYessize, height_mm, dpi, text, bar_color, background, quiet_zone, bar_width_reduction_mm
EAN-13ean13Yessize, height_mm, dpi, text, bar_color, background, quiet_zone, bar_width_reduction_mm
EAN-8ean8Yessize, height_mm, dpi, text, bar_color, background, quiet_zone, bar_width_reduction_mm
ITF-14itf14Yessize, height_mm, dpi, text, bar_color, background, bar_width_reduction_mm
GS1-128gs1-128Yessize, height_mm, dpi, text, bar_color, background, quiet_zone, bar_width_reduction_mm
Code 128code128Nosize, height_mm, dpi, text, bar_color, background, quiet_zone, bar_width_reduction_mm
QR CodeqrNosize, dpi, bar_color, background, quiet_zone, bar_width_reduction_mm
Data MatrixdatamatrixNosize, dpi, bar_color, background, quiet_zone, bar_width_reduction_mm
GS1 DataMatrixgs1-datamatrixYessize, dpi, bar_color, background, quiet_zone, bar_width_reduction_mm
GS1 Digital Link QR Codegs1-dl-qrYessize, dpi, bar_color, background, quiet_zone, bar_width_reduction_mm

Options go in options, all of them optional:

  • size: for UPC-A, EAN-13 and EAN-8, the magnification in percent, from 20 to 400. GS1's range is 80 to 200; outside it the barcode is still made, with a warning. For ITF-14, GS1-128 and Code 128, the width of the narrowest bar in millimetres. For the square codes, the width of one square in millimetres. Bar and square widths go from 0.05 to 5.
  • height_mm: the height of the bars. Left out, retail types use the standard height for the size.
  • dpi: for PNG only, the resolution. 300 when left out.
  • text: whether to show the digits under the bars.
  • bar_color and background: colors as 3 or 6 digit hex, such as #000000. A warning comes back for colors a scanner reads badly.
  • quiet_zone: the blank margins. Turning them off gives a warning.
  • bar_width_reduction_mm: the adjustment a printer may ask for, to allow for ink spread.

Check a number

Check data for a type without drawing anything, and without counting. The answer is 200 even when the number is wrong: the call worked, and ok is false with the reasons in checks, each in a plain sentence.

Check a number with a wrong check digit

POST /v1/validate

curl
curl -s -X POST "https://api.launchdaylabs.com/v1/validate" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"upca","data":"036000291453"}'
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/validate", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "upca",
    "data": "036000291453"
  }),
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.post(
    "https://api.launchdaylabs.com/v1/validate",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
    json={
        "type": "upca",
        "data": "036000291453"
    },
)
print(r.status_code, r.json())

The answer, status 200.

{
  "ok": false,
  "data": null,
  "checks": [
    {
      "level": "error",
      "code": "bad_check_digit",
      "message": "The last digit of this UPC-A number is 3 but should be 2; correct it, or check the other digits for a typing mistake."
    }
  ]
}

A number sent without its check digit gets one added, with a warning that says so.

GS1 data

Write GS1 data from named fields: sscc, gtin, production_date, best_before, expiry (dates as YYYY-MM-DD), lot, serial and count. The kind is gs1-128 for bracket data, or digital-link with a base_url for a web address. It is not counted.

Write GS1-128 data from named fields

POST /v1/gs1/build

curl
curl -s -X POST "https://api.launchdaylabs.com/v1/gs1/build" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"gs1-128","fields":{"gtin":"10036000291459","expiry":"2027-03-31","lot":"A1B2"}}'
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/gs1/build", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "kind": "gs1-128",
    "fields": {
      "gtin": "10036000291459",
      "expiry": "2027-03-31",
      "lot": "A1B2"
    }
  }),
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.post(
    "https://api.launchdaylabs.com/v1/gs1/build",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
    json={
        "kind": "gs1-128",
        "fields": {
            "gtin": "10036000291459",
            "expiry": "2027-03-31",
            "lot": "A1B2"
        }
    },
)
print(r.status_code, r.json())

The answer, status 200.

{
  "ok": true,
  "data": "(01)10036000291459(17)270331(10)A1B2",
  "checks": []
}

Send the data you get back to POST /v1/barcodes with the type gs1-128, or gs1-dl-qr for a Digital Link.

A retail pair

From one product number of 12 or 13 digits, make the UPC-A or EAN-13 and a GS1 Digital Link QR code that points to the product on your website. A pair counts as two: both are made, or neither is.

Make a retail pair: the UPC-A and its QR code

POST /v1/barcodes/pair

curl
curl -s -X POST "https://api.launchdaylabs.com/v1/barcodes/pair" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"gtin":"036000291452","base_url":"https://example.com","format":"svg"}'
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/barcodes/pair", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "gtin": "036000291452",
    "base_url": "https://example.com",
    "format": "svg"
  }),
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.post(
    "https://api.launchdaylabs.com/v1/barcodes/pair",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
    json={
        "gtin": "036000291452",
        "base_url": "https://example.com",
        "format": "svg"
    },
)
print(r.status_code, r.json())

The answer, status 200. A "…" marks where it is cut short.

{
  "linear": {
    "image": {
      "format": "svg",
      "mime": "image/svg+xml",
      "encoding": "utf8",
      "body": "<svg …"
    },
    "checks": [],
    "facts": {
      "data": "036000291452",
      "type": "upca",
      "width_mm": 37.29,
      "height_mm": 25.94
    }
  },
  "qr": {
    "image": {
      "format": "svg",
      "mime": "image/svg+xml",
      "encoding": "utf8",
      "body": "<svg …"
    },
    "checks": [],
    "facts": {
      "data": "https://example.com/01/00036000291452",
      "type": "gs1-dl-qr",
      "width_mm": 18.5,
      "height_mm": 18.5
    }
  }
}

Batches

On the Pro plan, POST /v1/barcodes/batch makes up to 100 barcodes in one request. Send items, a list of the same bodies POST /v1/barcodes takes, without product_id.

The answer holds made, failed and results, one result for each item in order. One bad item does not stop the others, and each barcode made counts one. An account can have one batch being made at a time.

Your products

Your register keeps each product's name, your SKU, its number, what it is and its status. The same products show in the app. Nothing here counts against your month.

Add a product to your register

POST /v1/products

curl
curl -s -X POST "https://api.launchdaylabs.com/v1/products" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Honey 12 oz","sku":"HNY-12","gtin":"036000291452"}'
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/products", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Honey 12 oz",
    "sku": "HNY-12",
    "gtin": "036000291452"
  }),
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.post(
    "https://api.launchdaylabs.com/v1/products",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
    json={
        "name": "Honey 12 oz",
        "sku": "HNY-12",
        "gtin": "036000291452"
    },
)
print(r.status_code, r.json())

The answer, status 201.

{
  "product": {
    "id": 1,
    "name": "Honey 12 oz",
    "sku": "HNY-12",
    "gtin": "036000291452",
    "level": "each",
    "contains_qty": null,
    "contains_id": null,
    "status": "active",
    "notes": null,
    "created_at": "2026-11-15T12:00:00.000Z",
    "updated_at": "2026-11-15T12:00:00.000Z"
  }
}

One number belongs to one product: a second product with it is refused, and the answer names the product that has it. The number is checked against GS1 format rules only.

Find your products by part of a name

GET /v1/products?q=honey&limit=20

curl
curl -s "https://api.launchdaylabs.com/v1/products?q=honey&limit=20" \
  -H "Authorization: Bearer $KEY"
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/products?q=honey&limit=20", {
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
  },
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.get(
    "https://api.launchdaylabs.com/v1/products?q=honey&limit=20",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
)
print(r.status_code, r.json())

The answer, status 200. A "…" marks where it is cut short.

{
  "products": [
    {
      "id": 1,
      "name": "Honey 12 oz",
      "sku": "HNY-12",
      "gtin": "036000291452",
      "level": "each",
      "contains_qty": null,
      "contains_id": null,
      "status": "active",
      "notes": null,
      "created_at": "2026-11-15T12:00:00.000Z",
      "updated_at": "2026-11-15T12:00:00.000Z"
    }
  ],
  "next": null,
  "count": {
    "counted": 1,
    "retired": 0,
    "total": 1,
    "limit": 1000,
    "total_limit": "…"
  }
}
  • GET /v1/products/:id reads one product, PATCH /v1/products/:id changes only the fields sent, and DELETE /v1/products/:id deletes it.
  • GET /v1/products/export.csv downloads the whole register as a CSV file, on every plan.
  • POST /v1/products/import/preview checks a CSV file and saves nothing, and POST /v1/products/import adds every row or none, on the Starter and Pro plans.
  • GET /v1/products/:id/case-number?indicator=1 works out the 14-digit number for a case of a product, and POST /v1/products/:id/case adds that case as a new product.

Saved barcodes and the handoff pack

A product can keep barcodes made for it. A saved barcode is its settings, so it is drawn again whenever you download it, in any format your plan makes.

  • POST /v1/products/:id/barcodes saves one. With an empty body, it is the standard barcode for the product's number. Saving with a key counts one.
  • GET /v1/products/:id/barcodes lists them. GET /v1/products/:id/barcodes/3.png downloads saved barcode 3 as a PNG; add ?dpi=600 for another resolution. DELETE /v1/products/:id/barcodes/:bid deletes one.
  • GET /v1/products/:id/handoff.zip downloads the printer handoff pack, on the Starter and Pro plans: the barcode as PDF, EPS, SVG and a high-resolution PNG, with a one-page spec sheet. It is drawn from a saved barcode that holds the product's number. It is not counted against your month, but there is a limit of packs a day.

Usage

See how many barcodes your account has made this month, and what your plan allows. Months turn over at midnight UTC on the first. Only barcodes that are made count; a request that fails counts nothing.

See this month's count

GET /v1/usage

curl
curl -s "https://api.launchdaylabs.com/v1/usage" \
  -H "Authorization: Bearer $KEY"
JavaScript
// Node 18 or later. Save as example.mjs and run it with node example.mjs.
const res = await fetch("https://api.launchdaylabs.com/v1/usage", {
  headers: {
    "Authorization": `Bearer ${process.env.KEY}`,
  },
});
console.log(res.status, await res.json());
Python
import os
import requests

r = requests.get(
    "https://api.launchdaylabs.com/v1/usage",
    headers={"Authorization": "Bearer " + os.environ["KEY"]},
)
print(r.status_code, r.json())

The answer, status 200.

{
  "plan": "pro",
  "month": "2026-11",
  "used": 3,
  "limit": 25000,
  "remaining": 24997,
  "resets_at": "2026-12-01T00:00:00Z",
  "formats": [
    "png",
    "svg",
    "pdf",
    "eps"
  ],
  "batch": true
}

Limits

Each key may send a burst of requests at once, then a steady number a second. The month's barcodes are counted for the whole account.

The limits of each plan
LimitFreeStarterPro
Barcodes a month by API or AI502,00025,000
Requests at once (burst)103060
Requests a second after a burst1310
  • Too fast, and the answer is 429 rate_limited with a Retry-After header: the seconds to wait.
  • Past the month's barcodes, the answer is 429 monthly_limit_reached, with Retry-After and, beside error, usage: the month, how many were made, the limit and when the count starts again. Nothing is charged for going over.
  • The largest request body each address takes is in GET /v1/types under limits. A larger one is 413 body_too_large.

Errors

Every error is JSON with a short code for your program and one plain sentence for a person:

{ "error": { "code": "bad_key", "message": "…" } }

Extra facts, such as checks or usage, sit beside error, never inside it. When the barcode data or settings are wrong, the answer is 422 and the code is one of the checks the barcode got, such as bad_check_digit. The table lists the server's own codes. A word in italics, such as wait, is filled in with the real value.

The error codes an API address can answer
CodeStatusThe sentence in message
bad_request400The web address of this request could not be read; check it for stray characters and try again.
bad_json400The request body is not valid JSON; check it for a missing quote, comma or bracket.
bad_body400A JSON object is needed here: named fields inside curly brackets, not a list, a number or text on its own.
unknown_field400The field "field" is not one this web address accepts; the fields it accepts are allowed.
missing_field400The field "field" is needed here; fill it in and try again.
bad_batch400Send "items" as a list of 1 to max barcodes.
bad_number400problem
bad_field400The field "field" problem.
number_needed400A product that is active or retired needs a product number; add one, or keep the product as a draft.
bad_link400A product cannot hold itself, and products cannot hold each other in a loop.
bad_indicator400problem
no_case_for_this_number400A case number is made from an item's number of 8, 12 or 13 digits, and this product has no such number; add one, or open the item itself if this product is already a case.
csv_not_text400This file is not plain CSV text; in your spreadsheet choose "CSV UTF-8" when you save it.
csv_empty400The file has no rows of products; put the column names on the first line and one product on each line below it.
csv_no_name_column400The file has no column for the product name; call the column "name" on the first line (or "product", "product name" or "title") and send it again.
csv_unclosed_quote400A quote mark in the file opens a cell that never closes; look for a stray " in the file and send it again.
csv_too_many_rows400The file has more than max rows of products, the most one import takes; split it into smaller files.
missing_key401This web address needs an API key; send the header "Authorization: Bearer" followed by your key.
bad_key401This API key is not one we know; check that you copied the whole key.
key_revoked401This API key has been switched off; use another key from your account.
email_not_confirmed403Confirm your email address first: open the link we sent you, or ask for a new one on your account page.
format_not_in_plan403The plan plan does not make format files; it makes formats.
plan_required403Making many barcodes in one request is part of these plans only: plans.
product_limit_reached403The plan plan holds up to limit products that are not retired; retire or delete one first, or move to a bigger plan.
register_full403Your register holds total products counting retired ones, the most the plan plan keeps; delete retired products you no longer need to make room.
import_not_in_plan403The plan plan does not add products from a file; add them one at a time, or move to a plan that does: plans.
handoff_not_in_plan403The plan plan does not include the printer handoff pack; it comes with these plans: plans.
not_found404There is nothing at this web address; check its spelling.
product_not_found404There is no such product on your account; open your list of products again and pick one from it.
barcode_not_found404There is no such saved barcode on this product; open the product's list of saved barcodes again and pick one from it.
method_not_allowed405This web address does not take method requests; use allow instead.
duplicate_number409Another product on your account already has this number; open that product, or check the number for a typing mistake.
too_many_saved409This product already keeps max saved barcodes, the most it may have; delete one it no longer needs, then save the new one.
import_in_progress409An import for this account is still being checked; wait for it to finish, then try again.
nothing_saved409This product has no saved barcode for its number yet; make its barcode first, then ask for the pack.
barcode_not_for_pack409That saved barcode does not hold this product's number, so it cannot go in the pack; choose one that does.
pack_in_progress409A handoff pack for this account is still being made; wait for it to finish, then ask again.
body_too_large413The request body is too large; the most this web address accepts is max_bytes bytes.
batch_output_too_large413This batch already holds as much image data as one answer can carry; send the remaining barcodes in another batch.
pack_too_large413This pack would be larger than one download may be; save the barcode at a smaller size, then ask for the pack again.
json_required415Send the request body as JSON, with the header "Content-Type: application/json".
import_has_problems422Nothing was saved, because reason.
pack_could_not_be_drawn422A file of the pack could not be drawn from the saved settings; the checks with this answer say why, so save the barcode again with settings that work, then ask for the pack.
rate_limited429Too many requests arrived in a short time; wait wait and try again.
monthly_limit_reached429This request would go past the limit barcodes the plan plan gives each month; the count starts again on date.
batch_in_progress429Your account already has a batch being made; wait for it to finish, then send the next one.
daily_pack_limit429You have made limit handoff packs today, the most allowed in one day; the count starts again at midnight UTC.
server_error500Something went wrong on our side; please try again in a moment.
not_available_yet501Saving to a product works only for a single barcode, with "product_id"; leave "save" out, and send a pair or a batch item without "product_id".
server_stopping503The server was restarting before it reached this barcode, so it was not made or counted; send it again.

What is checked

Numbers and GS1 data are checked against GS1 format rules: the identifiers, the lengths, the characters, the dates and the check digits. The printed size is worked out from the GS1 General Specifications, and a warning comes back when a barcode may not scan well, for example when it is too small or its colors are hard for a scanner to read.

That does not tell you whether a number was really issued to you by GS1, or whether a printed barcode will scan. Scan a printed proof before the full run.

The OpenAPI file

openapi.json describes every address, request and answer in the OpenAPI 3.1 format, which many API tools can read.

AI apps

To make barcodes and keep your register from an AI app instead of your own code, see AI apps.