Skip to main content
POST
Create a serial

Authorizations

X-API-Key
string
header
required

Path Parameters

gtin
string
required

GTIN barcode (8, 12, 13 or 14 digits), normalized to GTIN-14 for lookup.

Pattern: ^[0-9]{8,14}$

Body

application/json

Payload for POST /products/{gtin}/serials.

serial
string
required

GS1 AI(21) serial number: 1 to 20 printable ASCII characters, no spaces.

Required string length: 1 - 20
Pattern: ^[!-~]{1,20}$
lot_id
string<shortuuid> | null

URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
production_date
string<date-time> | null

When the unit was produced.

expiration_date
string<date> | null

Expiration date (GS1 AI 17).

best_before_date
string<date> | null

Best-before date (GS1 AI 15).

Response

Created

A serial as read from the API. Mirrors ProductSerial.

id
string<shortuuid>
required

URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
product_id
string<shortuuid>
required

The product this serial belongs to.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
gtin
string
required

The product's GTIN, normalized to GTIN-14.

serial
string
required

GS1 AI(21) serial number.

created
string<date-time>
required

Server-side ISO 8601 timestamp of creation (UTC).

modified
string<date-time>
required

Server-side ISO 8601 timestamp of last modification (UTC).

lot_id
string<shortuuid> | null

URL-safe 22-character shortuuid encoding of the row's UUID primary key. Stable across the row's lifetime; suitable for sharing in URLs, log lines, and external SDK clients. Accepted on input as either the shortuuid form or the canonical UUID form (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
production_date
string<date-time> | null

When the unit was produced. Null when unset.

expiration_date
string<date> | null

Expiration date (GS1 AI 17). Null when unset.

best_before_date
string<date> | null

Best-before date (GS1 AI 15). Null when unset.