curl --request POST \
--url https://api.cubbo.com/v1/lots/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": 1234,
"sku": "SKU-RED-M",
"lot_code": "L2026-04",
"expiration_date": "2026-12-31"
}
'
{
"id": 987,
"unique_code": "SKU-RED-M-L2026-04",
"expiration_date": "2026-12-31T00:00:00Z",
"status": "active"
}
Lots
Create a lot or update its expiration date
Creates a lot for a product, or updates the expiration date of an existing lot. The lot is
identified by its unique code inside the store, which is built as <sku>-<lot_code> when
sku is sent, or is exactly lot_code when it is not.
- If no lot with that code exists,
skuis required and must belong to a product of the store; the lot is created with the givenexpiration_date(optional). - If the lot exists, only
expiration_dateis updated, and only when you send one; omitting it leaves the stored date untouched. - Moving the date into the future re-validates the lot shortly after the call: a lot that had been expired is reactivated, together with its stock units. Moving it into the past expires the lot.
expiration_datein the response is returned as an ISO 8601 timestamp at UTC midnight of the stored date.statusin the response is the lot status in lowercase (active,holded,damaged,expired).
POST
/
lots
/
upsert
curl --request POST \
--url https://api.cubbo.com/v1/lots/upsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": 1234,
"sku": "SKU-RED-M",
"lot_code": "L2026-04",
"expiration_date": "2026-12-31"
}
'
{
"id": 987,
"unique_code": "SKU-RED-M-L2026-04",
"expiration_date": "2026-12-31T00:00:00Z",
"status": "active"
}
Authorizations
Body
application/json
Body of POST /lots/upsert.
Response
Lot created or updated.
The lot after the upsert.