Authorizations
API key for accessing BlueHive API endpoints. Format: "ApiKey <your-api-key>" or "Bearer <your-api-key>"
Path Parameters
Unique identifier of the employee
import BlueHive from '@bluehive/sdk';
const client = new BlueHive({
apiKey: 'My API Key',
});
const employee = await client.employees.retrieve('employeeId');
console.log(employee.employee);
{
"success": true,
"employee": {
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"dob": "<string>",
"title": "<string>",
"activeAccount": "Active",
"blurb": "<string>",
"address": {
"street1": "<string>",
"street2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"county": "<string>",
"country": "<string>"
},
"phone": [
{
"number": "<string>",
"type": "Cell"
}
],
"employer_id": "<string>",
"departments": [
"<string>"
],
"extendedFields": [
{
"name": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"message": "<string>"
}
Retrieve an employee by their unique ID.
import BlueHive from '@bluehive/sdk';
const client = new BlueHive({
apiKey: 'My API Key',
});
const employee = await client.employees.retrieve('employeeId');
console.log(employee.employee);
{
"success": true,
"employee": {
"_id": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"dob": "<string>",
"title": "<string>",
"activeAccount": "Active",
"blurb": "<string>",
"address": {
"street1": "<string>",
"street2": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"county": "<string>",
"country": "<string>"
},
"phone": [
{
"number": "<string>",
"type": "Cell"
}
],
"employer_id": "<string>",
"departments": [
"<string>"
],
"extendedFields": [
{
"name": "<string>",
"value": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"message": "<string>"
}
API key for accessing BlueHive API endpoints. Format: "ApiKey <your-api-key>" or "Bearer <your-api-key>"
Unique identifier of the employee
Was this page helpful?