Contacts
Find a Person
Section titled “Find a Person”| Parameter | Description |
|---|---|
title | Optional. Title of the person e.g. Dr, Ms, Mrs. Case sensitive. |
first_name | Optional. Case sensitive. |
last_name | Optional. Case sensitive. |
email | Optional. Valid email address, case insensitive. |
date_of_birth | Optional. Any reasonable date format but YYYY-MM-DD recommended. |
postal_code | Optional. Postcode / zip code, case sensitive. |
take_first_if_multiple | Optional. If multiple matches are returned, take the first (order undefined). |
Matching rules:
- By email
- By first name, last name and date of birth
- By first name, last name and postcode
- By title, last name and postcode
GET https://api.sheepcrm.com/api/v1/$FLOCK/find/person/?email=james@example.comAuthorization: Bearer $API_KEYGET https://api.sheepcrm.com/api/v1/$FLOCK/find/person/?first_name=James&last_name=Webster&postal_code=NR28+8FLAuthorization: Bearer $API_KEYFind an Organisation
Section titled “Find an Organisation”| Parameter | Description |
|---|---|
name | Optional. Case sensitive. |
email | Optional. Valid email address, case insensitive. |
postal_code | Optional. Postcode / zip code, case sensitive. |
domain | Optional. Website domain (no http etc). |
take_first_if_multiple | Optional. If multiple matches are returned, take the first (order undefined). |
Matching rules:
- By name and postcode
- By exact name
- By email
- By domain
GET https://api.sheepcrm.com/api/v1/$FLOCK/find/organisation/?name=Authentic+Digital+LtdAuthorization: Bearer $API_KEYSummary Profile Data
Section titled “Summary Profile Data”Policy: person.summary / organisation.summary
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/summaryAuthorization: Bearer $API_KEYPersonal Details for a Person
Section titled “Personal Details for a Person”Policy: person.personal
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/person/{uid}/personal/detailAuthorization: Bearer $API_KEYCommunications for a Person
Section titled “Communications for a Person”Returns profile data about the contact concerning how to communicate with them (email, postal address, etc).
Policy: person.communications
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/person/{uid}/communications/detailAuthorization: Bearer $API_KEYBadges
Section titled “Badges”Policy: badge.summary
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/badges/summaryAuthorization: Bearer $API_KEYPolicy: badge.detail
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/badges/detailAuthorization: Bearer $API_KEYEvidence Records
Section titled “Evidence Records”Policy: evidence.summary
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/evidence/summaryAuthorization: Bearer $API_KEYPolicy: evidence.detail
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/evidence/detailAuthorization: Bearer $API_KEYPrivacy / GDPR
Section titled “Privacy / GDPR”Policy: gdpr
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/gdpr/allAuthorization: Bearer $API_KEY
HTTP/1.1 200 OK{ "consents": [], "contact_uri": "/{bucket}/{organisation|person}/{uid}/", "contract": [], "legitimate_interests": []}Membership
Section titled “Membership”Policy: membership
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/membership/summaryAuthorization: Bearer $API_KEYPolicy: membership.all
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/membership/allAuthorization: Bearer $API_KEYConnections
Section titled “Connections”Get all connections for a contact
Section titled “Get all connections for a contact”| Parameter | Description |
|---|---|
limit | Return first N connections. |
connection_type | Return only connections of a specified type. |
hidden | Include hidden connections (Y/N). Hidden connections are not included by default. |
GET https://api.sheepcrm.com/api/v1/$FLOCK/connections/?uri={UID}Authorization: Bearer $API_KEY
HTTP/1.0 200 OK{ "connections": [ { "automatic": null, "bidirectional": null, "connection_note": null, "connection_type": null, "destination": "/example/person/5aafb4de0490573922b9da91/", "end_date": null, "hidden": false, "label": "contact", "sort_order": 1000, "source": "/example/organisation/5a57701704905781f28622ac/", "start_date": "2019-08-20T12:30:42.523000" } ]}Adding connections to a contact
Section titled “Adding connections to a contact”| Parameter | Description |
|---|---|
source | Required. The “from” or source of the connection. |
destination | Required. The “to” or destination of the connection. |
label | Recommended. A descriptive label for the connection. |
connection_note | Optional. Free text note to explain the connection or record background information. |
start_date | Optional. Start date for the connection. |
end_date | Optional. End date for the connection. |
bidirectional | Optional. Create a 2nd connection with the source and destination swapped (default is False). |
POST https://api.sheepcrm.com/api/v1/$FLOCK/connections/Authorization: Bearer $API_KEYContent-Type: application/json
{ "source": "/example/organisation/5fa523e480859e33dc285c86/", "destination": "/example/person/5c02fb8b601d090e125020de/", "label": "friends"}
HTTP/1.0 200 OK{ "connection_obj": null, "connection_uri": "/example/connection/61800b989d13abcb30ba91e4/", "status": "created"}Retrieve form responses for a single contact.
Policy: form.summary
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/form/summaryAuthorization: Bearer $API_KEYPolicy: form.detail
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/form/detailAuthorization: Bearer $API_KEYInvoices
Section titled “Invoices”Retrieve invoices for a single contact.
Policy: quote.summary
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/invoices/summaryAuthorization: Bearer $API_KEYPolicy: quote.detail
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/invoices/detailAuthorization: Bearer $API_KEYFinding Duplicates
Section titled “Finding Duplicates”Duplicate records represent data quality degradation, and when health and emergency contact information is involved, duplicate records can be a serious problem. This API call looks across a range of fields for similar records and suggests them for a human to decide if a merge is required.
| Parameter | Description |
|---|---|
limit | Optional. Maximum number of results returned. Default is 20. |
threshold | Optional. Minimum match score. Default is zero. |
GET https://sls-api.sheepcrm.com/api/v2/{bucket}/{organisation|person}/{uid}/duplicates/Authorization: Bearer $API_KEY
HTTP/1.1 200 OK{ "duplicates": [ { "display_value": "Mr David Example", "notes": [ "match on first_name (david -> david) +10", "match on last_name (example -> example) +10", "match on locality (sheffield -> sheffield) +15", "match on region (southyorkshire -> southyorkshire) +10", "match on primary_telephone (07701473459 -> 07701473459) +40", "match on postal_code (s791fx -> s791fx) +25" ], "similarity": 110, "summary": "based on primary telephone", "uri": "/example/person/5967467f0490573d302b44f4/" } ]}Merging Duplicates
Section titled “Merging Duplicates”When two records have been identified as duplicates they can be queued for merging. Fields and linked records associated with the duplicate will be merged into the original record. Field merging uses an “under-write” policy: if the field is missing on the original it is added, if it is present on the original the field is not changed. A journal entry will be added to the original record listing the fields and linked records which have been modified. If the merge is successful the duplicate record will be deleted.
PUT https://api.sheepcrm.com/api/v1/{bucket}/{organisation|person}/merge/{duplicate_uid}/into/{original_uid}Authorization: Bearer $API_KEY
HTTP/1.1 200 OK{ "message": "Dupe queued"}