Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
    • Get statistics on resource
    • Update statistics on segment
    • Add or remove profile
    • Get profile data in a static segment
    • Create segment
    • Update segment
    • Get segment information
    • Get segments list
    • Delete segment
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Segments
  • Get statistics on resource
Documentation for version v74

Get statistics on resource

Description​

Get statistics on profile subscriptions in segment.

URL​

Method: POST

https://example.com/api/v1.1/segments/get_counters

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
list_idint3Yes, for dynamic segmentDatabase ID
The parameter is used only for the dynamic segment
resource_idint2YesResource ID
idint1YesSegment ID
formatint"json"NoResponse data format
By default – json

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"list_id": 1,
"resource_id": 24,
"id": 7,
"format": "json"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<list_id>1</list_id>
<resource_id>24</resource_id>
<id>7</id>
<format>json</format>
</xml>

Response example​

  • JSON
  • XML
{
"data": [
{
"channel": "email",
"status": {
"subscribed_sendable": 209,
"unconfirmed_sendable": 0
}
},
{
"channel": "push",
"status": {
"subscribed_sendable": 0,
"unconfirmed_sendable": 0
}
},
{
"channel": "sms",
"status": {
"subscribed_sendable": 108,
"unconfirmed_sendable": 0
}
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<channel>email</channel>
<status>
<subscribed_sendable>209</subscribed_sendable>
<unconfirmed_sendable>0</unconfirmed_sendable>
</status>
</data>
<data>
<channel>push</channel>
<status>
<subscribed_sendable>0</subscribed_sendable>
<unconfirmed_sendable>0</unconfirmed_sendable>
</status>
</data>
<data>
<channel>sms</channel>
<status>
<subscribed_sendable>108</subscribed_sendable>
<unconfirmed_sendable>0</unconfirmed_sendable>
</status>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
dataarray of objectsArray of received resource channel data
errorintError code
error_textstringError text
Last updated on Nov 13, 2024
Previous
Segments
Next
Update statistics on segment
  • Description
  • URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.