Creates bulk demand for a given period

URL Expired

The URL for this request expired after 30 days.

The bulk demand creation endpoint was designed to create daily demand for a given period, location, and role.

Fields

Here's a description of the fields allowed for the endpoint:

Examples

Example 1

curl --location '<environment_url>/api/serviceattendance/processes/demand/bulkCreate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <insert_token>' \
--data '{
    "locationUuid": "c349681c-3567-4010-b45c-38b3622c02af",
    "jobUuid": "58907792-980f-4cc0-bed7-38ea0d08b8df",
    "startDate": "2025-04-14T00:00:00Z",
    "endDate": "2025-04-19T00:00:00Z",
    "daysOfWeek": [1, 3, 5],
    "headcountChanges": [
        {
            "startTime": "2025-04-07T09:00:00.000",
            "endTime": "2025-04-07T16:00:00.000",
            "minimumHeadcount": 2
        }
    ]
}'

2025-04-14 falls on Monday and 2025-04-19 falls on Saturday. Since we're passing [1, 3, 5] (Monday, Wednesday, and Friday) as the value for daysOfWeek, demand will be created for those three days only. And since there's only one headcount change that goes from 9 am to 4 pm, this will mean that on Monday, Wednesday and Friday you'll need at least 2 workers between 9 am and 4 pm.

Example 2

curl --location '<environment_url>/api/serviceattendance/processes/demand/bulkCreate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <insert_token>' \
--data '{
    "locationUuid": "c349681c-3567-4010-b45c-38b3622c02af",
    "jobUuid": "58907792-980f-4cc0-bed7-38ea0d08b8df",
    "startDate": "2025-04-14T00:00:00Z",
    "endDate": "2025-04-19T00:00:00Z",
    "daysOfWeek": [1, 3, 5],
    "headcountChanges": [
        {
            "startTime": "2025-04-07T09:00:00.000",
            "endTime": "2025-04-07T12:00:00.000",
            "minimumHeadcount": 3
        },
        {
            "startTime": "2025-04-07T12:00:00.000",
            "endTime": "2025-04-07T15:00:00.000",
            "minimumHeadcount": 0
        },
        {
            "startTime": "2025-04-07T15:00:00.000",
            "minimumHeadcount": 1
        }
    ]
}'

Demand will be created for the same days as the previous example (Monday, Wednesday, and Friday). In this case, there are three headcount changes for the demand: