Skip to main content

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

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json
list_idint20YesDatabase ID
from_idstring"005a06ded879ecd7.20170406"NoThe first profile in response (xxhash)
limitint300NoResponse profiles array limit
By default - 1000
date_fromstring"2016-11-25"YesTime period start
YYYY-MM-DD
date_tostring"2016-11-29"YesTime period end
YYYY-MM-DD
fieldsstring array["CustomID"]NoReturns 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

{
"token": "abcdefghijklmnqrstuvwxyz",
"list_id": 4,
"limit": 3,
"date_from": "2024-07-15",
"date_to": "2024-10-09",
"format": "json",
"from_id": "",
"fields": [
"CustomNumber",
"CustomEnum"
]
}

Response example

{
"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"
}

Response parameters

ParameterTypeDescription
datastringAn array of received data regarding events in the history of profiles
data.xxhstringProfile xxhash ID
data.profile_idstringProfile ID
data.emailstringProfile email
data.list_id (db_id)intDatabase ID
data.actionstringProfile action (More details)
data.countintNumber of actions taken in this second
data.datetimestringDate and time of the action in RFC 3339 (ISO 8601) format
data.message_idintMessage template ID

Returns 0 if the action does not involve using a template.
data.campaign_idintCampaign ID

Returns 0 if the action does not involve using a campaign.
data.event_idstringEvent ID
data.smidstringUnique identifier of the send within the campaign

Returns an empty string if the action does not involve sending a message.
data.campaign_namestringName of the campaign

Returns an empty string if the action does not involve using a campaign.
data.message_namestringName of the message template

Returns an empty string if the action does not involve using a template.
data.subscriptionstringObject containing information about the subscription under which the sending was performed
data.channelstringCommunication channel in which the event was recorded.

Returns an empty string if the channel is not involved.
data.subscriptionsarray of objectsAll subscriptions of the profile. For CSV format, it will be represented as a JSON string.
data.fieldsobjectAdditional profile fields specified in the fields parameter of the request. For the CSV format, it will be presented as a JSON string.
next_from_idstringThe first profile in the next batch of the databas
errorintError code
error_textstringError message