New hires
Create a new hire
const newHire = await ft.newHires.create(data);
// use newHire.json() to access data
- Returns a
Responseobject that resolves to aFreshteam.models.NewHireobject - The first argument is of type
Freshteam.models.NewHireCreate
Get new hire by ID
const newHireDetails = await ft.newHires.get(id, options);
// use newHireDetails.json() to access data
Returns a
Responseobject that resolves to aFreshteam.models.EmployeeDetailobjectThe first argument is ID of the new hire
The second argument is an
Arrayofstringcontaining names of related records to include- The property
options.includecan be added as anArrayofstringto include additional resources in the response, e.g.:
await ft.newHires.get(id, { include: ["branch", "team"], ...otherOptions }); // use newHires.json() to access data- The property
Update an new hire
const updatedNewHire = await ft.newHires.update(id, data);
// use updatedNewHire.json() to access data
- Returns a
Responseobject that resolves to aFreshteam.models.NewHireobject - The first argument is the new hire ID
- The second argument is an object of type
Freshteam.models.NewHireCreate