Search¶
“Global” search¶
Global search is a search that is performed on all the primary data types (Contacts, Events & Vehicles)
- q
the search string
http https://sls-api.sheepcrm.com/search/v2/example/ "Authorization: Bearer $API_KEY" q=="webster"
HTTP/1.1 200 OK
{
"q": "webster",
"results": [
{
"display_value": "Bob Webster",
"distance": 78,
"id": "/example/person/5cc97b9d8b38806b28cd35b6/",
"primary_email": "bob@example.com",
"primary_telephone": null,
"resource": "person"
},
{
"display_value": "Theo Webster",
"distance": 74,
"id": "/example/person/56dddf607e6ca15f518356cd/",
"primary_email": "theo@example.com",
"primary_telephone": null,
"resource": "person"
},
...
]
}
Help search¶
Quickly search for help on a specific topic. Note this API queries Intercom so there can be a noticeable delay.
- q
the search string
http https://sls-api.sheepcrm.com/search/v2/example/help "Authorization: Bearer $API_KEY" q=="automatic emails"
HTTP/1.1 200 OK
{
"docs": 169,
"q": "automatic emails",
"results": [
{
"link": "https://intercom.help/sheepcrm/en/articles/6161297-settings-configuring-integrations-with-sheepcrm",
"title": "Settings: Configuring integrations with sheepCRM"
},
{
"link": "https://intercom.help/sheepcrm/en/articles/1839428-what-s-new-in-sheep",
"title": "What's new in Sheep?"
},
...
{
"link": "https://intercom.help/sheepcrm/en/articles/6044420-teams-managing-a-team",
"title": "Teams: Managing a team"
}
]
}
Finding a person¶
The full person record is returned for a person that matches the search parameters.
- title
person’s title e.g. Miss
- first_name
person’s first name e.g. Jane
- last_name
person’s last name e.g. Doe
person’s email address e.g. jane@example.com
- date_of_birth
person’s date of birth e.g. 1980-01-31 (ISO 8601)
- postal_code
person’s postal code e.g. SW1A 1AA
- take_first_if_multiple
whether to return the first result if multiple results are found e.g. true or default: false (if multiple results are found, an error is returned)
http https://sls-api.sheepcrm.com/search/v2/example/person "Authorization: Bearer $API_KEY" email==theo@james-webster.co.uk
HTTP/1.1 200 OK
{
"_id": null,
"bucket": "example",
"created": "2016-03-07T20:06:56.880000",
"data": {
"abilities": [],
"address_lines": [
null
],
"adult": null,
...
"xero_last_sync": null,
"xero_uid": null
},
"display_value": "Theo Webster",
"id": "56dddf607e6ca15f518356cd",
"last_updated": "2022-02-15T20:51:10.777000",
"resource": "person",
"state": "updated",
"uri": "/example/person/56dddf607e6ca15f518356cd/"
}
Find a car¶
optional search terms
- registration_number
car registration number e.g. AB12 CDE
- engine_number
the engine number
- identifying_number
identifying number VIN or chassis number in older vehicles
http https://sls-api.sheepcrm.com/search/v2/example/car "Authorization: Bearer $API_KEY" registration_number==EK11ORP
HTTP/1.1 200 OK
{
"dvla": {
"capacity": 1242,
"co2_emissions": 113,
"colour": "WHITE",
"date_of_last_v5c_issued": "2020-11-03",
"fuel_type": "PETROL",
"make": "FIAT",
"marked_for_export": false,
"month_of_first_registration": "2011-04",
"mot_date": "2023-10-11",
"mot_status": "Valid",
"registration_number": "EK11ORP",
"tax_due_date": "2023-11-01",
"tax_status": "Taxed",
"type_approval": "M1",
"wheel_plan": "2 AXLE RIGID BODY",
"year": 2011
}
}