curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/shifts/bookings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "attended",
"hours_logged": 3,
"signed_off": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'attended', hours_logged: 3, signed_off: true})
};
fetch('https://{organization}.rescueconsole.com/api/shifts/bookings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/bookings/{id}"
payload = {
"status": "attended",
"hours_logged": 3,
"signed_off": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"window_role_id": "<string>",
"person_id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"status": "booked",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"hours_logged": 1,
"signed_off_by": "<string>",
"signed_off_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"cancellation_requested_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"cancellation_decision": "released",
"cancellation_decided_by": "<string>",
"cancellation_decided_at": "2023-11-07T05:31:56Z",
"cancellation_decision_notes": "<string>",
"custom_fields": "<string>"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Record hours and outcome
Records what happened on the day: the outcome, the hours and notes, and the sign-off. Send only what changes. signed_off: true signs the hours off as the person who created the key, and needs the hours logged first (zero counts). While hours are signed off, the outcome and the hours cannot change: send signed_off: false in the same request to correct them. A given-up sign-up cannot be changed, and it cannot be given up here. Needs write on Shifts.
A coordinator’s: needs write on Shifts AND read on People. A key without read on People is refused (403) with “Only a coordinator can do this: it needs permission to see People.”
curl --request PATCH \
--url https://{organization}.rescueconsole.com/api/shifts/bookings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "attended",
"hours_logged": 3,
"signed_off": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'attended', hours_logged: 3, signed_off: true})
};
fetch('https://{organization}.rescueconsole.com/api/shifts/bookings/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/bookings/{id}"
payload = {
"status": "attended",
"hours_logged": 3,
"signed_off": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"window_role_id": "<string>",
"person_id": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"status": "booked",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"hours_logged": 1,
"signed_off_by": "<string>",
"signed_off_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"cancellation_requested_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"cancellation_decision": "released",
"cancellation_decided_by": "<string>",
"cancellation_decided_at": "2023-11-07T05:31:56Z",
"cancellation_decision_notes": "<string>",
"custom_fields": "<string>"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The sign-up's ID.
Body
What happened. cancelled and cancellation_requested cannot be set here.
booked, attended, no_show The hours worked. Zero is an answer. Null clears it.
x >= 0Null clears it.
true signs the hours off as the person who created the key. false removes the sign-off.
Response
The sign-up, as it now is.
The role on the shift this sign-up is for.
Who signed up.
The stretch of the shift they took.
booked: signed up. cancellation_requested: asked to be let off inside the notice period, waiting for a coordinator. cancelled: given up. attended and no_show: what happened on the day.
booked, cancellation_requested, cancelled, attended, no_show Your organization's ID.
The hours worked, once recorded.
x >= 0Who signed off the hours: a person's record ID.
When the hours were signed off. Null until they are.
When they asked to be let off inside the notice period.
The reason they gave for giving it up, if any.
A coordinator's answer to the latest request: released (let off) or kept (still expected).
released, kept, null Who answered: a person's record ID.
What the coordinator wrote with the answer.
Your own sign-up fields, as JSON text.