Merge Docs

Remote Data

Learn how to get the latest integration data in the original format Merge received it in.

Overview

Using Merge’s remote data, you can get the latest integration data in the original format Merge received it in.

If you set Merge's include_remote_data query parameter to true, Merge will include original data as we saw it from the remote API endpoint. This approach is ideal for when you’re looking for an extra field specific to an integration that is not included in Merge’s standardized format.

If you're looking for data from an endpoint that we do not include in our common data models, you may need to create an Authenticated Pass-through Request instead.


Query Parameters


include_remote_dataBoolean
Indicates whether the latest remote data should be included with the requested resource.

remote_fieldsString
Indicates which common model fields should be returned in the original, non-normalized format.

Fetching with the Merge SDK

See below for an example of how to get remote data via Merge’s SDK:

Remote Data via SDK
1employees_response = employees_api_instance.employees_list("YOUR_ACCOUNT_TOKEN", include_remote_data=True)

Response

Resources fetched with remote data will look like the following:

Remote Data Example
JSON
{
"id": "83622854-bb75-476f-9e67-a145593de468",
"remote_id": "8324",
...
...
"remote_data": [
{
"path": "/employees",
"data": {
"id": 8324,
"name": "Gil Feig"
}
},
{
"path": "/locations",
"data": {
"id": 998,
"employee_id": 8324,
"city": "San Francisco",
"state": "CA"
}
}
]
}

Remote Fields

Merge's Remote Fields feature allows you to obtain the value of common model enum fields in the original format that Merge received it in. This feature is available in all of Merge's common model API endpoints, where relevant.

If you include a common model enum field's name into the remote_fields query parameter, Merge will replace the normalized enum value of the specified common model field with the unnormalized value from the third-party in the response body. This is useful if you always want to return the original value of common model fields as they are represented in your customer's third-party platform, instead of in Merge's normalized format.

When using the remote_fields query parameter, Merge will map the unnormalized value of the field to the specified common model field so that you can reliably access that field's value in a consistent way, regardless of the integration your customer is using.

Below is an example response from Merge's /employees endpoint, where /employees was passed into the query parameters. In this example, instead of returning the normalized enum value of "INACTIVE" in the employment_staus field, we return the original value "Terminated" as it was received from the third-party.

Remote Fields Example Response
JSON
{
"id": "0958cbc6-6040-430a-848e-aafacbadf4ae",
"remote_id": "19202938",
"employee_number": "2",
"display_full_name": "Cousin Greg Hirsch",
"employment_status": "Terminated",
...
...
}