Skip to content

Achievements

  • Mike runs a youth Gymnastics club. His coaches need to record progress against their group members to keep track of their progress. The parents want to check their child’s progress so they feel engaged with the club.

  • Jon runs external Canoeing courses. Various skills need to be demonstrated by participants to pass the course, as well as evidence outside the course demonstrating other skills such as coaching and leading peers on suitable rivers. This information needs to be collated before the qualification can be awarded.

  • Sally leads a group of Accountants in the North East offering training courses in Social Media. She has devised a set of qualifications that she wants to track progress towards.

Achievement types (or templates) are the definition of the qualification. At their most basic they are a name and one or more steps. Each step is a milestone in the achievement.

Achievements are the individual records that connect a contact to their achievement.

Create/start a new achievement for a contact

Section titled “Create/start a new achievement for a contact”
ParameterDescription
achievement_type_refRequired. Reference to the achievement type.
contact_refRequired. Reference to the contact.
POST https://api.sheepcrm.com/api/v1/$FLOCK/achievement/
Authorization: Bearer $API_KEY
Content-Type: application/json
{
"achievement_type_ref": "/example/achievement_type/5fa92cd780859e70b99a5fad/",
"contact_ref": "/example/person/581b6258d406947c8a8f07d4/"
}

By step number:

PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/complete_step/
Authorization: Bearer $API_KEY
Content-Type: application/json
{"number": 3}

By step name:

PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/complete_step/
Authorization: Bearer $API_KEY
Content-Type: application/json
{"step": "Squat on stretch jump off cross box or horse."}

By step number:

PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/uncomplete_step/
Authorization: Bearer $API_KEY
Content-Type: application/json
{"number": 3}

By step name:

PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/uncomplete_step/
Authorization: Bearer $API_KEY
Content-Type: application/json
{"step": "Squat on stretch jump off cross box or horse."}
PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/reset_steps/
Authorization: Bearer $API_KEY
PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/complete_all_steps/
Authorization: Bearer $API_KEY

Once all the steps have been completed, an achievement can be “finished” or “completed”. A finished achievement locks the steps from further changes. A finished achievement creates a sheep event which can be used for sending an achievement email or other data event.

PUT https://api.sheepcrm.com/api/v1/$FLOCK/achievement/{uid}/finish/
Authorization: Bearer $API_KEY