Skip to content

Users

This method will provide user data for most common use-cases.

/api/v1/$FLOCK/user/{uid}/

http https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/ "Authorization: Bearer $APP_API_KEY"

/api/v1/$FLOCK/user/{uid}/person/

http https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/person/ "Authorization: Bearer $APP_API_KEY"

Response will be a redirect to the hosted photo.

/api/v1/$FLOCK/user/{uid}/photo/

http https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/photo/ "Authorization: Bearer $APP_API_KEY"
HTTP/1.1 302 Found
...

/api/v1/$FLOCK/user/{uid}/files/

ParameterRequiredDescription
upload_fileYesSupported file types: doc, docx, gif, jpg, jpeg, md, mov, mp3, odt, odp, ods, pdf, png, ppt, pptx, rst, tif, tiff, txt, xls, xlsx, wav. Maximum file size: 50MB
typeNoType of journal to store; default user_file
subtypeNoSubtype of journal to store; default user_file
titleNoTitle of the file
commentNoComment to go with the file
http -f POST https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/files/ "upload_file@test.pdf" title="My File upload" comment="only a test" "Authorization: Bearer $APP_API_TOKEN"
HTTP/1.0 200 OK
{
"file": "https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/****/files/test.pdf",
"journal": {
"body": null,
"context": {
"display_value": "James W Webster",
"ref": "/sheep-app/person/******/"
},
"creator": "SheepApp",
"creator_reference": null,
"date": "2020-07-01T09:02:22.067000",
"entity": {
"display_value": "{uid}",
"ref": "/sheep-app/useraccount/***/"
},
"entry_subtype": "user_file",
"entry_type": "user_file",
"files": [
null,
"https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/****/files/test.pdf"
],
"legacy_uid": null,
"link": null,
"star": false,
"tags": [
"attachment"
],
"text_body": "only a test",
"title": "My File upload",
"trigger_resource_ref": null
},
"journal_ref": "/sheep-app/journal/****/"
}
ParameterRequiredDescription
typeNoFilter by type of journal
subtypeNoFilter by subtype of journal
http GET https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/files/ "Authorization: Bearer $APP_API_TOKEN"
{
"files": [
{
"creator": "SheepApp",
"date": "2020-07-01T10:38:21.212000",
"display_value": "My File upload",
"entry_subtype": "user_file",
"entry_type": "user_file",
"file": "https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/***/files/test.pdf",
"files": [
"https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/***/files/test.pdf"
],
"status": "updated",
"text_body": "only a test",
"title": "My File upload",
"uid": "sheep-app-journal-***"
}
]
}
http GET https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/files/{file_uid}/ "Authorization: Bearer $APP_API_TOKEN"
{
"creator": "SheepApp",
"date": "2020-06-30T19:00:53.935000",
"display_value": "File uploaded: test.pdf",
"entry_subtype": "user_file",
"entry_type": "user_file",
"file": "https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/*****/files/test.pdf",
"files": [
"https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/*****/files/test.pdf"
],
"status": "updated",
"text_body": "User uploaded file",
"title": "File uploaded: test.pdf",
"uid": "sheep-app-journal-*****"
}
http DELETE https://api.sheepcrm.com/api/v1/$FLOCK/user/{uid}/files/{file_uid}/ "Authorization: Bearer $APP_API_TOKEN"
{
"https://s3-eu-west-1.amazonaws.com/sheepcrm/sheep-app/journal/********/files/pdfshift-test.pdf": "deleted",
"journal_uri": "deleted"
}