Products & inventory

Lot

1 endpoints · https://pos.pages.fm/api/v1

View Markdown

Lot list (expiry date)

GET/shops/{SHOP_ID}/lots

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.

Path parameters

SHOP_IDintegerrequired

Shop ID

Example: 20

Query parameters

pageinteger

Page number

Default: 1 · Example: 1
page_sizeinteger

Page size

Default: 30 · Example: 30
searchstring

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

Example: "LO-XA"
warehouse_ids[]array<string>

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

remain_quantitystring

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
Example: "{\"type\":\"greaterOrEqual\",\"value\":1,\"warehouseId\":\"all\",\"isFilterTotal\":true}"
actual_remain_quantitystring

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

Example: "{\"type\":\"between\",\"minValue\":1,\"maxValue\":100,\"warehouseId\":\"all\",\"isFilterTotal\":true}"
min_retail_priceinteger

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

Example: 100000
max_retail_priceinteger

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

Example: 500000
expiry_datestring

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)
Example: "in_date"
rangestring

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

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

Example: "{\"field\":\"exp\",\"order\":\"ascend\"}"

Responses

object
dataarray<LotProduct>

List of lots

page_numberinteger

Page number

page_sizeinteger

Page size

successboolean

Success status

total_entriesinteger

Total entries

total_pagesinteger

Total pages

Request
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/lots?api_key=API_KEY"
Response 200
{
  "success": true,
  "data": [
    {
      "id": "d0e4a4b0-0c6d-4dc1-8252-447bba021b3e",
      "custom_id": "LO-XA",
      "expire_date": "2027-10-11T17:00:00",
      "manufacturing_date": "2026-10-11T17:00:00",
      "inserted_at": "2026-10-12T07:35:10.000000",
      "updated_at": "2026-10-12T07:35:10.000000",
      "product": {
        "id": "da9b9e28-af65-4456-916e-ac8f8eb00334",
        "name": "TEST6972#2",
        "type": "LOT",
        "image": null,
        "tags": [],
        "custom_id": "SP-L",
        "display_id": 13721,
        "bonus_products": [],
        "brand_id": null,
        "creator_id": "84616be7-7a6b-4f58-af37-2c64d9ee04a9",
        "inserted_at": "2026-10-12T07:29:45",
        "is_published": true,
        "is_sell_negative": null,
        "limit_quantity_to_warn": 0,
        "limit_quantity_to_warn_by_warehouse": null,
        "manipulation_warehouses": [],
        "materials": [],
        "measure_group_id": null,
        "note": null,
        "note_product": "",
        "product_attributes": [],
        "supplier_product_ids": [],
        "warning_by_variation": false,
        "categories": []
      },
      "lot_variations": [
        {
          "id": "a560ac18-8d5b-46ef-82f6-bf1474ad1c8f",
          "variation_id": "daf62728-ae6f-4354-94e4-4a12855c4293",
          "inserted_at": "2026-10-12T07:35:10.000000",
          "updated_at": "2026-10-12T07:35:10.000000"
        }
      ]
    }
  ],
  "page_number": 1,
  "page_size": 30,
  "total_entries": 1,
  "total_pages": 1
}