Qeasy Cloud
Get Started
POSThttps://open.youzanyun.com/api/youzan.items.onsale.get/4.0.0access_token(query 传参)

Query On-sale Items (youzan.items.onsale.get)

有赞出售中商品分页查询接口,返回商品 ID、标题、价格、库存与 SKU 明细,用于商品主数据对齐与库存校准。

## Overview youzan.items.onsale.get pages through a shop's on-sale items, returning item_id, title, price, quantity (total stock), item_no (merchant code) and SKU details (sku_id, sku_no, price, quantity). Its companion youzan.items.inventory.get covers warehouse (delisted) items — together they enumerate the full catalog. ### Request essentials 1. POST with Content-Type: application/json; access_token in the URL query; use the documented version in the path (e.g. 4.0.0). 2. Paginate via page_no/page_size; incremental pulls use an update_time window (optional filters like title search q or tag_id per the docs). 3. SKU-level fields are the key to stock calibration: sku_no is the cross-system product key, so a one-to-one mapping between Youzan sku_no and ERP material codes must exist before integration. 4. quantity is Youzan's selling stock; comparing it with the ERP stock ledger exposes sync gaps (oversell vs silent stockouts). ### Typical pipeline ERP product master → Qeasy field mapping (code, barcode, category, price) → Youzan item create/update; a scheduled job pulls Youzan items and stock back via this API and produces an ERP-versus-Youzan divergence report for operations to fix. ### Pairing with stock APIs This list returns per-item totals; precise SKU-level stock maintenance goes through the SKU stock-update API addressed by sku_id or item_no plus sku_no. Delisted items are absent here, so a full-catalog audit combines youzan.items.inventory.get with this endpoint, merging and deduplicating on item_id to reconstruct the complete catalog.

Code examples

curl
curl -X POST "https://open.youzanyun.com/api/youzan.items.onsale.get/4.0.0?access_token=TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"page_no":1,"page_size":100}'

Error codes

CodeMessageMeaning
4001非法请求地址路径格式错误
4201非法的请求凭证token 无效,重新获取
4204无权限访问未申请商品类目能力包或被风控
4101请求太频繁触发限流