Get multiple profiles action history
Description
Retrieves multiple profiles action history.
Request URL
Method: POST
https://example.com/api/v1.1/subscribers/history_get_all
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
format | string | "json" | No | Response data format. By default – json |
list_id | int | 20 | Yes | Database ID |
from_id | string | "005a06ded879ecd7.20170406" | No | The first profile in response (xxhash) |
limit | int | 300 | No | Response profiles array limit By default - 1000 |
date_from | string | "2016-11-25" | Yes | Time period start YYYY-MM-DD |
date_to | string | "2016-11-29" | Yes | Time period end YYYY-MM-DD |
fields | string array | ["CustomID"] | No | Returns a field ( fields ) with profile data from the listed fields in the response. For CSV format, it will be represented as a JSON string. |
Request example
{
"date_from": "2017-01-01",
"date_to": "2018-01-10",
"format": "json",
"from_id": "0000000000000000.20010101",
"fields": ["CustomNumber", "CustomEnum"],
"limit": 2,
"list_id": 20,
"token": "abcdefghijklmnqrstuvwxyz"
}
Response example
{
"data": [
{
"xxh": "0000183c20737b7e",
"profile_id": "5c94fbc103e42237764042ef",
"email": "mitzi.jpa2yj@example.com",
"list_id": 1,
"action": "web_version_save",
"count": 1,
"datetime": "2020-01-24T10:30:42Z",
"message_id": 31,
"campaign_id": 180,
"subscriptions": [
{
"resource_id": 1,
"channel": "email",
"email": "mitzi.jpa2yj@example.com",
"priority": 0,
"status": "subscribed"
},
{
"resource_id": 2,
"channel": "email",
"email": "mitzi.jpa2yj@example.com",
"priority": 0,
"status": "subscribed"
}
],
"fields": {
"CustomEnum": 1,
"CustomNumber": 1000000537
}
},
{
"xxh": "0000183c20737b7e",
"profile_id": "5c94fbc103e42237764042ef",
"email": "mitzi.jpa2yj@example.com",
"list_id": 1,
"action": "web_version_save",
"count": 1,
"datetime": "2020-01-24T10:41:27Z",
"message_id": 31,
"campaign_id": 183,
"subscriptions": [
{
"resource_id": 1,
"channel": "email",
"email": "mitzi.jpa2yj@example.com",
"priority": 0,
"status": "subscribed"
},
{
"resource_id": 2,
"channel": "email",
"email": "mitzi.jpa2yj@example.com",
"priority": 0,
"status": "subscribed",
"custom_fields": {
"_browser_name": "Firefox",
"_device_type": "web",
"custom_field_1": "test value"
},
"cats": [
"category_1",
"category_2"
]
}
],
"fields": {
"CustomEnum": 1,
"CustomNumber": 1000000537
}
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": "0000183c20737b7e.20200124164531"
}
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
data.action | string | Profile action (Learn more) |
data.count | int | Number of actions taken in this second |
data.datetime | string | Date and time of the action |
data.email | string | Profile email |
data.profile_id | string | Profile ID |
data.subscriptions | Array of objects | All profile subscriptions. For the CSV format, it will be presented as a JSON string. |
data.fields | Object | Additional profile fields specified in the fields parameter of the request. For the CSV format, it will be presented as a JSON string. |
data.list_id (db_id) | int | Database ID |
data.message_id | int | Message template ID |
data.xxh | string | Profile xxhash ID |
next_from_id | string | The first profile in the next batch of the database |