Skip to content

Schemas

The schemas used by sheepCRM describe the fields and values supported by each resource type. Each type of data in Sheep has a resource_type (e.g. person, member, payment). Each resource type has a schema which describes the fields and values that are supported.

Key terms:

TermDescription
enumThe values for this field must match an item from the list.
loose_enumThe items in the list are suggested values; other values can be submitted.
GET https://api.sheepcrm.com/api/v1/{flock}/{resource_type}/schema/
Authorization: Bearer $API_KEY

The self-service settings have a section for editing the JSON settings. The schema field can be used to overload the core schema data. Note only enum/loose_enum updates are currently supported. You cannot create a new field or change an existing field name.

{
"schema": {
"organisation": {
"fields": {
"primary_service_offered": {
"loose_enum": [
"Dog Grooming",
"Cat Grooming",
"Dog Walking",
"Cat Walking",
"Cattery",
"Other"
]
},
"services_offered": {
"loose_enum": [
"Dog Grooming",
"Cat Grooming",
"Dog Walking",
"Cat Walking",
"Cattery"
]
},
"industry": {
"loose_enum": [
"Pets",
"Not pets"
]
},
"source": {
"loose_enum": [
"Facebook",
"Instagram"
]
}
}
},
"booking": {
"layout_requirements": {
"loose_enum": [
"Layout for dogs",
"Layout for cats"
]
}
}
}
}

The example above shows a configuration for a pet company. They are interested in tracking a primary service (a single field) and also a list field to capture all other services offered. They only need to capture whether the contact is within the pet industry or not. The booking section is included to show how multiple schemas can be configured.

The following sections document the fields available on each resource type in sheepCRM. Each table shows the field name, data type, whether it is a collection (e.g. list), allowed values, applicable security policies, and any additional notes.

For each resource type, use the schema endpoint above to retrieve the current live schema for your flock.

FieldTypeCollectionValuesPoliciesNotes
achievement_type_refreferenceachievement_typedetail, summary
contact_refreferenceperson, organisationdetail, summary
stepsdictdetail
start_datetimedatedetail, summary
completed_datetimedatedetail, summary
expiredbooleandetail, summary
finishedbooleandetail, summary
coach_refreferencepersondetail, summary
FieldTypeCollectionValuesPoliciesNotes
namestring
categorystring
sort_ordernumber
activeboolean
descriptionstring
stepsstringlist
images3image
iconstring
icon_colourstring
experience_requiredstring
objectivestring
linkstring
FieldTypeCollectionValuesPoliciesNotes
legacy_uidstring
bulk_actionboolean
namestring
triggerstring
actionstringadd_tag, change-status, debug, draft-templated-email, join-group, raise-authorised-xero-invoice, raise-draft-xero-invoice, raise-submitted-xero-invoice, remove_tag, send-email-to-fixed-address, send-json-webhook, send-templated-email, send-templated-email-request-acknowledgement, send-templated-in-app-message, send-templated-in-app-message-request-acknowledgement, send-templated-sms, send-webhook, set-single-field, set-single-field-on-last-membership
templatestring
urlstring
tagstring
activeboolean
commentstring
conditional_templatedict
fieldstring
valuestring
scopestring