New hires

Create a new hire

const newHire = await ft.newHires.create(data);
  • Returns a Promise that resolves to a Freshteam.models.NewHire object
  • The first argument is of type Freshteam.models.NewHireCreate

Get new hire by ID

const newHireDetails = await ft.newHires.get(id, options);
  • Returns a Promise that resolves to a Freshteam.models.EmployeeDetail object

  • The first argument is ID of the new hire

  • The second argument is an Array of string containing names of related records to includeopen in new window

    • The property options.include can be added as an Array of string to include additional resources in the response, e.g.:
    await ft.newHires.get(id, { include: ["branch", "team"], ...otherOptions });
    

Update an new hire

const updatedNewHire = await ft.newHires.update(id, data);
  • Returns a Promise that resolves to a Freshteam.models.NewHire object
  • The first argument is the new hire ID
  • The second argument is an object of type Freshteam.models.NewHireCreate
Last Updated: