Authoritative Tutorial on Querying T+ Inventory API: From Field Handbook to Jushuitan Integration
What Problem Does This API Solve
In supply chain integration, inventory master data is the key link between ERP and e-commerce/warehousing systems. The /tplus/api/v2/inventory/QueryPage endpoint is used to paginate inventory master data from Chanjet T+, supporting scenarios such as syncing inventory to Jushuitan products, mapping T+ inventory codes with Jushuitan product codes, and material mapping for sales/purchase orders. This strategy is read-only (Target is a no-op write), typically scheduled at 40 12,23 * * *, and uses incremental pulling based on UpdateDateBegin/UpdateDateEnd.
API Capabilities Overview
- Authentication: Chanjet T+ OpenAPI app key authentication (AppKey/Secret signature mechanism) carried in request headers.
- Request structure:
POST /tplus/api/v2/inventory/QueryPagewith body containingPageIndex,PageSize,selectfields,UpdateDateBegin,UpdateDateEnd. - Pagination: Standard pagination;
PageSizedefaults to 50,PageIndexstarts at 1; loop through pages until empty. - Incremental mode: Primarily uses
Ts(update timestamp) orUpdateDateBegin/UpdateDateEndtime window. The former is more precise, the latter suits batch backfill. - Response structure: Array with pagination metadata; each record contains 50+ business fields, where
InventoryClass,Unitand similar are object fields withCode,Namesub-properties.
Typical Field Mappings
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| ID | string | Unique inventory primary key | Used for cross-system mapping and incremental deduplication; metadata sets idCheck:true for primary key validation |
| Code | string | Inventory business code | Configured as number in metadata; the core key for T+ to Jushuitan code mapping |
| Name | string | Inventory name | Maps to Jushuitan goods_name/spec_name |
| Specification | string | Specification/model | Recommend mapping to Jushuitan spec |
| DefaultBarCode | string | Default barcode | For multi-barcode items, prefer this or iterate InvBarCodeDTOs |
| InventoryClass | object | Inventory category (with Code, Name) | Maps to Jushuitan category; remember to expand sub-properties |
| Unit / BaseUnitCode / BaseUnitName | object/string | Main unit of measure | Maps to Jushuitan unit; multi-scenario units must be selected per business line |
| UnitByPurchase/Sale/Stock/Retail/Manufacture | object | Multi-scenario units | Sales uses UnitBySale, purchase uses UnitByPurchase to avoid mismatch |
| Disabled | string | Whether disabled | Filter true records before syncing to avoid "ghost products" downstream |
| IsPurchase / IsSale / IsSuite / IsBatch / IsSerialNumber | string | Business attribute flags | Control whether downstream participates in purchase/sale/batch/serial flows |
| InvSCost / LatestCost / AvagCost | string | Reference/Latest/Average cost | Pick one to map to Jushuitan cost; recommend AvagCost |
| RetailPriceNew / InvLSPrice | string | Retail price/Latest sale price | Map to Jushuitan price; watch tax-inclusive/exclusive convention |
| Ts | string | Update timestamp | Primary basis for incremental sync |
| BrandCode / BrandName | string | Brand code and name | Often mapped to Jushuitan brand as a custom field |
| Expired / ExpiredUnit | string | Shelf life and unit | Required for shelf-life items; Expired=0 means disabled |
| TaxRate | string | Tax rate | Watch tax rate conventions (13/9/6 etc.) |
| SkuInfoList / InvBarCodeDTOs | array/string | SKU list/Barcode list | Multi-value fields should be expanded in the mapper |
| priuserdefnvc1~6 | string | User-defined extension fields | Meaning depends on enterprise configuration; often used for color/size |
How to Configure on Qeasy
On the Qeasy Data Integration Platform, the Chanjet T+ inventory query API is encapsulated as a standard adapter, allowing engineers to complete the connection through visual configuration:
- Adapter selection: Choose the
Chanjet T+ OpenAPIadapter and configure AppKey/Secret and account info. - API selection: Select the
QueryPageinterface, configure pagination parameters (defaultPageSize=50) and incremental window (UpdateDateBegin/UpdateDateEnd, with built-in{{LAST_SYNC_TIME}}~{{CURRENT_TIME}}placeholders). - Field mapper: The Qeasy field mapper automatically expands object fields (e.g.,
InventoryClass.Code,Unit.Name) and supportsselectfieldsfor trimming returned fields, reducing transmission overhead. - Deduplication and primary key validation: With
idCheck:truein metadata combined with the platform's dedup component, deduplicate byIDto prevent duplicate writes. - No-op write strategy: When the Target is configured as a "no-op write", the platform only lands the query results into the mid-stage data pool without triggering downstream writes—ideal for read-only scenarios.
- Scheduling configuration: Set cron expressions via the platform scheduler, typically
40 12,23 * * *, to achieve twice-daily accurate pulls.
Cross-Scenario Practical Points
- Code mapping over name: For cross-system association, prioritize
Codematching; on Jushuitan side map tospec_codeorgoods_no. Name matching is only auxiliary. - Object fields must be expanded: Fields like
InventoryClassandUnitare objects in the API response and must have.Code/.Nameexplicitly extracted in the mapper, otherwise serialization will fail. Tsis safer for incremental: Compared toUpdateDateBegin/UpdateDateEndtime window, theTstimestamp has finer granularity and can capture multiple modifications within the same minute; window mode is suitable for historical backfill.- Disabled inventory must be filtered:
Disabled=trueitems must be filtered before writing to Jushuitan, otherwise dirty data of disabled products still participating in business will appear. - Multi-scenario units per business: Sales orders use
UnitBySale.Name, purchase orders useUnitByPurchase.Name. Don't default toBaseUnitName, or unit confusion will occur. - Document custom field configuration:
priuserdefnvc1~6have different meanings across enterprises; add annotations in Qeasy mapping configuration to avoid future maintenance pitfalls.
Pitfall Review
- Unexpanded object fields cause batch failure: A common error is directly mapping
InventoryClassas a whole to Jushuitan category—the platform cannot serialize the object to a string. The safe approach is to explicitly expandInventoryClass.CodeandInventoryClass.Namein the field mapper. - Incremental window time drift: When
UpdateDateBeginuses{{LAST_SYNC_TIME}}, scheduling latency may cause data loss. Add apadding(e.g., push forward 2 minutes) or switch toTsincremental. - Multi-value barcode mishandling:
InvBarCodeDTOsis an array; mapping it directly to a string field will error. Usejoin(',')in the mapper or pick the first element. - Disabled inventory synced: Ignoring
Disabledfiltering causes disabled products on Jushuitan to still participate in business. Add aDisabled=falsefilter condition in the platform filter component. - Tax rate/price tax-inclusive confusion: Whether
InvLSPriceis tax-inclusive varies by enterprise configuration; confirm the tax convention with business before syncing to avoid price disputes.
When to Use
Prioritize this API when the business needs to sync Chanjet T+ inventory master data to the Jushuitan product library, establish material code mapping between the two systems, or support material mapping for sales/purchase orders. It is not suitable for scenarios requiring real-time inventory queries or transactional writes—those should use inventory query or document write APIs.