Create ERP Object
# Not recommended to continue using offline APIs!!!
# Description
Create an ERP object.
# Request Specification
Method: POST + application/json
Endpoint: https://${cloud domain}/cgi/crm/erp/data?thirdTraceId=${Random String}
# Request Parameters
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| corpAccessToken | String | Yes | Enterprise application access token for company validation |
| corpId | String | Yes | Enterprise ID |
| currentOpenUserId | String | Yes | Current operator's OpenUserID |
| triggerWorkFlow | boolean | No | Whether to trigger workflow (defaults to true when omitted). Applies to all objects. |
| hasSpecifyTime | boolean | No | Whether to specify creation time (defaults to false when omitted, ignoring create_time field) |
| hasSpecifyCreatedBy | boolean | No | Whether to specify creator (defaults to false when omitted, ignoring created_by field) |
| includeDetailIds | boolean | No | Whether to return detail object IDs when creating master-detail objects (true: return, false: omit, default: false) |
| data | Map | Yes | Data map |
| data.object_data | Map | Yes | Master object data map (corresponds to object field descriptions) |
| data.object_data.dataObjectApiName | String | Yes | Object's API name |
| data.details | Map | No | Detail object data map (corresponds to object field descriptions) |
# Request Example
{
"corpAccessToken": "CADD6BABEB80C950374C500007EFBDDB",
"corpId": "FSCID_32F560259BC489F57078E5F8E8831B1A",
"currentOpenUserId": "FSUID_43B6C5E99623942DF0BF6E0A0B325AD1",
"data": {
"object_data": {
"dataObjectApiName": "ErpStockObj",
"is_enable": "1",
"is_deleted": false,
"owner_department": "Sales Department",
"owner": [
"FSUID_43B6C5E99623942DF0BF6E0A0B325AD1"
],
"address": "Angel Street",
"lock_status": "0",
"last_modified_time": 1534940627756,
"create_time": 1534940627756,
"life_status": "normal",
"last_modified_by": [
"FSUID_43B6C5E99623942DF0BF6E0A0B325AD1"
],
"created_by": [
"FSUID_43B6C5E99623942DF0BF6E0A0B325AD1"
],
"record_type": "default__c",
"relevant_team": [
{
"teamMemberEmployee": [
"FSUID_43B6C5E99623942DF0BF6E0A0B325AD1"
],
"teamMemberRole": "1",
"teamMemberPermissionType": "2"
}
],
"name": "Nanshan Warehouse 21-1"
}
}
}
# Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error codes |
| dataId | string | Data ID |
# Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0,
"dataId": "5a9ce894f125ae9befxxxxxx"
}
# Notes
- Do not use the message field in the response for logical judgment, as errorMessage may change.