Retrieve
client.workers.retrieve(stringid, RequestOptionsoptions?): WorkerRetrieveResponse { id, businessName, displayName, 12 more }
/v1/workers/{id}
Get a specific worker by id.
Parameters
id: string
The id of the worker.
Returns
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"
}