A VolunteerShift represents a Volunteer's application to work a specific Shift.
VolunteerShifts are accessed via /api/volunteershift
.
See "Object Properties" in Introduction for basic shared properties.
Complete details in VolunteerShiftProperties.
See "Related Objects" in Introduction for how to use them.
If the related Convention is set up to require volunteers to have a badge, this is the Badge this VolunteerShift belongs to. Otherwise this is optional.
The Convention this VolunteerShift belongs to.
The Shift this VolunteerShift belongs to.
Combinations of volunteer_id
and shift_id
are unique in VolunteerShifts and cannot be duplicated.
(A Volunteer can apply for a Shift only once.)
The Volunteer this VolunteerShift belongs to.
VolunteerShifts are not parents to any other object and so have no relationships.
See "Includes" in Introduction for how to use them.
This will include the related Shift's ConventionDay in format:
{ "id": "xxx", "name": "Sunday", ... }
This will include the Room, if any, associated to the related Shift's ShiftType, in format:
{ "id": "xxx", "name": "Fun Room", ... }
If the related ShiftType has no associated Room, shift_room
will not be included (as opposed to being included, but empty { }
).
This will include the count of the volunteer's badges that can support this volunteershift. For Conventions that require volunteers to have a badge.
The services used to fetch and manipulate VolunteerShifts.
Searching across all conventions is not enabled. To search within a single convention's VolunteerShifts, see "Relationships" in Convention.
POST /api/volunteershift
Returns the same as a normal read.
GET /api/volunteershift/xxx
Returns:
{ "id" : "xxx", "status" : "unscheduled", "volunteer_id" : "xxx", "shift_id" : "xxx", ... }
There is no REST endpoint for general VolunteerShift update. See below for specific services to update a VolunteerShift status
.
DELETE /api/volunteershift/xxx
You cannot delete a VolunteerShift with status
"scheduled".
Returns:
{ "success" : 1 }
status
to "scheduled"PUT /api/volunteershift/xxx/status-schedule
Sets the volunteershift's status
to "scheduled".
Makes an entry in the Shift's shift_log
that you have put the volunteer on the schedule.
status
to "declined"PUT /api/volunteershift/xxx/status-decline
Sets the volunteershift's status
to "declined".
If the previous status
was "scheduled", makes an entry in the related Shift's shift_log
that you have removed the volunteer from the schedule.
status
to "unscheduled"PUT /api/volunteershift/xxx/status-unschedule
Sets the volunteershift's status
to "unscheduled".
If the previous status
was "scheduled", makes an entry in the related Shift's shift_log
that you have removed the volunteer from the schedule.
GET /api/volunteershift/xxx/supporting-badges
Gets the volunteer's badges that support this volunteershift. This is useful when the Convention has been set to require volunteers to have a badge.
Returns:
[ { "id" : "xxx", "badge_number" : "xxx", "firstname" : "Joe", "lastname" : "User", ... }, ... ]
PUT /api/volunteershift/xxx/change-badge
Changes the badge used to support the volunteershift. This is for Conventions that have been set to require volunteers to have a badge.
The id
of the badge to associate with this volunteershift.
Returns the same as a normal read.