Rightwork OG Image
Browse API documentation
API docsWorkforce API v1

Employees & payroll IDs

Find an employee by payroll ID and see which locations they work at.

Request

GET /api/external/v1/employees

Required scope: employees:read. Set up your key and base URL before running this example.

Shell
curl --fail-with-body \
  -H "Authorization: Bearer $RIGHTWORK_API_KEY" \
  -H "Accept: application/json" \
  "$RIGHTWORK_BASE_URL/api/external/v1/employees"

Parameters

ParameterRequiredHow to use it
page_sizeNoRecords per page (1–500, default 100).
cursorNoPass the previous page’s meta.next_cursor with the same filters and page size.
employee_idNoEmployee UUID. Choose this or payroll_external_id.
payroll_external_idNoExact payroll ID as a string, including leading zeros.
payroll_sourceNoUse payroll_source_ukg or payroll_source_paylocity to narrow a payroll ID lookup.
location_idNoUUID of a location your key can access.
activeNotrue for at least one active membership in the locations you can access, false for none. Omit to include both.

Example response

JSON
{
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000123",
      "payroll_external_id": "00123",
      "payroll_source": "payroll_source_ukg",
      "mapping_status": "mapped",
      "first_name": "Alex",
      "last_name": "Morgan",
      "memberships": [
        {
          "location_id": "00000000-0000-4000-8000-000000000010",
          "active": true
        }
      ]
    }
  ],
  "meta": {
    "request_id": "00000000-0000-4000-8000-000000000901",
    "snapshot_id": "00000000-0000-4000-8000-000000000902",
    "as_of": "2026-09-18T18:00:00+00:00",
    "scope_revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "next_cursor": null,
    "complete": true
  }
}

Use the employee id to match records across schedules, leave, and timecards. Employees with a linked account appear once, with a membership for each location you can access. Linking accounts can change a previously unlinked employee’s ID. Refresh the full employee list after a merge or link.

Keep payroll IDs as strings, including case, spaces, and leading zeros. A lookup returns an empty list if there’s no match. Multiple matches within the selected locations and payroll source return HTTP 409 (ambiguous_payroll_id). Specify the payroll source or ask your administrator to correct the mapping.

Response fields

FieldTypeFormat / values
idstringuuid
payroll_external_idstring or null
payroll_sourcestring or null
mapping_statusstringmapped, missing, duplicate
first_namestring
last_namestring
membershipsarray of objects
memberships[].location_idstringuuid
memberships[].activeboolean

For multi-page results, follow the pagination and synchronization guide before updating your records.