Authoritative Tutorial: Jushuitan QM Sales Outbound Order Query Interface Field Manual
What This Interface Solves
The Jushuitan QM jushuitan.saleout.list.query interface incrementally pulls sales outbound (delivery) orders by modification time and lands them into the local SQL Server table xsck. Typical scenarios include: localizing e-commerce outbound data, tracking shipment status, syncing logistics information, financial reconciliation, and bridging inventory and sales data with ERP/WMS systems. It is the key data channel connecting online transactions with offline fulfillment.
Interface Capability Overview
- Authentication: Jushuitan QM uses application-level PartnerId + signature (token + timestamp encryption) authorization; the request header must carry the authorization parameters.
- Request structure:
POSTformat, JSON body. Key inputs:page_index(default 1),page_size(default 25, max 50),start_time/end_time(query by modification time, span ≤ 7 days),status(optional, see enum below),so_id(online order number, cannot be empty at the same time as the time condition). - Response structure: outer
datacontainspage_index,page_size,has_next, and the line arraydatas; each record carries many fields, withio_idas the primary key. - Pagination mode: traditional pagination based on
page_index, combined withhas_next; it is recommended to setpage_sizeto 50 to reduce request count. - Incremental mode: uses the
modifiedfield as the time window. The landing side must persistlast_sync_time; after the initial full sync, run incremental windows of 1 hour to 1 day, with a typical crontab of1 0,1,2 * * *. - Status enum:
Archive(Archived),WaitConfirm(Pending Outbound),Confirmed(Outbound),Cancelled(Cancelled),Delete(Voided),OuterConfirming(External Shipping).
Typical Field Mapping
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
| io_id | string | Primary key of the outbound order, unique | Core for deduplication; SQL Server primary key should use io_id directly |
| o_id | string | Jushuitan internal order number | Links to sales order master data |
| so_id | string | Original e-commerce platform order number | Reconciliation and feedback with Taobao/JD/Pinduoduo |
| merge_so_id | string | Merged-order master number | Links to child orders in merged-order scenarios |
| shop_id / shop_name | string | Shop id / name | Multi-shop routing and filtering |
| co_id / wms_co_id | string | Company id / sub-warehouse id | Distinguish outbound warehouse in multi-warehouse scenarios |
| modified | string | Last modification time | Basis for incremental window, must be retained on the landing side |
| status | string | Document status (see enum) | WaitConfirm is the typical incremental starting point |
| pay_amount / paid_amount / free_amount / freight | string | Payable / Paid / Discount / Freight | All strings; convert to DECIMAL when landing; handle empty strings |
| receiver_country/state/city/district/town/address | string | Six-level shipping address | Suggest to store in one redundant column to avoid 6-level joins |
| receiver_name / receiver_phone / receiver_mobile | string | Consignee info | Remember to mask sensitive info |
| l_id / lc_id | string | Logistics tracking number / carrier code | Inputs for logistics feedback and tracking queries |
| io_date / pay_date | string | Outbound time / payment time | Time strings need unified format (ISO 8601 recommended) |
| weight / f_weight | string | Estimated weight / actual weight | Key fields for billing reconciliation |
| items | array | Order line array | Must be expanded to multiple rows under items_* fields (see below) |
| batchs | array | Batch information | Required for batch-managed items |
| sns | array | Unique/serial numbers | Required for serial-number-managed items |
| crawl_time | string | ETL landing timestamp | Auto-filled by the integration platform for troubleshooting |
How to Configure on Qeasy Cloud
On the Qeasy Cloud data integration platform, this interface is typically packaged as the "Jushuitan QM · Sales Outbound Order Query" adapter. The typical configuration path is as follows:
- Datasource registration: Select the Jushuitan QM connector and fill in authentication parameters such as PartnerId, PartnerKey, and Token. On the target side, select SQL Server and configure the JDBC connection string and the target table
xsck. - Interface selection: Pick
jushuitan.saleout.list.querydirectly from the source API list; the platform auto-parses request/response structures—no manual JSON Schema needed. - Field mapper: The platform provides a built-in field mapper. Main-table fields can be mapped by drag-and-drop. For nested arrays like
items, the mapper supports an "array expansion" mode, expandingitems_sku_id,items_qty,items_sale_price, etc., into line columns with one click. - Incremental strategy: Qeasy Cloud provides incremental configuration options based on the
modifiedfield. You can set the window length (≤ 7 days recommended), start page, and retry policy; the platform automatically maintainslast_sync_time. - Scheduling: Configure crontab (e.g.,
1 0,1,2 * * *). The platform has built-in checkpoint resume and failure alerts. When landing intoxsck, it supports automatic update on primary key conflict.
Cross-Scenario Practical Points
- Primary key strategy must be stable: Consistently use
io_idas the SQL Server primary key, supplemented byid = {{o_id}}{{modified}}for idempotent deduplication, to avoid duplicate landing caused by Jushuitan status rollbacks. - Incremental window must be ≤ 7 days: Jushuitan QM enforces a hard limit on time span; exceeding 7 days triggers an error. We recommend setting the window to 1–2 hours, with early-morning scheduled pulls, balancing real-time requirements and rate limits.
- Line items must be expanded: The
itemsarray cannot be JSON-stored as a single column; it must be expanded intoitems_sku_id / items_qty / items_sale_priceetc., or downstream BI queries will be painfully slow. Same forbatchsandsns. - Amount fields are all strings: Jushuitan returns amounts as strings. When landing into SQL Server, convert to
DECIMAL(18,2)and handle empty strings and negative numbers (discount scenarios) defensively. - Status machine drives downstream flow: Do not treat
Confirmedas the final state; whenCancelled/Deleteappear, actively write back to ERP to avoid inflated inventory. - Six-level address handled separately: Concatenating the six-level address into a single redundant column is better for queries than 6-level joins. Also remember to mask sensitive info before landing.
Pitfall Recap
- Window exceeding the limit breaks the task: One customer set the window to 8 days, and the interface directly returned
time range exceeds 7 days, breaking the entire chain. A robust approach is to strictly enforce ≤ 7 days with runtime validation. itemsstored as JSON without expansion: One solution stuffed the entireitemsarray into annvarchar(max)column. Later, sales-line reports timed out due to full-table scans. The correct approach is to expand into line columns or create a separatexsck_itemssub-table.- Inconsistent time field formats: Jushuitan returns both
yyyy-MM-dd HH:mm:ssand Unix timestamps. Storing them as-is caused downstream BI errors. A robust approach is to uniformly format to ISO 8601 at the source side. - Status rollback creates duplicate rows: One customer used
o_id + createdas the primary key. When Jushuitan changedWaitConfirmtoConfirmed,modifiedchanged butcreateddid not, producing multiple rows for the same logical order. The primary key must beio_idorid = {{o_id}}{{modified}}. - Delayed logistics tracking-number feedback: Some platforms transmit shipment before the tracking number is fed back, so the first incremental pull may see
l_idas empty. When logistics feedback arrives later,modifiedupdates, and the incremental task will backfill it automatically—this is normal and should not be flagged as a bug.
When to Use
Suitable for e-commerce retail scenarios where Jushuitan outbound data must be localized to SQL Server/ERP for shipment tracking, financial reconciliation, inventory deduction, and BI analytics. Not suitable for sub-second real-time synchronization (the interface is modification-time based, so minute-level latency is inevitable); also not suitable for merchants without Jushuitan accounts or non-QM integration.