Get resource statistics
Description
Get the statistics of subscriptions on resource.
URL
Method: POST
https://example.com/api/v1.1/resources/get_counters
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
list_id | int | 1 | Yes | Database ID |
id | int | 1 | Yes | Resource ID |
format | JSON object | "json" | No | Response data format By default – json |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"list_id": 24,
"id": 5,
"format": "json"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<list_id>24</list_id>
<id>5</id>
<format>json</format>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"channel": "email",
"status": {
"all": 1336,
"subscribed": 925,
"unsubscribed": 0,
"complained": 0,
"hardbounced": 411,
"unconfirmed": 0,
"suspended": 0,
"invalid": 0,
"subscribed_sendable": 925,
"unconfirmed_sendable": 0
}
},
{
"channel": "sms",
"status": {
"all": 1336,
"subscribed": 0,
"unsubscribed": 0,
"complained": 0,
"hardbounced": 0,
"unconfirmed": 0,
"suspended": 0,
"invalid": 0,
"subscribed_sendable": 0,
"unconfirmed_sendable": 0
}
},
{
"channel": "push",
"status": {
"all": 1336,
"subscribed": 0,
"unsubscribed": 0,
"complained": 0,
"hardbounced": 0,
"unconfirmed": 0,
"suspended": 0,
"invalid": 0,
"subscribed_sendable": 0,
"unconfirmed_sendable": 0
}
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<channel>email</channel>
<status>
<all>1336</all>
<subscribed>925</subscribed>
<unsubscribed>0</unsubscribed>
<complained>0</complained>
<hardbounced>411</hardbounced>
<unconfirmed>0</unconfirmed>
<suspended>0</suspended>
<invalid>0</invalid>
<subscribed_sendable>925</subscribed_sendable>
<unconfirmed_sendable>0</unconfirmed_sendable>
</status>
</data>
<data>
<channel>sms</channel>
<status>
<all>1336</all>
<subscribed>0</subscribed>
<unsubscribed>0</unsubscribed>
<complained>0</complained>
<hardbounced>0</hardbounced>
<unconfirmed>0</unconfirmed>
<suspended>0</suspended>
<invalid>0</invalid>
<subscribed_sendable>0</subscribed_sendable>
<unconfirmed_sendable>0</unconfirmed_sendable>
</status>
</data>
<data>
<channel>push</channel>
<status>
<all>1336</all>
<subscribed>0</subscribed>
<unsubscribed>0</unsubscribed>
<complained>0</complained>
<hardbounced>0</hardbounced>
<unconfirmed>0</unconfirmed>
<suspended>0</suspended>
<invalid>0</invalid>
<subscribed_sendable>0</subscribed_sendable>
<unconfirmed_sendable>0</unconfirmed_sendable>
</status>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
data | array of objects | Array of received resource channel data |
error | int | Error code |
error_text | string | Error text |