Authoritative Tutorial: Jackyun Return/Exchange Order Query Interface Field Handbook
What This Interface Solves
In the return/exchange flow of retail and distribution businesses, the shipment portion of "return-with-shipment" orders is the key evidence for supply chain reconciliation. This interface incrementally pulls order-type=92 return/exchange shipment details from Jackyun by consign time, writing back logistics name, tracking number, and consign time into the enterprise MySQL reconciliation table. It supports the BDS reconciliation system in completing order verification and logistics status synchronization.
Interface Capability Overview
- API:
jackyun.tradenotsensitiveinfos.list.get - System: Jackyun·Qimen (JkyQM)
- Authentication: Jackyun Open Platform OAuth/AppKey; in Qeasy Cloud this is usually managed by the Qimen Gateway Adapter, which handles credentials and signing.
- Request: POST form/JSON. Common body fields include
tradeType,startConsignTime,endConsignTime,modified_begin,modified_end,tradeNo,pageSize,pageIndex. - Response: JSON. Outer
datais the order list; each order object contains the 40+ fields listed in this handbook.goodsDetailandtradeOrderPayListare arrays;tradeOrderColumnExtis a custom object. - Pagination:
pageIndexstarts at 0,pageSizedefaults to 100. In Qeasy Cloud, the runtime auto-paginates based onhasNext/total until exhausted. - Incremental Mode: Use
startConsignTime/endConsignTimewindows by consign time, typically with a 1-day step. When using modification time,modified_begin/endmust not exceed 7 days.
Typical Field Mapping
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
| tradeId | string | Jackyun system ID, primary key | Configure as metadata.id; Qeasy Cloud performs idempotent dedup and idCheck |
| tradeNo | string | Order number, business key | Configure as metadata.number; verify whether tradeNo or orderNo matches target bill_no |
| orderNo | string | Shipment order number | In write-back scenarios, orderNo is often used as source_after_no to join supplier_return_change |
| stockoutNo | string | Stockout order number | Used for warehouse-side reconciliation and document linkage |
| checkTotal | float | Reconciliation amount | Reconcile against finance receipts; watch units and precision |
| consignTime | datetime | Shipment time | Core field mapped to consign_time |
| logisticName | string | Logistics company | Maps to send_logistic_name; reconcile with logistics master data |
| mainPostid | string | Tracking number | Maps to send_main_post_id; verify uniqueness |
| warehouseName | string | Shipment warehouse | Reconcile with warehouse master data to avoid historical/deleted warehouses |
| billDate / isBillCheck | datetime/string | Reconciliation time/status | 1 = reconciled, otherwise not reconciled |
| isDelete | string | Deletion flag | 0=active, 1=deleted; must filter before write-back |
| goodsDetail | array | Item details | Contains SKU, quantity, amount; critical for line-level reconciliation |
| tradeOrderPayList | array | Payment details | For multi-payment scenarios, reconcile against the payment field |
| tradeOrderColumnExt | object | Custom extensions | Structure varies by tenant; handle gracefully in Qeasy Cloud mapper |
| customerName / buyerMemo | string | Customer name/note | Apply PII masking before writing to MySQL |
How to Configure on Qeasy Cloud
On the Qeasy Cloud Data Integration Platform, this type of interface is typically delivered as a two-stage strategy: a query adapter plus a downstream EXECUTE write-back strategy.
- Adapter Selection: Choose the Jackyun·Qimen adapter, configure AppKey/Secret and the Qimen gateway URL; the platform automatically signs requests and handles timestamps.
- Metadata Modeling: Set tradeId as id and tradeNo as number; bind incremental variables
{{LAST_SYNC_TIME}}and{{CURRENT_TIME}}tostartConsignTime/endConsignTime. - Field Mapper: Qeasy Cloud auto-generates mappings logisticName→send_logistic_name, mainPostid→send_main_post_id, consignTime→consign_time. Complex fields like goodsDetail can be flattened into a child table or stored as JSON in MySQL.
- Write-back Strategy: The downstream EXECUTE strategy updates supplier_return_change using orderNo/tradeNo as the WHERE clause; Qeasy Cloud dedupes by primary key to avoid duplicate writes.
- Scheduling & Monitoring: Schedule via crontab (hourly/daily); monitoring shows pagination progress and failed records, enabling breakpoint resumption.
Cross-Scenario Practical Points
- Separate primary key from business key: tradeId for dedup, tradeNo for business number; mixing them breaks idempotency.
- Don't rely solely on modified_begin for increments: For return/exchange scenarios, consign-time windows perform better and avoid irrelevant triggers.
- Use orderNo, not tradeNo, in write-back WHERE: Most customer return/exchange tables join on shipment number; using tradeNo yields zero updates.
- Filter deleted records: isDelete=1 records pollute reconciliation data if written back; add a filter step in the Qeasy Cloud transformer.
- Be tolerant with complex fields: goodsDetail may be null on some orders; provide an empty-array fallback in the mapper to avoid downstream JSON parse errors.
- Isolate credentials: In private deployments, manage AppKey/Secret through the Qeasy Cloud credential vault; never commit them to code repositories.
Pitfall Recap
- Pitfall 1: Wrong tradeType yields no data. In a real project, tradeType was set to 91 (return-only), missing shipment data. Pin tradeType=92 in Qeasy Cloud request parameters and validate with sandbox orders.
- Pitfall 2: Incomplete pagination causes data loss. When pageSize=100 and hasNext=true, submitting without auto-pagination drops the tail page. Qeasy Cloud auto-paginates by default, but custom scripts that build pageIndex manually are risky.
- Pitfall 3: modified_begin/end interval exceeds 7 days. The server rejects it. Slice by day, fetching only 1-day windows per run.
- Pitfall 4: Writing back empty mainPostid. Some partially shipped orders have empty tracking numbers; writing them back makes the reconciliation system think the order is shipped. Add null checks in the transformer.
- Pitfall 5: Timezone drift misaligns incremental windows. consignTime is a local-time string; without converting to UTC before storing in MySQL, the next incremental run re-pulls the same batch.
When to Use
This interface is suitable for writing back shipment information and reconciling "return-with-shipment" (tradeType=92) orders, especially when retail/distribution enterprises need to synchronize Jackyun shipment status to their self-built MySQL reconciliation tables. For pure return (tradeType=91) or pure exchange (tradeType=90) flows, use the corresponding interfaces; for stockout details, use inventory-domain query interfaces instead.