Assign a vacancy
This endpoint allows assigning a previously published vacancy to an employee.
POST /api/v1/businesses/{business}/vacancies/{vacancy}/acceptor/{employee}
The data that needs to be included in the request are as follows:
-
business: external identifier configured in Orquest for the business.
-
vacancy: external identifier of the vacancy. It must be set when creating vacancies via API; if the vacancy is created manually, the external identifier is generated automatically.
-
employee: external identifier of the employee to whom the vacancy is to be assigned.
Considerations
If the request data is correct, an assignment with the Vacancy task will be created and the employee’s name will be added in the Accepted by column under Scheduling > Vacant offers.
If the vacancy has already been assigned, the request will return a 400 - Bad request error indicating Vacancy already assigned.
If the vacancy has expired, the request will return a 400 - Bad request error indicating Vacancy expired.
If the vacancy overlaps with an existing assignment of the employee, the request will return a 400 - Bad request error indicating overlapping.
If the vacancy overlaps with an incidence, the request will return a 400 - Bad request error indicating Vacancy overlapped by person incidence.
If the vacancy identifier does not exist, the request will return a 404 - Not found error indicating Vacancy not found.
Useful links
What is a vacancy?
How to register a vacancy?