Skip to main content
POST

Authorizations

Authorization
string
header
required

Token returned by POST /auth/token, sent as Authorization: Bearer <token>.

Body

application/json

Body of POST /lots/upsert.

store_id
integer
required

Store the lot belongs to.

Example:

1234

lot_code
string
required

Lot code. Used as the full unique code when sku is omitted.

Example:

"L2026-04"

sku
string

SKU of the product. Required when creating a lot. When sent, the lot's unique code becomes <sku>-<lot_code>.

Example:

"SKU-RED-M"

expiration_date
string<date>

Expiration date (YYYY-MM-DD). Optional; when omitted on an existing lot the stored date is kept.

Example:

"2026-12-31"

Response

Lot created or updated.

The lot after the upsert.

id
integer
required

Lot id.

Example:

987

unique_code
string
required

The lot's unique code within the store.

Example:

"SKU-RED-M-L2026-04"

expiration_date
string<date-time> | null
required

Expiration date as an ISO 8601 timestamp at UTC midnight, or null.

Example:

"2026-12-31T00:00:00Z"

status
enum<string>
required

Lot status, in lowercase.

Available options:
active,
holded,
damaged,
expired
Example:

"active"