Skip to content

sheepTeams

Teams (also known as Groups, Regions, or Applications). The Teams system was originally built for volunteer applications to teams but has been re-used in many different ways. At the heart of the system is the concept of a Team which people can join and leave.

TermsheepCRM Resource
Teamgroup — team / group / region / area of expertise
Team membergroup_member — member of the team, applicant
StatusDescription
acceptedAccepted / member / finished / joined.
followerPre-application / interested / follower.
startedApplication started but not yet completed.
appliedApplication submitted (but not accepted).
ready-for-referencesReferences can now be requested.
checkingE.g. out for reference checking.
references-receivedReferences are back and ready to be checked.
rejectedRejected by team leaders.
waitingAccepted, waiting to join when space permits.
cancelledApplication cancelled by user.
no-showApplicant failed to attend.
flaggedApplication has an issue/problem, needs human judgement.

Teams root showing all flocks that a user can access:

GET https://api.sheepcrm.com/api/v1/teams/
Authorization: Bearer $API_KEY
HTTP/1.1 200 OK
{
"bearer_token": "***",
"first_name": "Support",
"flocks": [
"example",
"example-association",
"example-family"
],
"last_login": "2020-02-21T14:18:55",
"last_name": "User"
}

The large config data packet available for building a client application:

GET https://api.sheepcrm.com/api/v1/teams/$FLOCK/
Authorization: Bearer $API_KEY
HTTP/1.1 200 OK
{
"bearer_token": "***",
"config": {
"address_lines": ["1 Pretend Street", "Pretendsville", "Utah"],
"availableOptions": ["giving", "consent", "membership", "events", "venues", "payments"],
"flockNamePublic": "My Community Trust",
"flockNamePublicShort": "MCT",
"email": "fake@example.com",
"membership": {
"allowMultiple": true,
"enabled": true,
"paymentOptions": ["payLater", "stripe"]
},
"palette": {
"featureColor": "#f65161",
"headerFont": "'Raleway', sans-serif",
"mainColor": "#f65161",
"mainFont": "'Open Sans', sans-serif"
},
"phone": "01234 567 890",
"website": "https://www.sheepcrm.com/"
},
"first_name": "Support",
"flocks": ["example", "example-association", "example-family"],
"is_staff": true,
"last_login": "2020-02-21T14:18:55",
"last_name": "User"
}
GET https://api.sheepcrm.com/api/v2/teams/$FLOCK/teams/
Authorization: Bearer $API_KEY
HTTP/1.1 200 OK
{
"grand_total": 11,
"results": [
{
"bucket": "...",
"created": "2019-07-01T15:29:06.413000",
"data": {
"accepted": 1,
"active": true,
"category": "category",
"description": null,
"invite_only": false,
"name": "name",
"total_applicants": 1,
"uri": "/.../group/5d1a26c2461a181aadaa9b15/"
},
"display_value": "name",
"resource": "group",
"state": "updated",
"uri": "/.../group/5d1a26c2461a181aadaa9b15/"
}
],
"total": 11
}

The {leader-slugified-uri} is the person URI of the leader, slugified (e.g. /example/person/1234/ becomes example-person-1234):

GET https://api.sheepcrm.com/api/v2/teams/$FLOCK/{leader-slugified-uri}
Authorization: Bearer $API_KEY

The response format is the same as listing all active teams.

Full team data including a list of members with basic profile data. The team UID is a slugified version of the group URI, e.g. example-group-5c055088d406945a79dab6d8:

GET https://api.sheepcrm.com/api/v1/teams/$FLOCK/{team-uid}/
Authorization: Bearer $API_KEY
HTTP/1.1 200 OK
{
"active": true,
"category": "primary",
"description": "This group is an example...",
"entry_requirements": "There are no specific requirements for this team",
"invite_only": false,
"leaders": [],
"members": [
{
"email": "britt@home.com",
"first_name": "Britt",
"last_name": "Abernathy",
"group": "/example/group/5c055088d406945a79dab6d8/",
"membership_status": "cancelled",
"person": "/example/person/54aaf7ad3078f80d90d8ca11/",
"person_name": "Britt Abernathy",
"role": "Group Admin",
"status": "applied",
"uri": "/example/group_member/5d8dffc10b915a588aa79f57/"
}
],
"name": "Example Group 1",
"total_volunteer_days": 0
}
ParameterDescription
{team-slugified-uri}The team URI, slugified (e.g. /example/group/1234/ becomes example-group-1234).
{booking_id}The ID of the booking (e.g. /example/booking/1234/ becomes 1234).
expansionsOptional control param for more/less data. See below.

Expansion options:

  • profile — Add profile data (recommended).
  • application_questions — Include application questions and answers.
  • consolidated_questions — Use with application_questions to consolidate questions and answers across multiple applications.
  • -team_memberships — Remove team membership data.

List all team members and their attendance

Section titled “List all team members and their attendance”
GET https://api.sheepcrm.com/api/v2/teams/$FLOCK/team/{team-slugified-uri}/attendance/{booking_id}/?expansions=profile
Authorization: Bearer $API_KEY

Update / Set the attendance for a team member

Section titled “Update / Set the attendance for a team member”
ParameterDescription
person_refThe URI of the person / team member / attendee.
attendance_statusValid values: invited, accepted, declined, attended, no-show.
PUT https://api.sheepcrm.com/api/v2/teams/$FLOCK/team/{team-slugified-uri}/attendance/{booking_id}/
Authorization: Bearer $API_KEY
Content-Type: application/json
{
"person_ref": "/example/person/1234",
"attendance_status": "attended"
}

Open tasks:

GET https://sls-api.sheepcrm.com/api/v2/$FLOCK/group/{uid}/tasks
Authorization: Bearer $API_KEY

All tasks (open and closed):

GET https://sls-api.sheepcrm.com/api/v2/$FLOCK/group/{uid}/tasks/all
Authorization: Bearer $API_KEY