/shops/{SHOP_ID}/inventory_analytics/inventoryStatistics by variantGET/shops/{SHOP_ID}/inventory_analytics/inventory_by_productStatistics by productStatistics by variant
/shops/{SHOP_ID}/inventory_analytics/inventoryGet inventory statistics grouped by product variant
Path parameters
SHOP_IDintegerrequiredShop ID
Query parameters
pageintegerPage number
page_sizeintegerPage size
start_dateinteger · unix timestamprequiredStart date (unix timestamp)
end_dateinteger · unix timestamprequiredEnd date (unix timestamp)
typestringrequiredStatistics by
"actual"inventory"remain"Remain quantitywarehouse_ids[]array<string · uuid>Filter histories by warehouse ID(s). Restricts the inventory movements considered to the listed warehouses.
variation_ids[]array<string · uuid>Filter by variation IDs. When is_exclude_variation=true, this list becomes an exclusion list.
is_exclude_variationbooleanWhen true, treat variation_ids[] as an exclusion list instead of an inclusion list.
product_ids[]array<string · uuid>Filter by product IDs. When is_exclude_product=true, this list becomes an exclusion list.
is_exclude_productbooleanWhen true, treat product_ids[] as an exclusion list instead of an inclusion list.
category_ids[]array<integer>Filter by category IDs. A single integer value is also accepted (category_ids=567).
brand_ids[]array<string>Filter by brand IDs (UUID). Special value no_value matches products without a brand.
product_tags[]array<string>Filter by product tag IDs (integers serialized as strings). Special value no_value matches products without any tag.
Combine with filter_exclude_tag=true to negate the filter.
filter_exclude_tagbooleanWhen true, treat product_tags[] as an exclusion list. Products with any of the listed tags are excluded.
supplier_product_ids[]array<string>Filter by supplier IDs (integers serialized as strings). Special value no_value matches products without a supplier.
By default the product must contain ALL listed supplier IDs; set is_filter_supplier_by_or=true to match ANY.
is_filter_supplier_by_orbooleanWhen true, OR-combine the supplier_product_ids[] filter (match any) instead of AND (match all).
manipulation_warehouse_ids[]array<string · uuid>Filter by manipulation warehouses configured on the product. By default the product must contain ALL listed warehouses;
set is_filter_manipulation_warehouse_by_or=true to match ANY. Products without any manipulation warehouse are always included.
is_filter_manipulation_warehouse_by_orbooleanWhen true, OR-combine the manipulation_warehouse_ids[] filter (match any) instead of AND (match all).
data_sortstringJSON-encoded sort spec {"sort_by": <field>, "asc_desc": "asc"|"desc"}. Supported sort_by values:
product_id, product_name, variation, purchase_import, purchase_export, return_import,
transfer_import, transfer_export, sell_export, stocktaking_import, stocktaking_export,
other_import, other_export, total_import_value, total_export_value, early_actual,
late_actual, early_actual_value, late_actual_value.
Responses
dataarray<object>Statistics by variant
page_numberintegerCurrent page number
page_sizeintegerPage size
total_entriesintegerTotal number of entries
total_pagesintegerTotal number of pages
successbooleanSuccess status
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/inventory_analytics/inventory?api_key=API_KEY&start_date=1760720400&end_date=1763398799&type=actual"{
"success": true,
"data": [
{
"id": "d9005a9f-257b-4ce7-af6e-bad339598ea6",
"begin_inventory": 1099,
"begin_inventory_value": 109900000,
"end_inventory": 1128,
"end_inventory_value": 112800000,
"purchase_import": 30,
"return_import": 0,
"stocktaking_import": 2,
"transfer_import": 5,
"total_import": 37,
"total_import_value": 3700000,
"purchase_export": 0,
"transfer_export": -5,
"sell_export": 0,
"stocktaking_export": 0,
"total_export": -8,
"total_export_value": 800000,
"variation": {
"id": "d9005a9f-257b-4ce7-af6e-bad339598ea6",
"product_id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d",
"shop_id": 20,
"custom_id": "TESTMATDOS",
"display_id": 15,
"barcode": null,
"images": [
"https://content.pancake.vn/user-content-dev2.pancake.vn/2025/9/30/d05f44dcf2b9f96312d88b718da35aa5317242d6.jpg"
],
"fields": [
{
"id": "2b61c249-35dc-4b79-a3aa-a173c63a8061",
"keyValue": "BLUE",
"name": "Color",
"value": "blue"
},
{
"id": "b053dfb9-b7b6-4d8a-9fb4-197d7b0d7556",
"keyValue": "L",
"name": "Size",
"value": "L"
}
],
"product": {
"category_ids": [
567
],
"custom_id": "ANTT",
"display_id": 13038,
"images": [],
"inserted_at": "2024-11-18T03:18:03",
"name": "Áo nam Pari đẹp thời trang"
}
}
}
],
"page_number": 1,
"page_size": 30,
"total_entries": 4,
"total_pages": 1
}Statistics by product
/shops/{SHOP_ID}/inventory_analytics/inventory_by_productGet inventory statistics grouped by product
Path parameters
SHOP_IDintegerrequiredShop ID
Query parameters
pageintegerPage number
page_sizeintegerPage size
start_dateinteger · unix timestamprequiredStart date (unix timestamp)
end_dateinteger · unix timestamprequiredEnd date (unix timestamp)
typestringrequiredStatistics by
"actual"inventory"remain"Remain quantitywarehouse_ids[]array<string · uuid>Filter histories by warehouse ID(s). Restricts the inventory movements considered to the listed warehouses.
variation_ids[]array<string · uuid>Filter by variation IDs. When is_exclude_variation=true, this list becomes an exclusion list.
is_exclude_variationbooleanWhen true, treat variation_ids[] as an exclusion list instead of an inclusion list.
product_ids[]array<string · uuid>Filter by product IDs. When is_exclude_product=true, this list becomes an exclusion list.
is_exclude_productbooleanWhen true, treat product_ids[] as an exclusion list instead of an inclusion list.
category_ids[]array<integer>Filter by category IDs. A single integer value is also accepted (category_ids=567).
brand_ids[]array<string>Filter by brand IDs (UUID). Special value no_value matches products without a brand.
product_tags[]array<string>Filter by product tag IDs (integers serialized as strings). Special value no_value matches products without any tag.
Combine with filter_exclude_tag=true to negate the filter.
filter_exclude_tagbooleanWhen true, treat product_tags[] as an exclusion list. Products with any of the listed tags are excluded.
supplier_product_ids[]array<string>Filter by supplier IDs (integers serialized as strings). Special value no_value matches products without a supplier.
By default the product must contain ALL listed supplier IDs; set is_filter_supplier_by_or=true to match ANY.
is_filter_supplier_by_orbooleanWhen true, OR-combine the supplier_product_ids[] filter (match any) instead of AND (match all).
manipulation_warehouse_ids[]array<string · uuid>Filter by manipulation warehouses configured on the product. By default the product must contain ALL listed warehouses;
set is_filter_manipulation_warehouse_by_or=true to match ANY. Products without any manipulation warehouse are always included.
is_filter_manipulation_warehouse_by_orbooleanWhen true, OR-combine the manipulation_warehouse_ids[] filter (match any) instead of AND (match all).
data_sortstringJSON-encoded sort spec {"sort_by": <field>, "asc_desc": "asc"|"desc"}. Supported sort_by values:
product_id, product_name, variation, purchase_import, purchase_export, return_import,
transfer_import, transfer_export, sell_export, stocktaking_import, stocktaking_export,
other_import, other_export, total_import_value, total_export_value, early_actual,
late_actual, early_actual_value, late_actual_value.
Responses
dataarray<object>Statistics by product
page_numberintegerCurrent page number
page_sizeintegerPage size
total_entriesintegerTotal number of entries
total_pagesintegerTotal number of pages
successbooleanSuccess status
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/inventory_analytics/inventory_by_product?api_key=API_KEY&start_date=1760720400&end_date=1763398799&type=actual"{
"success": true,
"page_number": 1,
"page_size": 30,
"total_entries": 1,
"total_pages": 1,
"data": [
{
"id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d",
"product_id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d",
"begin_inventory": 2597,
"begin_inventory_value": 259700000,
"end_inventory": 2870,
"end_inventory_value": 287000000,
"purchase_import": 130,
"return_import": 5,
"stocktaking_import": 2,
"transfer_import": 5,
"total_import": 296,
"total_import_value": 29600000,
"purchase_export": 0,
"transfer_export": -5,
"sell_export": -15,
"stocktaking_export": 0,
"total_export": -23,
"total_export_value": 2300000,
"product": {
"category_ids": [
567
],
"custom_id": "ANTT",
"display_id": 13038,
"images": [],
"inserted_at": "2024-11-18T03:18:03",
"name": "Áo nam Pari đẹp thời trang"
}
}
]
}