Skip to main content

Get all subscriptions from multiple profiles

Description

Retrieves all subscription entries from several customer profiles.

Request URL

Method: POST

https://example.com/api/v1.1/subscriptions/list_all

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json.
resource_idint1YesResource ID
db_idint1NoDatabase ID
channelstring"email"NoChannel type
statusstring"subscribed"NoSubscription status
from_idstring"abcdefghijklmnqrstuvwxyz"NoFirst subscription in the list ID
limitint1NoResponse data limit

Request example

{
"db_id": 1,
"limit": 1,
"resource_id": 1,
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": [
{
"_xxh": "12345",
"channel": "email",
"db_id": 1,
"email": "john@example.com",
"hash_id": "12345",
"priority": 0,
"profile_id": "abcdefghijklmnqrstuvwxyz",
"resource_id": 1,
"status": "subscribed",
"custom_fields": {
"_browser_name": "Firefox",
"_device_type": "web",
"custom_field_1": "test value"
},
"cats": [
"category_1",
"category_2"
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": "3hDmNCv1E3pT62kP8EqdDZN77jmF9RW82p1rFvpui5wxUMdq2EYQJkg",
"total_count": 1
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError text
next_from_idstringThe index must be passed in the next request to receive another piece of data, until the result output contains 0 history lines
resource_idintSubscription resource ID
channelstringchannel type
custom_fieldsobjectSystem and custom subscription fields.

You can get information about subscription fields in a resource using the /v1.1/resources/fields_get method
catsarrayThe resource categories to which the profile is subscribed.

Additionally for the Email channel:

ParameterTypeDescription
emailstringEmail address

Additionally for the Push channel:

ParameterTypeDescription
providerstringProvider type
subscription_idstringSubscription ID

Additionally for the SMS channel:

ParametersTypeDescription
phonestringPhone number

Additionally for the Telegram channel:

ParameterTypeDescription
cc_dataobjectChat ID between Telegram bot and user

Additionally for the WhatsApp channel:

ParameterTypeDescription
cc_dataobjectWhatsApp user's phone number