Shifts are for volunteers.
Shifts are accessed via /api/shift
.
See "Object Properties" in Introduction for basic shared properties.
Complete details in ShiftProperties. It also has these extra read-only properties:
A description of the shift's time like "2:00 PM to 5:00 PM".
The duration of the shift in hours. Partial hours are included, e.g. "5.25", if the shift is 5 hours and 15 minutes long.
See "Related Objects" in Introduction for how to use them.
The Convention this shift belongs to.
The ConventionDay on which this shift is scheduled.
The ShiftType on which the shift is based.
See "Relationships" in Introduction for how to use them.
The list of BadgeTypes supporting the shift (via "shiftbadgetypes").
The list of ShiftBadgeTypes for this shift. These associate a shift with a badge type; these are not the associated Badge Types themselves. Note that these exist only when the shift's Convention has been set to require volunteers to have a badge for the same day that they wish to volunteer.
The list of Volunteers who have applied for the shift (via "volunteershifts").
The list of VolunteerShifts associated with the shift.
The firstname
field in the VolunteerShift's related Volunteer record.
You must include parameter _include_related_objects=volunteer
with the request for this to work.
The lastname
field in the VolunteerShift's related Volunteer record.
You must include parameter _include_related_objects=volunteer
with the request for this to work.
See "Includes" in Introduction for how to use them.
Returns a "1" or a "0" (zero). "1" means the shift has scheduled volunteers, "0" means it has no scheduled volunteers.
Return the Room, if any, associated to the shift via its ShiftType.
Returns the list of volunteers who are scheduled for the shift.
The count of VolunteerShifts associated with the shift with status
"unscheduled" (pending volunteer applications).
The services used to fetch and manipulate shifts.
Searching across all conventions is not enabled. To search within a single convention's shifts, see "Relationships" in Convention.
POST /api/shift
The shift name must be unique within its Convention.
This must be an integer.
The start_time
must be within the time range of the shift's ConventionDay.
The end_time
must be within the time range of the shift's ConventionDay, and must be after the start_time
.
Returns the same as a normal read.
GET /api/shift/xxx
Returns:
{ "id" : "xxx", "name" : "Sunday Morning Shift", ... }
PUT /api/shift/xxx
Returns the same as a normal read.
DELETE /api/shift/xxx
You cannot delete a Shift which has a related VolunteerShift with status
"scheduled".
Returns:
{ "success" : 1 }
POST /api/shift/xxx/add-log-entry
Adds a text line to the shift's log. Requires the user to have volunteers
privilege.
Returns the same as a normal read.
GET /api/shift/xxx/volunteers/not-applied
The list of convention volunteers who have not applied for the shift. This is a convenient way to identify volunteers who could work on the shift, if more are needed.
A search string. Searches in volunteer firstname
, lastname
, email_address
, and phone_number
.
Returns:
{ "paging" : {...}, "items" : [ { "id" : "xxx", "firstname" : "Joe", "lastname" : "Volunteer", ... }, ... ] }
POST /api/shift/xxx/copy
This will create a copy of the shift. The only thing different about the new shift will be the name, which will be the name of the copied shift with "(copy [copy number])" appended.
Returns the copy in the same format as a normal read.