Qeasy Cloud
Get Started
GEThttps://api.yonyouup.com/api/currentstock/batch_gettoken(query 传参)

Batch Get On-hand Stock (currentstock/batch_get)

U8 OpenAPI 库存管理类现存量查询接口,批量拉取存货在各仓库的结存数量,用于库存同步、经销商要货可视与补货计算的库存底数。

## Overview currentstock/batch_get belongs to the inventory-management family of the U8 open platform and returns on-hand balances per inventory item and warehouse, matching the Stock > On-hand report in the U8 client. For enterprises that treat U8 as the stock ledger feeding sellable inventory to e-commerce and dealer portals, this is the standard extraction endpoint. ### Request essentials 1. GET with token, from_account, to_account, app_key, app_secret and pagination (page_index, rows_per_page) in the query string. 2. Narrow the scan with warehouse (cWhCode) and inventory item (cInvCode) filters; in production, pull warehouse by warehouse to bound per-request latency. 3. On-hand data is a snapshot without a modify-time cursor: run scheduled full pulls, diff snapshots in the iPaaS, and emit only changed rows downstream — this drastically cuts write pressure on commerce mid-offices. 4. The U8 "when to update on-hand" option (on save vs on approve) changes balance semantics; align the sync definition with finance and warehouse teams first. ### Typical pipeline U8 on-hand → Qeasy snapshot diff → sellable quantity (balance minus allocated) → stock push to Jushuitan/WDT/store POS; the same feed drives safety-stock alerts and replenishment proposals. ### Availability semantics U8 computes available quantity from on-hand, expected inbound and outbound, and frozen amounts according to inventory options that differ per enterprise — confirm the formula with the warehouse team before syncing sellable stock. For ATP-grade figures, prefer an availability report API or compute the value inside the integration layer, rather than letting two systems disagree on the definition.

Code examples

curl
curl -G "https://api.yonyouup.com/api/currentstock/batch_get" \
  --data-urlencode "from_account=source_acc" \
  --data-urlencode "to_account=u8_acc" \
  --data-urlencode "app_key=your_app_key" \
  --data-urlencode "app_secret=your_app_secret" \
  --data-urlencode "token=YOUR_TOKEN" \
  --data-urlencode "rows_per_page=100"

Error codes

CodeMessageMeaning
0成功查询成功
20005U8 服务调用失败EAI 执行异常,检查 U8 服务状态后重试