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
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"list_id": 4,
"limit": 3,
"date_from": "2024-07-15",
"date_to": "2024-10-09",
"format": "json",
"from_id": "",
"fields": [
"CustomNumber",
"CustomEnum"
]
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<list_id>4</list_id>
<limit>3</limit>
<date_from>2024-07-15</date_from>
<date_to>2024-10-09</date_to>
<format>xml</format>
<from_id></from_id>
<fields>CustomNumber</fields>
<fields>CustomEnum</fields>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"xxh": "9202595093f237d4",
"profile_id": "66f66973096b3b454bbbccec",
"email": "example@example.com",
"list_id": 66,
"action": "send",
"count": 1,
"datetime": "2024-09-27T15:52:57.004Z",
"message_id": 5,
"campaign_id": 137,
"event_id": "66f6aaa9da00a9db1c0b2683",
"smid": "uBAhiRBRQhARg7y489hr5F2b2aXMJaztFS7vM7DE1NGJhZWM5",
"campaign_name": "New astral campaign",
"message_name": "testing",
"subscription": {
"resource_id": 5,
"resource_name": "res1",
"channel": "email",
"email": "sub1@yandex.ru",
"priority": 0,
"status": "subscribed",
"custom_fields": {
"_device_type": "other"
},
"cats": []
},
"channel": "email",
"subscriptions": [
{
"resource_id": 5,
"resource_name": "res1",
"channel": "email",
"email": "sub1@yandex.ru",
"priority": 0,
"status": "subscribed",
"custom_fields": {
"_device_type": "other"
},
"cats": []
},
{
"resource_id": 5,
"resource_name": "res1",
"channel": "email",
"email": "sub2@yandex.ru",
"priority": 0,
"status": "subscribed",
"custom_fields": {
"_device_type": "mob"
},
"cats": []
}
]
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<item>
<xxh>9202595093f237d4</xxh>
<profile_id>66f66973096b3b454bbbccec</profile_id>
<email>example@example.ru</email>
<list_id>66</list_id>
<action>send</action>
<count>1</count>
<datetime>2024-09-27T15:52:57.004Z</datetime>
<message_id>5</message_id>
<campaign_id>137</campaign_id>
<event_id>66f6aaa9da00a9db1c0b2683</event_id>
<smid>uBAhiRBRQhARg7y489hr5F2b2aXMJaztFS7vM7DE1NGJhZWM5</smid>
<campaign_name>New astral campaign</campaign_name>
<message_name>testing</message_name>
<subscription>
<resource_id>5</resource_id>
<resource_name>res1</resource_name>
<channel>email</channel>
<email>sub1@yandex.ru</email>
<priority>0</priority>
<status>subscribed</status>
<custom_fields>
<_device_type>other</_device_type>
</custom_fields>
<cats/>
</subscription>
<channel>email</channel>
<subscriptions>
<subscription>
<resource_id>5</resource_id>
<resource_name>res1</resource_name>
<channel>email</channel>
<email>sub1@yandex.ru</email>
<priority>0</priority>
<status>subscribed</status>
<custom_fields>
<_device_type>other</_device_type>
</custom_fields>
<cats/>
</subscription>
<subscription>
<resource_id>5</resource_id>
<resource_name>res1</resource_name>
<channel>email</channel>
<email>sub2@yandex.ru</email>
<priority>0</priority>
<status>subscribed</status>
<custom_fields>
<_device_type>mob</_device_type>
</custom_fields>
<cats/>
</subscription>
</subscriptions>
</item>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
data | string | An array of received data regarding events in the history of profiles |
data.xxh | string | Profile xxhash ID |
data.profile_id | string | Profile ID |
data.email | string | Profile email |
data.list_id (db_id) | int | Database ID |
data.action | string | Profile action (More details) |
data.count | int | Number of actions taken in this second |
data.datetime | string | Date and time of the action in RFC 3339 (ISO 8601) format |
data.message_id | int | Message template ID Returns 0 if the action does not involve using a template. |
data.campaign_id | int | Campaign ID Returns 0 if the action does not involve using a campaign. |
data.event_id | string | Event ID |
data.smid | string | Unique identifier of the send within the campaign Returns an empty string if the action does not involve sending a message. |
data.campaign_name | string | Name of the campaign Returns an empty string if the action does not involve using a campaign. |
data.message_name | string | Name of the message template Returns an empty string if the action does not involve using a template. |
data.subscription | string | Object containing information about the subscription under which the sending was performed |
data.channel | string | Communication channel in which the event was recorded. Returns an empty string if the channel is not involved. |
data.subscriptions | array of objects | All subscriptions of the profile. For CSV format, it will be represented 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. |
next_from_id | string | The first profile in the next batch of the databas |
error | int | Error code |
error_text | string | Error message |