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:

  1. Bank Info

  2. Benefits

  3. Employee Payroll Runs

  4. Employees

  5. Employments

  6. Teams

  7. Time Off

  8. Time Off Balances

ATS Objects with Expand Parameter:

  1. Activities

  2. Applications

  3. Attachments

  4. Candidates

  5. Eeocs

  6. Interviews

  7. Job Interview Stages

  8. Jobs

  9. Offers

  10. Scorecards

Accounting Objects with Expand Parameter:

  1. Company Info

  2. Contacts

  3. Credit Notes

  4. Expenses

  5. Invoices

  6. Items

  7. Journal Entries

  8. Payments

  9. Purchase Orders

Ticketing Objects with Expand Parameter:

  1. Attachments


  3. Contacts

  4. Tickets

  5. Users

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.

Did this answer your question?