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
{
  "id": "string",
  "product": "string",
  "day": "string",
  "expiration": "string",
  "employees": [
    "string",
    "string"
  ],
  "shifts": [
    {
      "start": "string",
      "end": "string"
    }
  ]
}
Details
  • id*: external identifier of the vacancy.

  • product*: identifier of the product linked to the vacancy.

  • day*: day of the vacancy in yyyy-MM-dd format.

  • expiration*: deadline until which the vacancy can be applied for; once this date has passed, applications for the vacancy will no longer be accepted. Must be sent in yyyy-MM-ddTHH:mm:ssZ format.

  • employees*: list of identifiers of the employees who will be notified of the vacancy publication.

  • shifts*: list of shifts defined for the vacancy. Includes, for each interval, the following fields:

    • start*: start of the shift in yyyy-MM-ddTHH:mm:ssZ format. Must match the date the vacancy is published for.

    • end*: end of the shift in yyyy-MM-ddTHH:mm:ssZ format. Can be later than the date the vacancy is published for, for example, in shifts ending after midnight.

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"
    }
  ]
}

Considerations

Times must be sent in UTC, and the publication is done considering the service’s time zone. In the example given in the request, 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

If the data is correct, the vacancy will be published and will be visible under Scheduling > Vacant offers.

If the vacancy already exists, the request will return a 400 - Bad request error indicating Vacancy already exists.

Different vacancies can be published for the same date and interval as long as the identifiers do not match.