Qeasy Cloud
Get Started
POSThttps://openapi.yonyoucloud.com/yonbip/scm/stock/QueryCurrentStocksByConditionaccess_token

On-hand Stock Query (QueryCurrentStocksByCondition)

YonBIP 供应链域现存量查询接口,按条件分页拉取物料在各仓库的现存量与可用量,是库存同步、补货计算与超卖防控的数据入口。

## Overview QueryCurrentStocksByCondition is the on-hand (real-time) stock query in the YonBIP supply-chain cloud (scm domain). It returns balance and available quantities of materials by stock organization and warehouse, matching the figures of the on-hand report in the UI — a solid stock ledger for unified-inventory and replenishment scenarios. ### Request essentials 1. POST with Content-Type: application/json; access_token goes in the URL query. 2. Pagination via pageIndex/pageSize. Common conditions: stock org, warehouse, material code and whether zero-balance rows are included; exact condition names depend on the tenant API documentation. 3. On-hand data is a snapshot without a modify-time cursor. Schedule full pulls, diff snapshots inside the iPaaS, and publish only the delta to e-commerce mid-offices and store systems. 4. Confirm the available-quantity definition with the business: on-hand minus reserved/locked is the sellable figure — syncing raw balances to sales channels invites overselling. ### Typical pipeline YonBIP on-hand → Qeasy snapshot diff → warehouse-level sellable stock in Jushuitan/WDT → stock write-back to marketplaces; the same feed powers safety-stock alerts and replenishment proposals. ### Reconciling with the stock ledger On-hand figures are real-time aggregates of the stock ledger. If they disagree with inventory reports, first check for unapproved inbound or outbound documents, which depends on the when-to-update-on-hand setting. For cross-period reconciliation, remember this API reflects the present moment — historical positions must be recomputed from the ledger by period, not inferred backwards from on-hand data.

Code examples

curl
curl -X POST "https://openapi.yonyoucloud.com/yonbip/scm/stock/QueryCurrentStocksByCondition?access_token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"pageIndex":1,"pageSize":100,"warehouse":"WH001"}'

Error codes

CodeMessageMeaning
00000success成功
20002token 失效access_token 过期,需重新获取
40000参数错误条件或分页参数不合法