Making a Passthrough Request
Send POST requests to the URL below with the required body parameters to create a Passthrough Requests.
https://api.merge.dev/api/{CATEGORY}/v1/passthrough
Replace CATEGORY in the URL with hris, ats, accounting, ticketing, crm, mktg, filestorage, or knowledgebase depending on the relevant category you're making an API request to.
Reference the integration's API documentation to accurately fill out the body parameters for the specific Passthrough Request you're looking to make.
methodStringpathStringdataStringheadersObject"Content-Type" header is required for passthrough. Choose content type corresponding to expected format of receiving server. Example for request_format JSON:"Content-Type":"application/json"
multipart_form_dataMultipartFormField[]MultipartFormField objects in here instead of using the data param if request_format is set to MULTIPART.MultipartFormField object is used to represent fields in an HTTP request using multipart/form-data.nameStringdataStringencodingEnumdata. Defaults to RAW if not defined. Possible values include: RAW, BASE64. In cases where there is no clear mapping, the original value passed through will be returned.file_nameStringcontent_typeStringrequest_formatEnumJSON, XML, MULTIPART.Some third-party APIs require you to include credentials directly in the path or request body (data) when making Passthrough Requests to the third-party API on behalf of a linked account. You can securely access a linked account's stored credentials programmatically by including variables in double brackets (e.g. {{USERNAME}}).
Below is the full list of variables available for use in Passthrough Requests:
| Variable | Description |
API_URL_SUBDOMAIN | Third-party API URL subdomain. |
API_KEY | Third-party API Key. |
USERNAME | Basic auth username for third-party API. |
PASSWORD | Basic auth password for third-party API. |
LINKED_ACCOUNT_ATTR.field_name | If an account-specific credential is needed to make a request to a third-party API, and is not otherwise covered in the other variables, you can access it using this format.
|
Example - Paylocity
This is an example request body that demonstrates how the API_URL_SUBDOMAIN variable can be used for Passthrough Requests to Paylocity's API.
Some third-party APIs require you to encode credentials using Base64 encoding. You can specify what needs to be encoded into Base64 format in your third-party request by wrapping that content between {BASE-64} tags in the passthrough request body.
Example - Workday
This is an example request body that demonstrates how the BASE-64 method can be used for Passthrough Requests to Workday's API.
See below for an example of how to create an authenticated Passthrough Request with Merge's SDK:
The response to your query will look like the following:
The Passthrough Request endpoint will return a 408 status if there is a timeout in getting the response. If you have experienced delays or timeouts with normal Passthrough Requests we recommend switching to use Merge's Async Passthrough requests.