Skip to content

Forecast [EXPERIMENTAL]

A forecast is the expected the number of shifts that will be required on the given day and location. They is used in the context of capacity planning: a difference in the forecast and the available shifts can indicate ue in the planning. The provided forecasts are only used to show to the end user and are not taken into account for any of the calculations made by the application.

[EXPERIMENTAL] Upsert Forecast

Request

Upsert a single Forecast

Security
clientCredentials
Path
datestring, (date)required

Date for which to upsert a forecast

Example:2023-10-01
locationstringrequired

Name of the location for which to upsert the forecast

Example:Ghent
Headers
PreferArray of strings

The RFC7240 Prefer header indicates that a particular server behavior is preferred by the client but is not required for successful completion of the request (see RFC 7240).

The following behavior (see Examples) is supported by this API:

  • return=<minimal|representation> is used to suggest the server to return using 204 without resource (minimal) or using 200 or 201 with resource (representation) in the response body on success.
Examples:
minimal
Indicate no response is needed, can be omitted
["return=minimal"]
representation
Request the result of the operation as response
["return=representation"]
Bodyapplication/json
expected_shiftsinteger, >= 0

Expected number of shifts

Example:27
Payload
{ "expected_shifts": 27 }

Responses

Forecast created or updated

Headers
Preference-Appliedstring

Indicates whether a preference has been applied. (ex return=representation)

Locationstring, (URI)

A URI to access the result of the operation.

Bodyapplication/json
expected_shiftsinteger, >= 0

Expected number of shifts

Example:27
locationstringread-only

Name of the location

Example:"Ghent"
datestring, (date)read-only

Date of the forecast

Example:"2023-10-01"
Response
{ "expected_shifts": 27, "location": "Ghent", "date": "2023-10-01" }