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
    • Get resource statistics
    • Update statistics on resource
    • Get resources list
    • Get resource information
    • Get resource subscription fields
  • Segments
  • 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
  • Resources
  • Update statistics on resource
Documentation for version v74

Update statistics on resource

Description​

Update subscription statistics of resource.

Returns a response with task ID without waiting for execution.

URL​

Method: POST

https://example.com/api/v1.1/resources/refresh_counters

Request​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
idint1YesResource ID
list_idint1YesDatabase ID
formatJSON object "json"No Response data format
By default – json
feedbackJSON object
"feedback": {
"type": "JSON",
"url": "http://example.com/receiver"
}
NoParameter defining the method of sending data about statistics update.
Parameter "type" - the format or method used to send the data.
"url" - the URL to which the statistics data will be sent.

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 24,
"list_id": 1,
"format": "json",
"feedback": {
"type": "JSON",
"url": "http://example.com/receiver"
}
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>24</id>
<list_id>1</list_id>
<format>json</format>
<feedback>
<type>JSON</type>
<url>http://example.com/receiver</url>
</feedback>
</xml>

Response example​

  • JSON
  • XML
{
"data": {
"task_id": "c9c3ec48-1bef-4969-9c1a-df39f0c179bb"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<task_id>c9c3ec48-1bef-4969-9c1a-df39f0c179bb</task_id>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
dataJSON objectsContains the task identifier - task_id
errorintError code
error_textstringError text

Checking the task status​

URL​

Method: POST

https://example.com/api/v1.1/tasks/status

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
task_idstring"518f4997-ec43-4df5-bfd0-093aaacf679f"YesTask ID

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"task_id": "c9c3ec48-1bef-4969-9c1a-df39f0c179bb"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<task_id>c9c3ec48-1bef-4969-9c1a-df39f0c179bb</task_id>
</xml>

Response example​

  • JSON
  • XML
{
"data": {
"status": "completed",
"progress": 100,
"result": [
{
"channels": [
{
"channel": "sms",
"status": {
"all": 1336,
"complained": 0,
"hardbounced": 0,
"invalid": 0,
"subscribed": 0,
"subscribed_sendable": 0,
"suspended": 0,
"unconfirmed": 0,
"unconfirmed_sendable": 0,
"unsubscribed": 0
}
},
{
"channel": "push",
"status": {
"all": 1336,
"complained": 0,
"hardbounced": 0,
"invalid": 0,
"subscribed": 0,
"subscribed_sendable": 0,
"suspended": 0,
"unconfirmed": 0,
"unconfirmed_sendable": 0,
"unsubscribed": 0
}
},
{
"channel": "email",
"status": {
"all": 1336,
"complained": 0,
"hardbounced": 434,
"invalid": 0,
"subscribed": 842,
"subscribed_sendable": 842,
"suspended": 0,
"unconfirmed": 0,
"unconfirmed_sendable": 0,
"unsubscribed": 60
}
}
],
"in_progress": false,
"last_count_time": "counted at 2024-04-19T13:31:08Z in 231.374251ms",
"list_id": 1,
"refresh_task_id": "",
"updated": "2024-04-19T13:31:08.927Z"
}
]
},
"error": 0,
"error_text": "Successful operation"
}
 <xml>
<data>
<status>completed</status>
<progress>100</progress>
<result>
<channels>
<channel>sms</channel>
<status>
<all>1336</all>
<complained>0</complained>
<hardbounced>0</hardbounced>
<invalid>0</invalid>
<subscribed>0</subscribed>
<subscribed_sendable>0</subscribed_sendable>
<suspended>0</suspended>
<unconfirmed>0</unconfirmed>
<unconfirmed_sendable>0</unconfirmed_sendable>
<unsubscribed>0</unsubscribed>
</status>
</channels>
<channels>
<channel>push</channel>
<status>
<all>1336</all>
<complained>0</complained>
<hardbounced>0</hardbounced>
<invalid>0</invalid>
<subscribed>0</subscribed>
<subscribed_sendable>0</subscribed_sendable>
<suspended>0</suspended>
<unconfirmed>0</unconfirmed>
<unconfirmed_sendable>0</unconfirmed_sendable>
<unsubscribed>0</unsubscribed>
</status>
</channels>
<channels>
<channel>email</channel>
<status>
<all>1336</all>
<complained>0</complained>
<hardbounced>434</hardbounced>
<invalid>0</invalid>
<subscribed>842</subscribed>
<subscribed_sendable>842</subscribed_sendable>
<suspended>0</suspended>
<unconfirmed>0</unconfirmed>
<unconfirmed_sendable>0</unconfirmed_sendable>
<unsubscribed>60</unsubscribed>
</status>
</channels>
<in_progress>false</in_progress>
<last_count_time>counted at 2024-04-19T13:31:08Z in 231.374251ms</last_count_time>
<list_id>1</list_id>
<refresh_task_id></refresh_task_id>
<updated>2024-04-19T13:31:08.927Z</updated>
</result>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Last updated on Jan 14, 2026
Previous
Get resource statistics
Next
Get resources list
  • Description
  • URL
  • Request
  • Request example
  • Response example
  • Response parameters
  • Checking the task status
    • URL
    • Request parameters
    • Request example
    • Response example
© 2015 - 2025 Altcraft, LLC. All rights reserved.