Privacy / GDPR
Hosted privacy data
Section titled “Hosted privacy data”/api/v1/$FLOCK/user/hosted/privacy/
The hosted privacy call provides all the data needed to build a privacy page.
http GET https://api.sheepcrm.com/api/v1/$FLOCK/user/hosted/privacy/
HTTP/1.1 200 OK{ "address_lines": [ "1 Pretend Street", "Pretendsville", "Utah" ], "consent_list": [ { "channels": [ "email" ], "cid": "c000", "context": "What's On Newsletter", "purpose": "Live Programme Newsletter" }, { "channels": [ "email", "phone", "post" ], "cid": "c001", "context": "Bothering phonecalls and letters", "purpose": "To bother you" } ], "email": "fake@example.com", "flock": "example", "flockNamePublic": "My Community Trust", "flockNamePublicShort": "MCT", "how_to_contact_us_intro": "...", "how_we_collect": [ "you send us an email", "you sign up as a member", "you make a donation", "you volunteer", "you sign up to a mailing list online" ], "how_we_collect_intro": "We collect personal information directly from you when:", "name_in_logo": false, "other_questions_contact": "...", "palette": {}, "phone": "01234 567 890", "privacy_intro": "...", "website": "https://www.sheepcrm.com/", "what_we_collect": ["..."], "what_we_collect_intro": "We collect the following information:", "why_we_collect": ["..."], "why_we_collect_intro": "We use your personal data for the following purposes:"}Fresh consent
Section titled “Fresh consent”/api/v1/$FLOCK/user/consent/
POST a public fresh consent submission (person + consent data). Sheep will find or create the contact and add the consent records.
Payload fields for finding or creating a person:
| Field | Required | Description |
|---|---|---|
| title | No | Person’s title |
| first_name | No | Person’s first name |
| last_name | No | Person’s last name |
| date_of_birth | No | Person’s date of birth |
| Yes | Person’s email address | |
| postal_code | No | Person’s postal code |
Consent fields:
Consents to set are each represented by a separate composite field e.g. consent__c001__post. The field name has three parts separated by double underscores __:
consent(always)- The consent ID (e.g.
c001) - The consent channel (e.g.
email,sms,post)
The value should be set to True. Do not include consents which have not been granted, and do not try withdrawing consent with a False value.
http POST https://api.sheepcrm.com/api/v1/$FLOCK/user/consent/ first_name=Jim last_name=Lovell email=jim@nasa.gov consent__c001__post=True
HTTP/1.1 201 CREATED{ "consent_added": [ { "channel": "post", "context": "I provide consent for Example to process my data to send me electronic newsletters.", "context_url": "Unknown", "date": "2020-02-25T07:31:44.068904", "purpose": "newsletter", "reference": "/example/person/5e44020149c3a85acee1ff9b/", "source": "Sheep App", "source_reference": "fresh consent form" } ], "errors": {}, "updates": { "email": [ "jim@nasa.gov" ], "first_name": "Jim", "last_name": "Lovell" }}Consents for a user
Section titled “Consents for a user”/api/v1/$FLOCK/user/{uid}/consent/
User authentication required. Get or update consents associated with the user account.
Withdraw consent
Section titled “Withdraw consent”/$FLOCK/user/{uid}/consent/{consent_uid}/withdraw/
User authentication required. PUT to withdraw a consent.