Qeasy Cloud
Get Started
POSThttp://api.guanyierp.com/rest/erp_open (method=gy.erp.stock.get)appkey + sessionkey + MD5 签名

Stock Query (gy.erp.stock.get)

管易云库存查询接口,按仓库与商品维度分页拉取库存量、可用量,用于全渠道库存下发与补货计算的库存底账。

## Overview gy.erp.stock.get reads stock inside GuanYi C-ERP by warehouse and item/SKU, returning on-hand and available quantities. When GuanYi acts as an order hub with the stock ledger in the ERP (Kingdee/Yonyou), this endpoint mainly reconciles GuanYi-side allocations and in-flight quantities; when GuanYi is the stock ledger, it is the extraction point for omnichannel stock distribution. ### Request essentials 1. System parameters and signing follow the call convention; common business parameters: page_no/page_size, warehouse_code, and item_code/sku_code for pinpoint queries. 2. Rows carry warehouse_code, item_code, sku_code, qty (on hand) and available_qty; availability means on-hand minus order allocations. 3. Stock is a snapshot — schedule full pulls, diff in the iPaaS, and push only changed SKUs to sales channels to bound write volume. 4. Multi-warehouse setups should pull per warehouse_code to avoid full-scan timeouts. ### Typical pipeline GuanYi stock → Qeasy snapshot diff → sellable quantity per shop quota → write-back to Jushuitan/WDT/marketplaces; drift beyond threshold raises a stock-calibration alert to stop silent overselling. ### Allocations and returns in flight GuanYi allocations come from captured-but-unshipped orders and spike during promotions, so publish available-minus-buffer to sales channels, with the buffer sized per category velocity. Returned goods under inspection stay out of available quantity until QC releases them — mind this lag when reconciling stock, and never count uninspected returns as sellable.

Code examples

curl
curl -X POST "http://api.guanyierp.com/rest/erp_open" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d '{"appkey":"AK","sessionkey":"SK","method":"gy.erp.stock.get","page_no":1,"page_size":100,"warehouse_code":"WH001","sign":"SIGN"}'

Error codes

CodeMessageMeaning
Base Param error / ErrorSessionKey基本参数错误sessionkey 失效
Sign error签名错误重算 sign