Skip to content
Get started

Retrieve

client.workers.retrieve(stringid, RequestOptionsoptions?): WorkerRetrieveResponse { id, businessName, displayName, 12 more }
get/v1/workers/{id}

Get a specific worker by id.

ParametersExpand Collapse
id: string

The id of the worker.

ReturnsExpand Collapse
WorkerRetrieveResponse { id, businessName, displayName, 12 more }
id: string

The id of the worker.

businessName: string | null
displayName: string

The "ui" name of a worker. If it's a business contractor business name is used. Otherwise we default to preferred name, then first-last.

email: string

An email with a reasonably valid regex (shamelessly taken from zod)

endDate: string | null

A date string in the form YYYY-MM-DD

firstName: string
isBusiness: boolean | null
lastName: string
position: string
preferredName: string | null
startDate: string

A date string in the form YYYY-MM-DD

status: "onboarding" | "active" | "offboarding" | "inactive"
Accepts one of the following:
"onboarding"
"active"
"offboarding"
"inactive"
timeZone: string | null

The IANA timezone of the worker (e.g., America/New_York).

type: "employee" | "contractor"
Accepts one of the following:
"employee"
"contractor"
workEmail: string | null

An email with a reasonably valid regex (shamelessly taken from zod)

import WarpHr from 'warp-hr';

const client = new WarpHr({
  apiKey: 'My API Key',
});

const worker = await client.workers.retrieve('wrk_1234');

console.log(worker.id);
{
  "id": "wrk_1234",
  "businessName": null,
  "displayName": "Jack Galt",
  "email": "john@joinwarp.com",
  "endDate": "2000-01-01",
  "firstName": "Jonathan",
  "isBusiness": false,
  "lastName": "Galt",
  "position": "Research Engineer",
  "preferredName": "John",
  "startDate": "2000-01-01",
  "status": "onboarding",
  "timeZone": "America/New_York",
  "type": "employee",
  "workEmail": "john@joinwarp.com"
}
Returns Examples
{
  "id": "wrk_1234",
  "businessName": null,
  "displayName": "Jack Galt",
  "email": "john@joinwarp.com",
  "endDate": "2000-01-01",
  "firstName": "Jonathan",
  "isBusiness": false,
  "lastName": "Galt",
  "position": "Research Engineer",
  "preferredName": "John",
  "startDate": "2000-01-01",
  "status": "onboarding",
  "timeZone": "America/New_York",
  "type": "employee",
  "workEmail": "john@joinwarp.com"
}