Writes
Make POST and PATCH requests to Merge to write data to third-party platforms
Make POST and PATCH requests to Merge to write data to third-party platforms
Merge’s Unified API allows you to write data to third-party platforms.
You can create new entities and update existing entities in your end users’ Linked Accounts.
Merge supports POST requests and PATCH requests based on availability from third-party platforms.
Refer to our API reference to confirm which platforms and data models support POST and PATCH requests. We are constantly increasing our support across third-party platforms.
A POST request to Merge’s API consists of two parts:
As with any Merge API interaction, POST requests to Merge require authentication parameters to (1) authorize users to create or update data and (2) tell Merge which third-party platform to write to.
To authorize your request:
account_token to identify the third-party platform and linked account to updateRefer to our Authentication guide for more details on using account_token.
Your POST request body will include the following:
model field that contains the object data to write to the third-party platformremote_user_id parameter to confirm that you have permission to POST data to that integrationThe model body parameter contains the field values of the Common Model instance you are looking to create.
These fields expect different data types depending on the category, third-party platform, and Common Model.
For example:
Employee emails are located in the personal_email and work_email fields as stringsCandidate emails are located in the email_addresses field, which is an array of objects with two fields (value and email_address_type)Refer to our API reference to learn more about specific model parameters.
Some ATS integrations need to verify that your user has permission to create candidates and link them to open jobs.
For these platforms, add Merge’s ID for your end user (specifically, the id field in the response from a GET request to Merge’s /users endpoint) in the remote_user_id field in the Request Body (as in the example).
To check if this parameter is required for a given ATS integration, use the Linked Accounts endpoint.
After making a request to Merge’s POST endpoints, the response will be a JSON object with up to four properties:
model field containing the fields of the newly created common model, if successfully createdwarnings field containing messaging on issues with the request that did not cause it to failerrors field containing messaging on issues with the request that caused it to faillogs field containing the IDs of logs related to outbound requests made to the third-party platform during the requestIf the POST request is successful, the model field will contain a full JSON representation of the newly created Common Model instance.
The fields and associated values within the model object will largely correspond to what was sent in the POST request body, with the following exceptions:
id fieldLearn more about Nested Writes in our guide to Writing Nested Data
The warnings field contains details on issues that don’t stop the request from being successful.
The errors field contains details on issues that cause the request to fail.
Learn more about warnings and errors in our guide to Troubleshooting Writes