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
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
| format | string | "json" | No | Response data format. By default – json. |
| resource_id | int | 1 | Yes | Resource ID |
| db_id | int | 1 | No | Database ID |
| channel | string | "email" | No | Channel type |
| status | string | "subscribed" | No | Subscription status |
| from_id | string | "abcdefghijklmnqrstuvwxyz" | No | First subscription in the list ID |
| limit | int | 1 | No | Response data limit |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"resource_id": 29,
"from_id": "abcdefghijklmnqrstuvwxyz",
"limit": 1
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<db_id>1</db_id>
<resource_id>1</resource_id>
<from_id>abcdefghijklmnqrstuvwxyz</from_id>
<limit>1</limit>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"db_id": 1,
"profile_id": "6643052fee44bb50a671161d",
"_xxh": "026e82a364dd17e6",
"hash_id": "fcf06ea1",
"resource_id": 29,
"channel": "email",
"email": "zanitrevitteu-5912@1xp.fr",
"priority": 0,
"status": "subscribed",
"custom_fields": {
"custom_int_field_2": 20000
}
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": "cPydNpzRRGLhjKziMHRQ3awnGtyo8hjzn7Jar5mhd"
}
<xml>
<data>
<_xxh>026e82a364dd17e6</_xxh>
<channel>email</channel>
<custom_fields>
<custom_int_field_2>20000</custom_int_field_2>
</custom_fields>
<db_id>1</db_id>
<email>zanitrevitteu-5912@1xp.fr</email>
<hash_id>fcf06ea1</hash_id>
<priority>0</priority>
<profile_id>6643052fee44bb50a671161d</profile_id>
<resource_id>29</resource_id>
<status>subscribed</status>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<next_from_id>cPydNpzRRGLhjKziMHRQ3awnGtyo8hjzn7Jar5mhdm</next_from_id>
</xml>
Response parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error text |
| next_from_id | string | The index must be passed in the next request to receive another piece of data, until the result output contains 0 history lines |
| resource_id | int | Subscription resource ID |
| channel | string | channel type |
| custom_fields | object | System and custom subscription fields. You can get information about subscription fields in a resource using the /v1.1/resources/fields_get method |
| cats | array | The resource categories to which the profile is subscribed. |
Additionally for the Email channel:
| Parameter | Type | Description |
|---|---|---|
| string | Email address |
Additionally for the Push channel:
| Parameter | Type | Description |
|---|---|---|
| provider | string | Provider type |
| subscription_id | string | Subscription ID |
Additionally for the SMS channel:
| Parameters | Type | Description |
|---|---|---|
| phone | string | Phone number |
Additionally for the Telegram channel:
| Parameter | Type | Description |
|---|---|---|
| cc_data | object | Chat ID between Telegram bot and user |
Additionally for the WhatsApp* channel:
| Parameter | Type | Description |
|---|---|---|
| cc_data | object | WhatsApp* user's phone number |
*The Meta organization, which owns Instagram, Facebook and WhatsApp products, has been declared as extremist and banned in Russia.