Authoritative Tutorial on Kingdee Cosmic Supplier Query API Field Handbook: Practical Guide for JuShuitan Supply Chain Integration
What This API Solves
In JuShuitan–Kingdee Cosmic supply chain integration, supplier master data is the foundation for purchase orders, goods receipts, purchase returns, and payments. The /jdy/v2/bd/supplier endpoint lets us pull supplier records from Kingdee in a paginated, incremental fashion, enabling code mapping, status synchronization, supplier-field mapping on purchase documents, and invoice info write-back. It is the canonical pattern of a "query-only strategy."
API Capability Overview
- Authentication: Kingdee Cosmic V2 WebAPI standard auth (AppKey/AppSecret); access token carried in headers.
- HTTP Method:
GET /jdy/v2/bd/supplier; detail endpoint isGET /jdy/v2/bd/supplier_detail(byid). - Request Params:
enable(1 active / 0 inactive / -1 all),modify_start_time/modify_end_time(millisecond timestamps),page(default 1),page_size(default 100). - Response Structure: List-type payload. Each record contains
id,number,name,enable, plus organization, invoicing, banking, address, contact, and custom field extensions. - Pagination / Incremental Mode: Standard page/page_size pagination; incremental uses modification-time ms timestamps as cursor.
- Strategy Type:
QUERY. Target is "write empty operation" — pure read, no target write. - Scheduled Task: Default
*/10 * * * *, every 10 minutes.
Typical Field Mappings
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
| id | string | Supplier primary key | Stable cross-system mapping key; strongly recommended as persistent correlation key |
| number | string | Supplier code | Maps to JuShuitan supplier_code, e.g. GYS00002 |
| name | string | Supplier name | Maps to JuShuitan co_name; watch full-width spaces and traditional/simplified variants |
| enable | string | Status 1/0 | Sync to JuShuitan enabled, keep consistent |
| group_id/group_name/group_number | string | Supplier category | Use for category filtering or grouped sync |
| saler_id/saler_name/saler_number | string | Salesperson | Field for purchase attribution |
| sale_dept_id/sale_dept_name/sale_dept_number | string | Sales department | Multi-department companies need departmental routing |
| taxpayer_no | string | Taxpayer ID | Mandatory for invoicing; validate length |
| invoice_name | string | Invoice title | Independent from supplier display name |
| invoice_type | string | Invoice type enum | 1 paper special / 2 paper general / 3 e-general / 4 e-special / 5 fully-digital general / 6 fully-digital special / 0 none |
| bank/bank_account/account_open_addr | string | Bank account | Flat fields for single account; use account_entity array for multiple |
| addr | string | Detailed address | Concatenate with country/province/city/district |
| country_/province_/city_/district_ | string | 4-level admin regions | Keep id and name; cross-system, id is more rename-resistant |
| bom_entity | array | Contact list | Maps to JuShuitan contact list; guard against empty arrays |
| account_entity | array | Bank account list | Preferred over flat fields in multi-account scenarios |
| custom_field | object | Custom extensions | Structure determined by tenant config; handle per-tenant variance |
| create_time/modify_time | string | Create/modify time | Anchor for incremental sync |
How to Configure on Qeasy
On the Qeasy data integration platform, Kingdee Cosmic V2 ships as a built-in adapter that wraps /jdy/v2/bd/supplier with auth, pagination, and timestamp conversion. Typical setup:
- In "Data Source," pick "Kingdee Cosmic V2," enter tenant credentials, and Qeasy's adapter auto-refreshes tokens.
- In the strategy canvas, select the "Query Cosmic Supplier" template, set Target to "Write Empty Operation" to mark it as a pure query strategy.
- In the field mapper,
idis the primary key,numberis the code key; incremental cursor defaults tomodify_time, auto-resuming each round. - If results need to flow to JuShuitan, add a downstream write strategy; Qeasy auto-maps
number ↔ supplier_code. - Default schedule is
*/10 * * * *, adjustable in Qeasy's scheduler panel.
Cross-Scenario Practical Points
numberovernameas correlation key: codes are stable and unique; names drift due to abbreviations, mergers, and renames.- Use
modify_timeas incremental cursor, notcreate_time: new suppliers are rare; ~99% of changes are modifications. - Keep
page_size≤ 100: Cosmic V2 rate-limits or truncates beyond 100; 50-100 is the safe range. enable=-1only for initial load: after full pull, switch toenable=1to avoid re-writing inactive suppliers downstream.- Multi-account via
account_entity: flat fieldsbank/bank_accountonly represent the first account; parse the array for multi-account cases. - Preserve admin-region ids: cross-system, ids outlast names; Qeasy's mapper keeps both by default.
Pitfall Retrospective
- Misaligned source metadata
responsefields: templates retain material-API leftovers likestock_id,barcode,base_unit_idthat don't match supplier responses. Calibrate to actual API responses, otherwise Qeasy's mapper reports "field not found." - ms vs s timestamp confusion: Cosmic V2 uses milliseconds; teams used to seconds end up with empty incremental windows and full reloads. Qeasy auto-detects units, but hand-written scripts must validate.
invoice_typeenum drift: fully-digital invoices added 5 and 6, legacy clients only know 1-4, causing invoicing failures. Add an enum-compat layer in Qeasy mapper, default unknowns to "0 none" and raise alerts.bom_entityempty array crashes downstream: empty contact lists may be treated as null objects by some writers. Add an "empty array → empty string" cleansing rule on the target side in Qeasy.enable=0suppliers still referenced by POs: inactive suppliers leak into historical documents. Addenable=1filter in Qeasy; route inactive items to a separate archive strategy.
When to Use
/jdy/v2/bd/supplier fits scenarios where supplier master data needs to flow one-way from Kingdee Cosmic to JuShuitan or other downstream systems — typical use cases include multi-system supplier code unification, status synchronization, and invoice info write-back. It is not suited for: bidirectional supplier editing, cross-org multi-book bulk migration, or real-time per-document supplier validation (use the detail endpoint or document endpoints instead).