If the person/service/resource does not yet have a schedule you will need to create it and assign it to them.
Create schedule
Endpoint:
https://example.jrni.com/api/v5/admin/{company_id}/schedules
Request:
curl https://example.jrni.com/api/v5/admin/1/schedules -H App-Id:1234 -X POST \
-H Auth-Token:xyz -H Content-Type:application/json
Assign schedule to staff member
Endpoint:
https://example.jrni.com/api/v5/admin/{company_id}/people/{person_id}
Request:
curl https://example.jrni.com/api/v5/admin/1/people/1 -H App-Id:1234 -X PUT \
-H Auth-Token:xyz -H Content-Type:application/json \
-d '{ "schedule_id": 123 }'
Create shift pattern
Endpoint:
https://example.jrni.com/api/v5/admin/{company_id}/schedules/{schedule_id}/shift_patterns
Request:
curl https://example.jrni.com/api/v5/admin/1/schedules/123/shift_patterns \
-H App-Id:1234 -X POST -H Auth-Token:xyz -H Content-Type:application/json \
-d '{
"start_date": "2018-04-01",
"start_time": "09:00",
"end_time": "18:00",
"frequency": "weekly",
"interval": 1,
"repeat_count": 52,
"by_day": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ],
"except_date": [ "2018-04-07", "2018-04-28" ]
}'