Jushuitan Warehouse Query API Field Handbook: A Practical Tutorial from Pagination to Main-Sub Warehouse Mapping
What This API Solves
In the supply chain integration between Jushuitan and Kingdee Cloud Skyline, warehouse master data is the foundational field for all inbound/outbound documents, inventory transfers, and purchase receipts. Across multiple client projects, we have found that as long as warehouse master data is not fully pulled or properly mapped, downstream document synchronization will trigger a chain of issues such as "warehouse not found" or "code mismatch". The Jushuitan /open/wms/partner/query API is precisely designed to pull the full sub-warehouse list in one go, establishing a mapping between Jushuitan-side warehouses and Kingdee-side warehouse codes, thereby paving the way for inbound/outbound document synchronization.
API Capability Overview
Authentication: Standard OAuth/AppToken authentication on the Jushuitan open platform; the access_token must be carried in the request header.
Request Structure: HTTP POST with a request body containing pagination parameters page_index (starting page, mapped to the platform placeholder {{PAGINATION_START_PAGE}}) and page_size (records per page, mapped to {{PAGINATION_PAGE_SIZE}}, defaulting to 30). Jushuitan WMS adopts a "main warehouse-sub warehouse" architecture, so a single call returns both main and sub warehouse records.
Response Structure: Returns a JSON array of sub-warehouse records. Each record contains core fields: wms_co_id (sub-warehouse ID), name (sub-warehouse name), co_id (main warehouse company ID), is_main (whether it is the main warehouse).
Pagination & Incremental Mode: The platform uses classic page-number pagination, which requires configuring a loop pull logic in the Qeasy Cloud Data Integration adapter. The scheduled task is typically set to 10-59/59 7-23 * * * (executed every 59 minutes between 7 and 23 o'clock), covering business peak hours. The Target is configured as "write null operation", indicating this is a pure query strategy, often serving as the starting point of the master data synchronization chain.
Typical Field Mapping
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| wms_co_id | int | Unique identifier of the sub-warehouse within Jushuitan WMS | Acts as the primary key for cross-system integration, mapped to Kingdee warehouse codes |
| name | string | Display name of the sub-warehouse/warehouse | Used for business display and as an auxiliary search field |
| co_id | string | The main warehouse company ID it belongs to | Used for grouping and filtering by main warehouse in multi-warehouse scenarios |
| is_main | string | Whether it is the main warehouse, "true"=main warehouse | Used to distinguish main from sub warehouses; main warehouse usually serves as the default |
How to Configure on Qeasy Cloud
In the Qeasy Cloud Data Integration platform, calling this API typically follows the "Jushuitan WMS Adapter + Pull Strategy" combination. Specifically:
- Adapter Selection: Choose the Jushuitan WMS adapter in the source system component and fill in AppKey/AppSecret to complete the authentication binding.
- Field Mapper: The Qeasy Cloud field mapper automatically recognizes the four core fields —
wms_co_id,name,co_id,is_main— and exposes them to downstream as metadata (idmapped towms_co_id,numbermapped toname). - Pagination Loop: Configure the pagination loopper via the
{{PAGINATION_START_PAGE}}and{{PAGINATION_PAGE_SIZE}}placeholders to automatically iterate through all pages. - Scheduling Configuration: Set the scheduled task to
10-59/59 7-23 * * *, triggering every 59 minutes during business hours to ensure newly added sub-warehouses are captured in time. - Target Side: This strategy sets Target to "write null operation" without writing to the target system; it serves only as the "upstream data source" for subsequent document synchronization chains.
Cross-Solution Practical Highlights
From multiple client projects involving Jushuitan-Kingdee integration, we have distilled the following common practices:
- Pull warehouses before running documents: Warehouse master data must be synchronized ahead of inbound/outbound and purchase documents; otherwise downstream strategies will fail due to missing warehouse codes.
- Handle main and sub warehouses separately: After retrieving records with
is_main="true", it is recommended to add a "derived field" in the Qeasy Cloud field mapper to mark the main warehouse for default warehouse logic. - Maintain the code mapping table independently: The mapping between Jushuitan
wms_co_idand Kingdee warehouse codes should be maintained in a separate mapping table strategy for easier manual supplementation and auditing. - Low frequency of warehouse changes: Warehouse master data changes infrequently; a daily or per-59-minute pull cadence is sufficient, no need for high-frequency real-time sync.
- Disable idCheck: This strategy sets
idCheck: false, meaning primary key validation is disabled because it is a pure query strategy; primary key validation is left to the downstream write strategy. - Enable autoFillResponse:
autoFillResponse: trueallows response fields to be auto-filled, eliminating the need for manual schema registration.
Pitfall Retrospective
- Pitfall: Using
nameas the primary key — Jushuitan allows duplicate sub-warehouse names, sonameis not unique; this is a common stumbling block. The safe approach is to explicitly bindidtowms_co_idin the Qeasy Cloud metadata. - Pitfall: Ignoring the
is_mainfilter — Downstream Kingdee typically only receives sub-warehouses, not main warehouses; without filtering, the main warehouse will be erroneously synced, causing duplication or conflicts. - Pitfall: Hardcoding pagination parameters — Some engineers hardcode
page_indexto 1, resulting in only the first page being pulled. Always use the{{PAGINATION_START_PAGE}}placeholder to let the platform auto-increment. - Pitfall: Wrong cron window — Writing cron as
*/59 * * * *does not work in Qeasy Cloud because the platform requires a six-field cron expression; always use a six-field expression such as10-59/59 7-23 * * *. - Pitfall: access_token expiry not refreshed — Jushuitan tokens expire in 2 hours by default; long-running batch tasks easily get a 401 midway. The safe approach is to enable auto-refresh in the Qeasy Cloud authentication component.
When to Use
This API applies to all scenarios where "Jushuitan serves as the WMS master data source and needs to synchronize warehouse master data to Kingdee Cloud Skyline", typical of retail, e-commerce, and distribution industry supply chain integrations. Note: it is a pure query API and does not write to the target system. If your goal is to establish a Jushuitan-Kingdee warehouse code mapping or to provide upstream data source for inbound/outbound document synchronization, choose this API; if you need to directly synchronize warehouse data to the target database, it should be used together with a "write-type" strategy.