System

Health Check

http https://api.sheepcrm.com/api/v1/health/

HTTP/1.1 200 OK

{
    "message": "ok"
}

Worker Queues (Internal use only)

Super users only

http https://api.sheepcrm.com/api/v1/queues/
HTTP/1.1 200 OK

UPDATE NEEDED 'sheepapi.system.queues'

{
    "queue1": 0,
"queue2": 0
}

Validate an email address

The validate_email python package checks if the host has SMTP Server and the email really exists.

http https://api.sheepcrm.com/api/v1/validate/email/ email==james@sheepcrm.com
HTTP/1.1 200 OK

{
    "email": "james@sheepcrm.com",
    "valid": true
}

http https://api.sheepcrm.com/api/v1/validate/email/ email==james@example.com
HTTP/1.1 200 OK

{
    "email": "james@example.com",
    "valid": false
}

Group by and Count

Group any resource_type by any field. (All field permutations are returned - data packet may be large!)

http https://sls-api.sheepcrm.com/api/v2/{flock}/groupby/{resource_type}/{field}/count/ "Authorization: Bearer $API_KEY"
HTTP/1.1 200 OK

{
    "results": [
        {
            "count": 2,
            "value": "New York"
        },
        {
            "count": 1,
            "value": "Pretendsville"
        },
        ...
}

Data lookups

Data lookups are designed to drive auto-complete form elements.

q

search term

callback

provide a callback to get the results as jsonp

Not all lookups require a flock param or authentication. Public datasets are timezones, connection_types and taxonomy (taxonomy requires a subtype of genera or families)

GDPR Purposes

channel

optional - filter by channel

http https://sls-api.sheepcrm.com/api/v2/{flock}/system/gdpr_purpose "Authorization: Bearer $API_KEY"
HTTP/1.1 200 OK

{
    "purposes": [
        {
            "channel": "process, email & post",
            "legal": "legitimate interests",
            "legal_purpose": "legitimate interests: to process, manage and communicate with you about your forms.",
            "purpose": "to process, manage and communicate with you about your forms."
        },
        {
            "channel": "process, email & post",
            "legal": "legitimate interests",
            "legal_purpose": "legitimate interests: to process, manage and communicate with you about your groups.",
            "purpose": "to process, manage and communicate with you about your groups."
        },
        {
            "channel": "process, email & post",
            "legal": "legitimate interests",
            "legal_purpose": "legitimate interests: to process, manage and communicate with you about your membership.",
            "purpose": "to process, manage and communicate with you about your membership."
        },
        {
            "channel": "process, email & post",
            "legal": "legitimate interests",
            "legal_purpose": "legitimate interests: to process, manage and communicate with you about your tickets.",
            "purpose": "to process, manage and communicate with you about your tickets."
        }
    ]
}
$ http https://sls-api.sheepcrm.com/api/v2/$FLOCK/lookup/{data_type}/ "Authorization: Bearer $API_KEY"

$ http https://sls-api.sheepcrm.com/api/v2/$FLOCK/lookup/{data_type}/ q==abc "Authorization: Bearer $API_KEY"

$ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/{data_type}/{field}/ "Authorization: Bearer $API_KEY"

$ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/{data_type}/{field}/ q==abc "Authorization: Bearer $API_KEY"

$ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/

$ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/ q==abc

$ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/{subtype}/

$ http https://api.sheepcrm.com/api/v1/lookup/{data_type}/{subtype}/ q==abc


$ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/badge/name/ q==a "Authorization: Bearer $API_KEY"

[
    {
        "id": "Magazine",
        "text": "Magazine"
    },
    {
        "id": "attendance",
        "text": "attendance"
    },
    {
        "id": "self_service_useraccount",
        "text": "self_service_useraccount"
    },
    {
        "id": "useraccount",
        "text": "useraccount"
    }
]

$ http https://api.sheepcrm.com/api/v1/$FLOCK/lookup/badge/name/ q==a callback==abc "Authorization: Bearer $API_KEY"

HTTP/1.1 200 OK
Content-Type: application/jsonp

abc([{"text": "Magazine", "id": "Magazine"}, {"text": "attendance", "id": "attendance"}, {"text": "self_service_useraccount", "id": "self_service_useraccount"}, {"text": "useraccount", "id": "useraccount"}])