Authoritative Tutorial on the Jky Outbound Application Query API Field Manual
What This API Solves
In the supply chain integration between Jky (Jikeyun) and Yonyou NCC, the stock transfer out order is the central document connecting inventory flows on both sides. The erp.stockout.get API is used to pull outbound documents incrementally by modification time, defaulting to outType=202 (stock transfer out). This API does not write to the target; it is commonly used as a data source for reconciliation, status validation, and cross-system traceability. We use it to synchronize the status, in/out quantities, and warehouse codes of Jky stock transfer orders into the NCC transfer-out document view.
API Capabilities Overview
- Authentication: Jky Open Platform AppKey + AppSecret signature. In the Jky adapter of Qeasy, this is typically handled via one-click account authorization, no manual signing required.
- Request Structure:
POSTform/JSON with business parameters; paginationpageIndex/pageSize, business filteroutType, incremental windowmodifyTimeFrom/modifyTimeTo. - Response Structure:
code=200indicates success; the body is a list of outbound documents (header + nested details). The header key isallocateId, the line key isskuRelDataId. - Pagination Mode: Page index starts from 0, default page size is 50; the Qeasy adapter automatically paginates and merges results into one logical table.
- Incremental Mode: Pulls based on the
gmtModifiedtime window, combined with Qeasy's{{LAST_SYNC_TIME}}and{{CURRENT_TIME}}placeholders. It runs every 2 minutes from 6:00 to 22:00 daily, with automatic checkpoint recovery managed by the platform.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| allocateId | string | Transfer order primary key | Synonymous with outId, used for cross-system linkage; in Qeasy it is usually mapped to the source document ID of the target |
| allocateNo | string | Transfer order business number | Written into the NCC transfer-out document number or backfilled in memo for two-way traceability |
| outWarehouseCode / intWarehouseCode | string | Out/in warehouse codes | int is a typo variant of in; always map archives by code rather than name |
| inWarehouseCode / inWarehouseName | string | In-warehouse code and name | Synonymous with int*; pick one set during integration |
| skuNo / materialCode | string | SKU and material codes | SKU is the Jky dimension; material code is the alignment key with NCC |
| skuCount / goodsCount | string | Quantity | Use skuCount for line-level quantity, goodsCount for header-level totals |
| inCountSum / outCountSum | string | Accumulated in/out quantities | Reliable basis for judging transfer execution progress |
| status / outStatus / inStatus | string | Document and in/out statuses | Status codes may change with Jky versions; Qeasy's mapper recommends falling back to names |
| gmtModified | string | Modification time | The only reliable anchor for incremental sync; never use gmtCreate |
| memo | string | Remarks | Recommend backfilling the NCC transfer-out document number here for easier reconciliation |
| field1~30 / detailField1~30 | string | Custom extension fields | Meaning varies by tenant configuration; collect a field mapping table from the business side before integration |
| currencyRate / outCurrencyCode | string | Exchange rate and currency | Must verify the local currency for inter-company transfers |
How to Configure in Qeasy
- Adapter Selection: In Qeasy's Data Source, create a new Jky connection, select the
erp.stockout.getadapter, fill in AppKey/Secret or reuse a platform-hosted application. - Request Parameters:
outType=202, default page size 50; incremental window uses placeholders{{LAST_SYNC_TIME|datetime}}and{{CURRENT_TIME|datetime}}. Qeasy automatically resumes from the last successful time. - Field Mapper: Qeasy automatically expands the details based on the response JSON, splitting header and detail one-to-one; simply drag-and-drop warehouse, material, and quantity into the NCC transfer-out document.
- Write Strategy: Set Target to "No Operation"; this strategy only reads. Results land in a Qeasy data table for downstream strategies, or can be referenced directly in BI/reconciliation reports.
- Scheduling: Set the cron to
1-59/2 6-22 * * *; the Qeasy scheduler avoids nighttime windows, reducing pressure on the source.
Cross-Scenario Practical Points
- Use Codes as Primary Mapping Keys: Always map warehouses, SKUs, and departments by Code rather than name, to avoid misalignment when archives are renamed.
- Choose One of
intWarehouse*andinWarehouse*: These synonymous fields appear alternately across versions. Pick one set and add a constant mapping in Qeasy to reduce branching. - Use
gmtModifiedExclusively for Incremental Sync: We have seen multiple scenarios miss or duplicate data due to mixingapplyDateorgmtCreate. The stable approach is to usegmtModifiedas the sole incremental key. - Backfill Source Document Number in
memo: Write back the NCC transfer-out document number into Jky'smemo, so a single SQL query can locate discrepancies during difference analysis. - Fall Back to Status Names: Status codes occasionally change during Jky upgrades. The Qeasy mapper recommends pulling both
statusandstatusName, using the name for business judgments. - Align Extension Fields Before Enabling: Custom fields like
field1~30andgoodsField1~30must have their meaning aligned with the business side first. Qeasy can save field alias templates to avoid repeated communication across scenarios.
Pitfall Recap
- Pitfall 1: Treating
goodsCountas line-level quantity. It is a header-level total; useskuCountfor lines, otherwise the magnitude is off by tens of times and inventory reconciliation immediately goes red. - Pitfall 2: Using
gmtCreatefor incremental sync. Creation time does not update on modification, so audit, reverse-audit, or quantity changes never trigger, leaving audited documents permanently unpulled. - Pitfall 3:
intWarehouseCodeis empty. Some older API versions do not return this typo variant. The safe approach is to add a fallback rule in Qeasy's mapper: whenintWarehouseCodeis empty, takeinWarehouseCode. - Pitfall 4: Unclear meaning of extension fields. Directly using
field1as warehouse andfield2as batch number causes mass misalignment after business-side config changes. Always solidify the field mapping table first. - Pitfall 5: Forgetting to verify currency for inter-company transfers. Stock transfer outs involve both source and target organizations; mismatched currency and exchange rates cause reconciliation failures. Be sure to add a validation in Qeasy.
When to Use
When business revolves around stock transfer outs and you need to reconcile Jky transfer orders with NCC transfer-out documents bi-directionally, this API is the preferred data source. If you only need sales outbound or other types, switch outType to the corresponding value and reuse the same adapter. For pure write scenarios, use erp.stockout.add/update instead.