Skip to content

Get employees

Request

Get employees

Security
oauth2(Required scopes: employee:list) or bearerAuth or apiKeyHeader
Query
sortByArray of strings

The data attributes by which to sort the results.

limitinteger, [ 1 .. 100 ]

The maximum count of results to retrieve.

Default:25
offsetinteger, >= 0

Offset from the start of results.

startingAfterstring

Return results starting after the provided object identifier.

endingBeforestring

Return results ending before the provided object identifier.

teamIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-only

** DEPRECATED - use teamIds ** Filter results to a single team.

teamIdsArray of strings

Filter results to employees that belong to at least one of a list of teams.

excludeTeamIdsArray of strings

Filter results to employees that do not belong to any of a list of teams.

managerEmployeeIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-only

The employee ID of the manager

searchstring

The search term on which to search. It will match ANY employee when the search term matches the following:

  • case-insensitive matches any substring of an employee's first name
  • case-insensitive matches any substring of an employee's last name
  • if there is whitespace in the search term, split on the whitespace, and case-insensitive match the first part to any substring of an employee's first name and the second part to any substring of the last name
  • exactly matches an employee's user's ID
  • exactly matches an employee's ID
  • exactly matches an employee's external ID (prefixed with ext-)
  • exactly matches one of employee's role IDs
GET
/employees
curl -i -X GET \
  'https://sandboxapi.peach.finance/api/employees?sortBy=string&limit=25&offset=0&startingAfter=string&endingBefore=string&teamId=string&teamIds=string&excludeTeamIds=string&managerEmployeeId=string&search=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
countintegerread-only

Number of items returned by the current request.

nextUrlstring or nullread-only

URL of the next set of results.

previousUrlstring or nullread-only

URL of the previous set of results.

statusinteger

HTTP status code.

totalintegerread-only

Total number of items in this result.

dataArray of objects(Employee)
Response
{ "count": 0, "nextUrl": "string", "previousUrl": "string", "status": 0, "total": 0, "data": [ {} ] }