Using Merge's remote data, you can get the latest integration data in the original format Merge received it in.
Merge will include original data as we saw it from the remote API endpoint, if you set Merge's
include_remote_data query parameter to
true and turn on Remote Data in your dashboard.
remote_datawill not be updated during recurring syncs unless normalized fields (e.g., common model fields or field mappings) are updated.
- Passthrough: 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 Passthrough Request instead.
- Accessing: remote_data is an array of response objects per API path and ordering can change over time. While accessing remote data, we highly recommend asserting on the specific API path variable instead of accessing
remote_data[index].pathis a variable that represents the api path and will differ for each common model/integration.
See below for an example of how to get remote data via Merge's SDK:
Resources fetched with remote data will look like the following:
Merge's Show Enum Origins 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
show_enum_origins 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
show_enum_origins 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_status field, we return the original value "
Terminated" as it was received from the third-party.