Lot

Lot list (expiry date)

Changed on

Get 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.

get/shops/{SHOP_ID}/lots

Request

  • Base URL
    https://pos.pages.fm/api/v1
  • URL
    https://pos.pages.fm/api/v1/shops/{SHOP_ID}/lots
  • Auth
    API key in query parameter api_key

Path parameters

SHOP_IDinteger required
Example:20

Shop ID

Query parameters

pageinteger
Example:1

Page number

page_sizeinteger
Example:30

Page size

searchstring
Example:LO-XA

Search by lot code, product code/display ID or variation code/display ID

warehouse_ids[]string[]

Filter lots that have stock records in these warehouses (lots without any stock record are still returned)

[
  "20c3c8b1-d83d-47b1-8c81-d9156d881563"
]
remain_quantitystring
Example:{"type":"greaterOrEqual","value":1,"warehouseId":"all","isFilterTotal":true}

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
actual_remain_quantitystring
Example:{"type":"between","minValue":1,"maxValue":100,"warehouseId":"all","isFilterTotal":true}

Filter by stock (quantity physically on hand) of the lot, same JSON format as remain_quantity

min_retail_priceinteger
Example:100000

Filter lots having a linked variation with retail price greater than or equal to this value

max_retail_priceinteger
Example:500000

Filter lots having a linked variation with retail price less than or equal to this value

expiry_datestring
Example:in_date

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)
rangestring
Example:{"key":"expire","since":1759276800,"until":1767225599}

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_fieldstring
Example:{"field":"exp","order":"ascend"}

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

page_numberinteger

Page number

page_sizeinteger

Page size

successboolean

Success status

total_entriesinteger

Total entries

total_pagesinteger

Total pages

Example response

{
  "data": [
    {
      "product": {
        "type": "LOT"
      }
    }
  ]
}

Changes