Lot list (expiry date)
Changed onGet the list of expiry-date lots of products (products with type LOT). Each lot has a lot code (custom_id), manufacturing date and expiry date, and is linked to one or more variations of the product via lot_variations.
Datetime values (expire_date, manufacturing_date, ...) are in UTC.
Request
- Base URLhttps://pos.pages.fm/api/v1
- URLhttps://pos.pages.fm/api/v1/shops/{SHOP_ID}/lots
- AuthAPI key in query parameter api_key
Path parameters
Shop ID
Query parameters
Page number
Page size
Search by lot code, product code/display ID or variation code/display ID
Filter lots that have stock records in these warehouses (lots without any stock record are still returned)
[ "20c3c8b1-d83d-47b1-8c81-d9156d881563" ]
Filter by sellable quantity of the lot, JSON with fields:
- type: greaterOrEqual | smallerOrEqual | between
- value: quantity (for greaterOrEqual / smallerOrEqual)
- minValue, maxValue: range (for between)
- warehouseId: warehouse ID, all for all warehouses
- isFilterTotal: true to compare the total across warehouses, otherwise compare each warehouse record
Filter by stock (quantity physically on hand) of the lot, same JSON format as remain_quantity
Filter lots having a linked variation with retail price greater than or equal to this value
Filter lots having a linked variation with retail price less than or equal to this value
Filter by expiry date, only lots that still have sellable stock (remain_quantity > 0) in at least one warehouse are returned:
- in_date: not expired yet
- out_of_date: already expired
- JSON {"start_date": <unix>, "end_date": <unix>}: expiry date within the range (unix timestamp in seconds)
Filter by time range, JSON {"key": ..., "since": <unix>, "until": <unix>} (unix timestamp in seconds, until defaults to now). key:
- inserted_at: by created time (default)
- manufacturing: by manufacturing date
- expire: by expiry date
Sort, JSON {"field": ..., "order": "ascend" | "descend"}. field: mfg (manufacturing date), exp (expiry date), inserted_at (created time), updated_at (updated time). Default: expiry date descending, then created time descending
Response
Success
Example response
{
"data": [
{
"product": {
"type": "LOT"
}
}
]
}Changes
- info
endpoint added
- info