Integrate Companies with External Data Sources
To integrate companies with an external data source:
- Create or generate one or more JSON objects containing the following fields:
- sourceId: The unique identifier of the company in an external data source, such as an ERP system.
- sourceSiteId: The unique identifier of the location of the company in an external data source, such as an ERP system.
- workspaceId: The unique identifier of a workspace. The company will be added to the workspace with an ID value that matches the value of this field.
- postalCode: The company's postal code.
- companyName: The name of the company.
- status: The status of the company. Indicates whether the company is currently active.
- type: The type of the company, indicating its function.
- Send a request to the API using the following information:
-
Endpoint:
https://<host>:<port>/api/restapi/project/company/syncBatch
-
Operation:
POST
- Example Request Body:
[ { "sourceId": 1, "sourceSiteId": "New York", "workspaceId": 30002, "postalCode": "10308", "companyName": "Example Company", "status": "ACTIVE", "type": "VENDOR" }, { "sourceId": 2, "sourceSiteId": "Tokyo", "postalCode": "100-0001", "workspaceId": 30002, "companyName": "Example Company Two", "status": "ACTIVE", "type": "RESELLER" } ]
-
Endpoint:
- The API should return a response similar to the following:
-
Response Code:
207
- Example Response Body:
[ { "statusCode": 201, "primaryKeyName": "companyId", "primaryKeyValue": 14004, "sourceId": "1" }, { "statusCode": 201, "primaryKeyName": "companyId", "primaryKeyValue": 14005, "sourceId": "2" } ]
-
Response Code: