Skip to main content
PATCH
Update 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}$
serial_id
string<shortuuid>
required

Id of the serial.

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

Body

application/json

Payload for PATCH /products/{gtin}/serials/{serial_id}. Only the keys present are applied.

serial
string | null

GS1 AI(21) serial number.

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. Null clears it.

expiration_date
string<date> | null

Expiration date (GS1 AI 17). Null clears it.

best_before_date
string<date> | null

Best-before date (GS1 AI 15). Null clears it.

Response

OK

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.