Functions for interacting with the Applicant Tracking System (ATS) in the BambooHR API.
The owner of the API key used for these endpoints must have access to ATS settings.
Summary
Functions
Adds a comment to an application.
Creates a new candidate application for a job opening.
Creates a new job opening.
Retrieves the applicant statuses configured for the company, including both system-defined and custom statuses.
Retrieves the full details of a single application, including applicant info, job details, questions and answers, and status history.
Retrieves a paginated list of job applications.
Retrieves all company locations available for use when creating a job opening.
Retrieves the list of employees who can be assigned as a hiring lead when creating a new job opening.
Retrieves a list of job opening summaries.
Updates the status of an application.
Functions
@spec create_application_comment(BambooHR.Client.t(), integer(), map()) :: BambooHR.Client.response()
Adds a comment to an application.
Parameters
client- Client configuration created withBambooHR.Client.new/1application_id- The ID of the application to add a comment tocomment_data- Map with"comment"(required) and"type"(optional, defaults to"comment")
Examples
iex> BambooHR.Hiring.create_application_comment(client, 42, %{"comment" => "Great fit"})
{:ok, %{"type" => "comment", "id" => 55}}
@spec create_candidate( BambooHR.Client.t(), String.t(), String.t(), integer(), keyword() ) :: BambooHR.Client.response()
Creates a new candidate application for a job opening.
Only fields required by the target job opening's standard questions
need to be provided beyond first_name, last_name, and job_id.
Parameters
client- Client configuration created withBambooHR.Client.new/1first_name- The candidate's first namelast_name- The candidate's last namejob_id- The ID of the job opening for the candidate applicationopts- Optional keyword list of additional fields, e.g.:email,:phoneNumber,:source,:address,:city,:state,:zip,:country,:linkedinUrl,:dateAvailable,:desiredSalary,:referredBy,:websiteUrl,:highestEducation,:collegeName,:references, and the binary file fields:resume/:coverLetter(each as{binary_content, filename: "..."})
Examples
iex> BambooHR.Hiring.create_candidate(client, "Jane", "Doe", 7, email: "jane@example.com")
{:ok, %{"result" => "success", "candidateId" => 99}}
@spec create_job_opening( BambooHR.Client.t(), String.t(), String.t(), integer(), String.t(), String.t(), keyword() ) :: BambooHR.Client.response()
Creates a new job opening.
Use get_company_locations/1 and get_hiring_leads/1 to obtain valid
IDs for the jobLocation and hiring_lead fields.
Parameters
client- Client configuration created withBambooHR.Client.new/1posting_title- The posting title of the job openingjob_status- One of"Draft","Open","On Hold","Filled","Canceled"hiring_lead- Employee ID of the hiring lead (fromget_hiring_leads/1)employment_type- e.g."Full-Time","Part-Time","Contractor"job_description- The long-form text description of the job openingopts- Optional keyword list of additional fields, e.g.:department,:minimumExperience,:compensation,:jobLocation(fromget_company_locations/1),:internalJobCode,:locationType, and theapplicationQuestion*fields (each"true","false", or"Required")
Examples
iex> BambooHR.Hiring.create_job_opening(client, "Engineer", "Open", 123, "Full-Time", "Build things")
{:ok, %{"result" => "success", "jobOpeningId" => "42"}}
@spec get_applicant_statuses(BambooHR.Client.t()) :: BambooHR.Client.response()
Retrieves the applicant statuses configured for the company, including both system-defined and custom statuses.
Parameters
client- Client configuration created withBambooHR.Client.new/1
Examples
iex> BambooHR.Hiring.get_applicant_statuses(client)
{:ok, [%{"id" => "1", "name" => "New", "enabled" => true}]}
@spec get_application(BambooHR.Client.t(), integer()) :: BambooHR.Client.response()
Retrieves the full details of a single application, including applicant info, job details, questions and answers, and status history.
Parameters
client- Client configuration created withBambooHR.Client.new/1application_id- The ID of the application to retrieve
Examples
iex> BambooHR.Hiring.get_application(client, 42)
{:ok, %{"id" => 42, "applicant" => %{"firstName" => "Jane"}}}
@spec get_applications(BambooHR.Client.t(), map()) :: BambooHR.Client.response()
Retrieves a paginated list of job applications.
Parameters
client- Client configuration created withBambooHR.Client.new/1params- Optional query params:"page","jobId","applicationStatusId","applicationStatus","jobStatusGroups","searchString","sortBy","sortOrder","newSince"
Examples
iex> BambooHR.Hiring.get_applications(client)
{:ok, %{"applications" => [], "paginationComplete" => true, "nextPageUrl" => nil}}
@spec get_company_locations(BambooHR.Client.t()) :: BambooHR.Client.response()
Retrieves all company locations available for use when creating a job opening.
Use the returned location IDs as the jobLocation field passed to
create_job_opening/7.
Parameters
client- Client configuration created withBambooHR.Client.new/1
Examples
iex> BambooHR.Hiring.get_company_locations(client)
{:ok, [%{"id" => 1, "name" => "HQ"}]}
@spec get_hiring_leads(BambooHR.Client.t()) :: BambooHR.Client.response()
Retrieves the list of employees who can be assigned as a hiring lead when creating a new job opening.
Use the returned employeeId values as the hiring_lead argument to
create_job_opening/7.
Parameters
client- Client configuration created withBambooHR.Client.new/1
Examples
iex> BambooHR.Hiring.get_hiring_leads(client)
{:ok, [%{"employeeId" => 123, "preferredFullName" => "Jane Smith"}]}
@spec get_job_summaries(BambooHR.Client.t(), map()) :: BambooHR.Client.response()
Retrieves a list of job opening summaries.
By default returns all non-deleted job openings.
Parameters
client- Client configuration created withBambooHR.Client.new/1params- Optional query params:"statusGroups","status_ids","sortBy","sortOrder"
Examples
iex> BambooHR.Hiring.get_job_summaries(client)
{:ok, [%{"id" => 7, "title" => %{"label" => "Engineer"}, "status" => %{"label" => "Open"}}]}
@spec update_applicant_status(BambooHR.Client.t(), integer(), integer()) :: BambooHR.Client.response()
Updates the status of an application.
Use get_applicant_statuses/1 to obtain valid status IDs.
Parameters
client- Client configuration created withBambooHR.Client.new/1application_id- The ID of the application to updatestatus_id- The ID of the status to assign to the application
Examples
iex> BambooHR.Hiring.update_applicant_status(client, 42, 2)
{:ok, nil}