Integrate External Data using the API

The API provides a flexible mechanism for integrating application data with data from other sources. The API keeps all integrated data synchronized with data from the external source using a sourceId object property for all integrated JSON objects. All operations on integrated objects must contain the sourceId property to ensure data remains in sync, and newly integrated objects must include a sourceId that represents a unique identifier for the corresponding source data in an external data source, such as an ERP system. For example, to import an employee record from an external source as a new resource in the application, you must provide a sourceId property in the JSON object submitted to the API.

The following JSON object is an example of a valid integrated resource, containing a sourceId property:

{ 
          "sourceId": "ERP-ONE", 
          "workspaceId": 30002, 
          "resourceName": "Andy Hallman", 
          "resourceType": "LABOR", 
          "resourceClass": "RESOURCE", 
          "resourceCode": "HallmanA", 
          "resourceStatus": "ACTIVE", 
          "resourceTitleName": "Design Engineer", 
          "calendar": 1 
      }

The preceding JSON example, when submitted to the API using the appropriate endpoint, will create an integrated resource in the application. Each time you intend to update this resource, you must pass a JSON object containing the same sourceId in addition to the data you want to update.

The following JSON object is an example of an invalid integrated resource:

{ 
          "workspaceId": 30002, 
          "resourceName": "Andy Hallman", 
          "resourceType": "LABOR", 
          "resourceClass": "RESOURCE", 
          "resourceCode": "HallmanA", 
          "resourceStatus": "ACTIVE", 
          "resourceTitleName": "Design Engineer", 
          "calendar": 1 
      }

The API will fail to create an integrated resource if it receives the JSON from the preceding example. To make the example valid, you must include a sourceId for the object.

When you interact with the API to manage integrated data, all request body data should include a sourceId. If no sourceId is included, the API will fail to process the request.