Qeasy Cloud
Get Started
POSThttps://openapi.jushuitan.com/open/inventory/queryaccess_token + 签名

Inventory Query (inventory/query)

聚水潭库存查询接口,按修改时间增量分页拉取 SKU 在各仓的库存数、可用数与锁定数,支撑全渠道库存同步与超卖防控。

## Overview inventory/query reads item stock in Jushuitan ERP and returns per-SKU quantities in the main and sub-warehouses. Unlike the order endpoint, it supports incremental pulls by stock modify time, which makes it suitable for minute-level inventory sync — the core data source for unified stock and oversell prevention. ### Request essentials 1. POST with Content-Type: application/json; common parameters are signed per the auth rules. 2. Business parameters: page_index, page_size, modified_begin/modified_end (stock modify-time window); sku_ids (comma-separated) for pinpoint queries and wms_co_id for a specific sub-warehouse. 3. The response array carries sku_id, qty (main-warehouse on hand), available_qty, lock_qty (allocated), wms_co_id and wms_qty (sub-warehouse figures). 4. Sellable semantics: use available_qty (or qty minus lock_qty), then split by shop quota. Pushing raw qty during promotion peaks guarantees overselling. ### Integration advice - Drive the incremental cursor from modified_begin (the max modify time seen), overlapping the window by 1-2 minutes against boundary losses. - Qeasy orchestrates Jushuitan stock → delta calculation → marketplace stock write-back, with alerting and automatic retry on write-back failures. ### Sub-warehouse semantics Enterprise tenants run multiple sub-warehouses (wms_co_id) whose figures differ from the main warehouse — agree with the business which scope is authoritative for unified stock. In sub-warehouse mode, pull per warehouse, compute sellable quantities separately, then aggregate by each shop's owning warehouse before pushing. Mixing scopes sells warehouse A's stock into warehouse B's shops and strands orders.

Code examples

curl
curl -X POST "https://openapi.jushuitan.com/open/inventory/query" \
  -H "Content-Type: application/json" \
  -d '{"app_key":"your_app_key","access_token":"TOKEN","timestamp":1780000000,"charset":"utf-8","sign":"SIGN","page_index":1,"page_size":50,"modified_begin":"2026-06-01 00:00:00","modified_end":"2026-06-01 00:05:00"}'

Error codes

CodeMessageMeaning
0执行成功查询成功
10无效签名签名错误
100access_token 超时刷新 token 后重试