What is the expand parameter?
The "expand" parameter can be used during GET requests to fetch the related objects in your response body. For example, if you sent a request for GET /Employees, you can use the expand parameter on Teams. This will fetch the associated Team data for each given employee. The Employee objects will be returned with the corresponding Teams objects.
How can I find out if the object I want to view can be expanded?
In the API Reference section of the Merge Docs, you can view the different objects within the HRIS, ATS, Accounting, and Ticketing Common Models. When you click on these objects and find the specific request you would like to make, you can search to see if "expand" is listed under the "Query & Path Parameters" section.
Below, you will find the different objects within HRIS, ATS, Accounting, and Ticketing that can be expanded:
HRIS Objects with Expand Parameter:
Employee Payroll Runs
Time Off Balances
ATS Objects with Expand Parameter:
Job Interview Stages
Accounting Objects with Expand Parameter:
Ticketing Objects with Expand Parameter:
How to write a query that uses expand
If you are using Postman to make the requests, you can go to the Params section and write "expand" under Key, and the object you are trying to expand under Value. Separate multiple expansions with a comma (ie. "team,employments").
The sample query that fetches employees and expands on teams would look like this: https://api.merge.dev/api/hris/v1/employees?expand=team.