Related and Nested Writes
Write data to third-party platforms with relations to existing and new Common Model instances
Write data to third-party platforms with relations to existing and new Common Model instances
Common Models sometimes have relationships with other Common Models.
For example:
Employees can have related EmploymentsApplications can have related CandidatesCandidates can have related AttachmentsOur POST endpoints allow you to:
You cannot create references to the Merge IDs of existing Common Model instances at the same time as a Nested Write.
When sending POST requests to Merge, related Common Model instances can be referenced by their Merge ID.
All Common Model fields that accept references to other Common Model instances by their Merge ID are supported in POST requests.
Refer to our API reference to see what references are supported.
When creating an Employee using our HRIS API, a relationship between an Employee and an existing Team can be created by adding the Merge ID of the relevant Team to the new Employee's team field.
When creating an Attachment using our ATS API, a relationship between an Attachment and an existing Candidate is created by adding the Merge ID of the relevant Candidate to the new Attachment's candidate field.
Our POST endpoints allow you to create related Common Models in-line (also known as a Nested Write) if the related entity hasn’t been created yet.
Nested Writes are supported for only the following use cases at this time:
Employee — single nested Employment in Employee's employments fieldCandidate — single nested Application in Candidate's applications fieldCandidate — multiple nested Attachments in Candidate's attachments fieldWhen creating an Employee using our HRIS API, to create a new related Employment within a new Employee, you would pass the details of the Employment in an object within the new Employee's employments field.
When creating a Candidate using our ATS API, to create a new related Application within a new Candidate, you would pass the details of the Application in an object within the new Candidate's applications field.