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": "0625-vac",
"product": "0001-G",
"day": "2024-06-25",
"expiration": "2024-06-24T10:00:00Z",
"employees": [
"1006355",
"1006356"
],
"shifts": [
{
"start": "2024-06-25T10:00:00Z",
"end": "2024-06-25T17:00:00Z"
}
]
}
If the data is correct, the vacancy will be published and will be visible under Scheduling > Vacant offers. In the example given, for a service in UTC+2, the published vacancy would be as follows:
-
Shift: 25 Jun. 2024 12:00 - 25 Jun. 2024 19:00
-
Expiration: 24 Jun. 2024 12:00
Considerations
Times must be sent in UTC, and the publication is done considering the service’s time zone.
If the vacancy already exists, the request will return a 400 - Bad request error indicating Vacancy already exists.
If any of the employees listed in the request (employees) do not belong to the product where the vacancy is posted, the request will return a 400 Bad Request error indicating in the message Employees do not belong to product… .
Different vacancies can be published for the same date and interval as long as the identifiers do not match.