Qeasy Cloud
Get Started

Authoritative Tutorial: Kingdee Cloud Xingchen Warehouse Query Interface Field Handbook (P2-234)

· 王浩宇· Engineering Best Practices· 12 views· 4 min read
Jushuitan金蝶云星辰仓库主数据供应链集成Field Mapping轻易云Incremental Sync

What Problem This Interface Solves

In retail and e-commerce supply chain integration, warehouse master data is the foundation for every downstream business document: orders, inventory, transfers, and stocktakes. We often need to sync warehouses from Kingdee Cloud Xingchen to the partner WMS, or maintain warehouse code mapping between them. This interface (/jdy/v2/bd/store) is built exactly for that purpose: it pulls warehouse master data in a pure query mode, supports modification-time-based incremental queries, pagination, and active-status filtering, providing the authoritative source for all downstream warehouse mappings.

Interface Capability Overview

  • Authentication: Kingdee Cloud Xingchen Open Platform OAuth 2.0 authorization code mode. The access token is centrally managed by Qeasy and automatically injected into request headers at runtime.
  • Request Method: HTTP GET, base path /jdy/v2/bd/store.
  • Request Parameters: page, page_size, enable (1 = active only), modify_start_time, modify_end_time (millisecond timestamps), group_id (filter by category).
  • Response Structure: JSON, with a top-level data array; each record contains id, number, name, group_*, enable, is_allow_freight, is_allow_neg, and similar fields.
  • Pagination Mode: Classic page/page_size traversal. In Qeasy, the pagination handler iterates automatically — no manual loops needed.
  • Incremental Mode: Time-window increment based on modify_start_time/modify_end_time. Run a full sync first, then switch to incremental.
  • Schedule: crontab 4 */3 * * *, every 3 hours.

Typical Field Mapping

Field NameTypeMeaningPractical Notes
idstringInternal primary key in KingdeeFor in-system reference only; use number for cross-system reconciliation
numberstringWarehouse codeThe core key for cross-system reconciliation — keep it unique, stable, and unaffected by org changes
namestringDisplay nameDisplay only; may be duplicated, not a primary key
group_idstringWarehouse category primary keyCategory changes do not affect the warehouse itself
group_numberstringWarehouse category codeUsed for hierarchy mapping (e.g., finished goods, e-commerce)
group_namestringWarehouse category nameFor display and grouping
enablestringStatus: 1 = active / 0 = disabledDisabled warehouses should not participate in inbound/outbound — filter enable=1 during mapping
is_allow_freightstringWhether bin/location management is enabledAffects whether downstream documents carry bin fields
is_allow_negstringWhether negative stock is allowedOnly enabled for ship-before-receive scenarios; pass through as needed

How to Configure on Qeasy

Qeasy wraps this interface as the "Kingdee Cloud Xingchen V2 - Query Warehouse" adapter. Simply select the Kingdee.YXC / bd_store template on the source side. The metadata pre-configures id and number as standard fields; idCheck: true enables primary key validation, and autoFillResponse: true lets the platform auto-fill the response schema. Configure the Target as a "write no-op." The request parameters {{PAGINATION_PAGE_SIZE}}, {{LAST_SYNC_TIME}}000, and {{CURRENT_TIME}}000 are built-in Qeasy variables. The field mapper automatically maps Kingdee fields to the partner WMS fields (warehouse_code, warehouse_name, warehouse_group, warehouse_status) according to the table above.

Cross-Solution Practical Points

  1. Use number, not id, as the cross-system primary key: id is internal to Kingdee and may change across tenants or between test/prod environments; number is far more stable.
  2. First run full, then incremental: On the very first run, omit the time window for a full sync. Afterwards, use modify_start_time from the last sync time. A safe practice is to roll back ~5 minutes to avoid boundary data loss.
  3. Filter by active status: Disabled warehouses should not flow into downstream business. Pass enable=1 in the request, or filter at the mapping stage.
  4. Category fields are a soft hierarchy: When creating warehouses cross-system, you can write group_number as a warehouse-type tag into a custom field on the partner WMS, making it easier to route documents by warehouse type.
  5. Pass through bin and negative-stock flags: Downstream systems need to know whether a warehouse uses bin management and whether negative stock is allowed. Sync is_allow_freight and is_allow_neg together.
  6. Do not be greedy with page size: Kingdee is most stable with page size ≤ 100. The Qeasy default of 50 is sufficient; lower it to 30 if the network is shaky.

Pitfall Review

  1. Milliseconds vs. seconds: Kingdee requires milliseconds; the partner WMS uses seconds. This is a common trap. A safe practice is to multiply by 1000 inside a Qeasy variable.
  2. Last page missed: The pagination handler terminates when the data array is empty, but some edge cases return an empty array and cause an infinite loop. We usually add a max-page safeguard inside the Qeasy pagination handler.
  3. Duplicate codes: Customer legacy data had two warehouses with the same number, causing upsert conflicts downstream. Recommend cleansing in Kingdee first, then enabling sync.
  4. Disabled warehouses still synced: Forgetting to pass enable=1 resulted in disabled warehouses being created downstream, which then broke subsequent order creation. Enforce the rule on both the request parameter and the field mapping sides.
  5. Category changes break mappings: Moving a warehouse from "Finished Goods" to "E-commerce" in Kingdee invalidates any downstream routing based on the old group_name. Store group info as traceable fields rather than hard-coded conditions.

When to Use

When supply chain integration requires Kingdee to be the authoritative source of warehouse master data and to distribute it downstream (WMS, e-commerce ERP), prefer /jdy/v2/bd/store. If you only need warehouse conversion at the document level without maintaining master data, simply read the warehouse field directly from the document interface — no need to pull the full set.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p2-234-9fa3

Comments