POST database/people/search
(Difference between revisions)
(→Response Body) |
|||
Line 61: | Line 61: | ||
|- | |- | ||
! align="left" width="200px" | results | ! align="left" width="200px" | results | ||
− | | array with contact details. | + | | array with contact details. See [[Social Profile Fields]] for the complete list of returned fields. |
|} | |} | ||
Revision as of 22:08, 12 November 2014
Contents |
Description
This API allows searching for contacts in the Marketing Database.
See search fields page for further details on query specification.
Resource URL
POST https://api.socialidnow.com/v1/marketing/database/people/search
Parameters
JSON Parameters
filters | required | SQL-like logical expression to specify search filters. |
---|---|---|
limit | optional | maximum amount of results to be returned (page size). Default: 128. |
offset | optional | amount of results to be discarded (page start). Default: 0. |
Authentication
This API requires Marketing Account authentication. See Authentication.
Response
Response Status
ok (200) | The search was performed successfully. |
---|---|
unauthorized (401) | The authentication is wrong. See Authentication. |
internal_server_error (500) | An unknown error happened. |
Response Body
A successful search returns the following fields:
total | total amount of contacts found in the Marketing Database for the given query. |
---|---|
count | amount of contacts returned for this request. |
offset | amount of contacts discarded (page start). |
results | array with contact details. See Social Profile Fields for the complete list of returned fields. |
Examples
Request
Search for users named "Guilherme".
curl -X POST "https://api.socialidnow.com/v1/marketing/database/people/search" \ --data "{\"filters\": \"profile.name.given_name = 'Guilherme'\"}" \ -H "Content-type: application/json" \ --user <api_id>:<api_secret>
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 13, "count": 13, "offset": 0, "results": [...] }