Get data for multiple profiles
Description
Gets data for multiple profiles in the database.
Request URL
Method: POST
https://example.com/api/v1.1/profiles/list
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format By default – json |
db_id | int | 20 | Yes | Database ID |
from_id | string | "0014a2feb331ace2.20200124134127" | No | The pointer to the next page, taken from the previous request, or passed empty for the first one. |
limit | int | 3 | No | Limit on the number of entries. Default - 1000 |
query | JSON обект | "query":{ | No | Refinement of the search for profiles by parameters in the form of a query to the database in JSON format. The request is formed according to the MongoDB documentation. To get a list of fields in the database, use the "Get database fields" request. |
fields | Array of string | "fields": [ | No | Contains fields for filtering the displayed profile data. |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"from_id": "65117f62736a0e15d273fae9",
"limit": 1,
"query": {
"$or": [
{
"_lname": "Doe"
},
{
"_city": "Moscow"
}
]
},
"fields": [
"_id",
"_lname",
"_fname",
"_city",
"subscriptions"
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<db_id>1</db_id>
<from_id>65117f62736a0e15d273fae9</from_id>>
<limit>1</limit>
<fields>_id</fields>
<fields>_lname</fields>
<fields>_fname</fields>
<fields>_city</fields>
<fields>subscriptions</fields>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"_city": "Moscow",
"_fname": "Anna",
"_lname": "Murphy",
"id": "65117f62736a0e15d273faee",
"subscriptions": [
{
"resource_id": 5,
"channel": "email",
"email_data": {
"email": "example@example.edu",
"domain": "example.edu",
"domain_group": "other",
"md5": "7dbeb0466131e377e58988a97196d18e"
},
"priority": 0,
"status": "unsubscribed",
"reg_info": {
"date": "2024-01-09T12:12:18.172Z"
},
"hash_id": "e70dbabe",
"is_delete": false
},
{
"resource_id": 26,
"channel": "push",
"push_data": {
"subscription_id": "abcdefghijklmnqrstuvwxyz",
"provider": "Firefox"
},
"priority": 0,
"status": "subscribed",
"reg_info": {
"date": "2024-04-18T12:30:44.592Z"
},
"hash_id": "e70dbabe",
"is_delete": false
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": "65117f62736a0e15d273faf4"
}
<xml>
<data>
<_city>Toronto</_city>
<_fname>Juan</_fname>
<_lname>Wallace</_lname>
<id>65117f62736a0e15d273fae9</id>
<subscriptions>
<channel>email</channel>
<email_data>
<domain>example.com</domain>
<domain_group>other</domain_group>
<email>example@example.com</email>
<md5>18450b1edfef75279fc4f4f60c78d97e</md5>
</email_data>
<hash_id>a0cc2672</hash_id>
<is_delete>false</is_delete>
<priority>0</priority>
<reg_info>
<date>2024-01-09T12:12:18.172Z</date>
</reg_info>
<resource_id>5</resource_id>
<status>hardbounced</status>
</subscriptions>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<next_from_id>65117f62736a0e15d273faea</next_from_id>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
next_from_id | string | The value must be passed in the next request to get another piece of data until the result output contains 0 history lines. |
data | Array of objects | Array of received data on profiles |