Add a vacancy
This endpoint allows creating a vacancy and making it public for the employees specified in the request.
POST /api/v1/businesses/{businessId}/vacancies
|
Mandatory fields are marked with an asterisk (*). |
Request body
| JSON Analysis |
|---|
Details
|
Request example
Once the analysis of the different fields has been done, an example of the request body is shown:
{
"id": "2f14p",
"product": "0001-G",
"day": "2026-07-24",
"expiration": "2026-07-23T04:00:00Z",
"employees": [
"1006370","2677189"
],
"shifts": [
{
"start": "2026-07-24T18:00:00Z",
"end": "2026-07-24T19:00:00Z"
},
{
"start": "2026-07-24T21:00:00Z",
"end": "2026-07-25T03:00:00Z"
}
],
"publishToSiblings": true
}
If the data is correct, the vacancy will be published and will be visible under Scheduling > Vacant offers.
Considerations
Shifts (shifts) must match the day the vacancy is published for (day). The end field can be later in shifts ending after 00:00.
Times must be sent in UTC or with the corresponding time zone, and the publication is done considering the service’s time zone.
Overlap with other existing vacancies or assignments on the same day and shift is not validated — only incidences (above) and, if applicable, the product membership are checked.
|
Siblings of a product are the other products that belong to the same node in the organizational structure. |
Different vacancies can be published for the same date and interval as long as the external identifiers do not match.
Error codes
In addition to the common errors, this endpoint can return the following codes:
| Code | Message | Description |
|---|---|---|
|
Id is required / Product is required / Day is required / Expiration is required / Employee ids are required |
One of the mandatory fields is missing. |
Employee ids cannot be empty |
The |
|
Expiration can not be before now |
The |
|
Shifts must be less or equal than 2 |
More than two shifts have been specified. |
|
Start is required / End is required / Start must be after day / End must be after day / Start date for a Shift must be included in the day / End date for a Shift must be included in the day or in the next day / Shift has a wrong date range |
One of the shifts ( |
|
Employees do not belong to product <id>: [ids] |
With |
|
Vacancy already exists |
The external identifier ( |
|
Any of the employees has an incidence overlapping with the vacancy |
One of the specified employees has an incidence that overlaps with the vacancy. |
Useful links
What is a vacancy?