Published at: 2025-10-30

API Development


ERP Data Synchronization Platform Interface Documentation

This document describes the supported interface methods of the ERP Data Synchronization Platform, including:
1. Actively calling external systems to create/modify records
2. Polling external systems for incremental data by time range
3. Providing create/modify interfaces to passively receive data from external systems

Developers should use this document as a reference for integration to avoid communication discrepancies.

1. Integration Platform Interface Access

Access Method:
1. Log in to ShareCRM
2. Navigate to: Admin > System Management > Integration Management > ERP Data Synchronization > Data Sync Settings
3. Under the “ERP Object Management” tab, create an intermediate table object and configure the ERP-side object fields
4. Click the “Generate API” button in the operations column to view the interface format

picture coming soon:

2. Integration Platform Push

The ERP Data Synchronization Platform listens to CRM MQ messages. When users create/modify records in CRM, the platform receives real-time notifications and actively pushes the data to external systems.

2.1 Create Interface

Endpoint: http://MyDomain/path/create (Replace with actual ERP endpoint)
Method: POST
Data Format: JSON (recommended), XML, or text

Request Example:
curl curl --location --request POST 'http://MyDomain/path/create' \ --header 'Content-Type: application/json' \ --header 'token: TOKEN' \ --data-raw '{ "objAPIName": "ERP_Object_API_Name", "masterFieldVal": { "Key1": "value1", "Key2": "value2", "Key3": "value3" }, "detailFieldVals": { "Detail_API_Name1": [ { "Key4": "value4", "Key5": "value5", "Key6": "value6" } ], "Detail_API_Name2": [ { "Key4": "value7", "Key5": "value8", "Key6": "value9" } ] } }'

Response Example:
json { "code": "error_code", "message": "error_message", "data": { "masterDataId": "data_id", "detailDataIds": { "Key10": "value10", "Key11": "value11", "Key12": "value12" } } }

2.2 Modify Interface

Endpoint: http://MyDomain/path/update (Replace with actual ERP endpoint)
Method: POST
Data Format: JSON (recommended), XML, or text

Request Example:
curl curl --location --request POST 'http://MyDomain/path/update' \ --header 'Content-Type: application/json' \ --header 'token: TOKEN' \ --data-raw '{ "objAPIName": "ERP_Object_API_Name", "masterFieldVal": { "Key1": "value1", "Key2": "value2", "Key3": "value3" }, "detailFieldVals": { "Detail_API_Name1": [ { "Key4": "value4", "Key5": "value5", "Key6": "value6" } ], "Detail_API_Name2": [ { "Key4": "value7", "Key5": "value8", "Key6": "value9" } ] } }'

Response Example:
json { "code": "error_code", "message": "error_message", "data": { "masterDataId": "data_id", "detailDataIds": { "Key10": "value10", "Key11": "value11", "Key12": "value12" } } }

3. Integration Platform Polling

The platform actively queries external systems through batch and single-record query interfaces, with a minimum polling interval of 6 minutes.

3.1 Batch Query

Endpoint:
http://MyDomain/path/queryMasterBatch?objAPIName=ERP_Object_API_Name&startTime=UNIX_timestamp_ms&endTime=UNIX_timestamp_ms&includeDetail=true&offset=0&limit=100

Method: GET
Response Format: JSON (recommended), XML, or text

Response Example:
json { "code": "error_code", "message": "error_message", "data": { "totalNum": "total_records", "dataList": [ { "objAPIName": "ERP_Object_API_Name", "masterFieldVal": { "Key1": "value1", "Key2": "value2", "Key3": "value3" }, "detailFieldVals": { "Detail_API_Name1": [ { "Key4": "value4", "Key5": "value5", "Key6": "value6" } ], "Detail_API_Name2": [ { "Key4": "value7", "Key5": "value8", "Key6": "value9" } ] } } ] } }

3.2 Single Record Query

Endpoint:
http://MyDomain/path/queryMasterById?objAPIName=ERP_Object_API_Name&dataId=record_id&includeDetail=true

Method: GET
Response Format: JSON (recommended), XML, or text

Response Example:
json { "code": "error_code", "message": "error_message", "data": { "objAPIName": "ERP_Object_API_Name", "masterFieldVal": { "Key10": "value10", "Key11": "value11", "Key12": "value12" }, "detailFieldVals": { "Detail_API_Name1": [ { "Key13": "value13", "Key14": "value14", "Key15": "value15" } ], "Detail_API_Name2": [ { "Key13": "value16", "Key14": "value17", "Key15": "value18" } ] } } }

4. Integration Platform Receive

External systems can push data to the platform in standard or custom formats.

4.1 Standard Format

Endpoint: https://www.fxiaoke.com/erp/syncdata/open/objdata/asyncpush
Method: POST
Data Format: JSON only

Required Headers:

Field Description
token Authentication token (Contact ShareCRM R&D)
tenantId Enterprise ID
dataCenterId Required for multi-ledger systems
objectApiName ERP object API name
version v1
operationType 3 = Void (optional for other statuses)
id Non-empty value indicates standard format

Request Example:
json { "objAPIName": "ERP_Object_API_Name", "masterFieldVal": { "Key1": "value1", "Key2": "value2", "Key3": "value3" }, "detailFieldVals": { "Detail_API_Name1": [ { "Key4": "value4", "Key5": "value5", "Key6": "value6" } ], "Detail_API_Name2": [ { "Key4": "value7", "Key5": "value8", "Key6": "value9" } ] } }

Response Example:
json { "errCode": "s106240000", "errMsg": "Success" }

4.2 Custom Format

Endpoint: https://www.fxiaoke.com/erp/syncdata/open/objdata/asyncpush
Data Format: JSON (recommended), XML, or text

Required Headers:

Field Description
token Authentication token
tenantId Enterprise ID
dataCenterId Required for multi-ledger systems
objectApiName ERP object API name
version v1
operationType 3 = Void (optional)

Response Example:
json { "errCode": "s106240000", "errMsg": "Success" }

5. Data Mapping Table API

Custom functions can insert/update/query data mapping tables:

```groovy // Create mapping Map param1 = [ “ployDetailId”: “strategy_detail_id”, “sourceObjectApiName”: “Source_Object_API_Name”, “destObjectApiName”: “Target_Object_API_Name”, “sourceDataId”: “source_id”, “destDataId”: “target_id”, “sourceDataName”: “source_name”, “destDataName”: “target_name” ] def result1 = Fx.proxy.callAPI(“erp.syncData.createSyncDataMapping”, [:], param1)

// Update mapping Map param2 = [ “sourceObjectApiName”: “Source_Object_API_Name”, “destObjectApiName”: “Target_Object_API_Name”, “sourceDataId”: “source_id”, “destDataId”: “target_id” ] def result2 = Fx.proxy.callAPI(“erp.syncData.updateSyncDataMapping”, [:], param2)

// Query mapping Map param3 = [ “sourceObjectApiName”: “Source_Object_API_Name”, “destObjectApiName”: “Target_Object_API_Name”, “sourceDataId”: [“source_id”] ] def result3 = Fx.proxy.callAPI(“erp.syncData.getSyncDataMappingBySourceDataId”, [:], param3) ```

6. Create ERP Field Mapping Table

groovy // Supported channels: ERP_K3CLOUD, ERP_SAP, ERP_U8, OA, STANDARD_CHANNEL // dataType="employee" for personnel records Map data = [ "dataCenterId": "data_center_id", "channel": "ERP_K3CLOUD", "dataType": "employee", "fsDataId": "crm_data_id", "fsDataName": "crm_data_name", "erpDataId": "erp_data_id", "erpDataName": "erp_data_name" ] def ret = Fx.proxy.callAPI("erp.syncData.createErpfieldmapping", [:], data)

Submit Feedback