Get campaign statistics (campaigns/info)
Using this method, you can get statistics for the campaign: the amount of unused bonuses left, the amount given to users, the amount used.
Request
Address for sending the request
POST https://yoomoney.ru/api/offerwall/v1/campaigns/info
Parameters
Parameter | Type | Description |
---|---|---|
partnerCampaignId | int | Campaign ID. Returned in the response to the campaigns/create request. |
Example of a request body
JSON
{ "ymCampaignId": 34 }
Request example
cURL
curl -X POST \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer <access token>' -d '{ "ymCampaignId": 34 }' 'https://yoomoney.ru/api/offerwall/v1/campaigns/info'
Response
Parameters
Parameter | Type | Description |
---|---|---|
ymCampaignId | int | Campaign ID in the YooMoney service. |
campaignStatus | enum | Campaign status |
campaignAccepts | int | Number of promo codes or links that were received by users but are not yet used (pinURL ). |
campaignRedeems | int | Number of used promo codes. Based on the data uploaded by the aggregator or store to the YooMoney service using the campaigns/redeem method. |
campaignShows | int | Number of impressions, i.e. how many times users saw the campaign. |
campaignPinsStats.unused | int | Number of unused promo codes (users can get them and use them). |
campaignPinsStats.total | int | Total number of promo codes uploaded for this campaign. |
campaignRedeemStats.usedCount | int | Number of used promo codes (leads). |
campaignRedeemStats.approvedCount | int | Number of confirmed promo codes |
campaignRedeemStats.declinedCount | int | Number of declined promo codes. |
Errors
Error code | Value | Description |
---|---|---|
campaignNotFound | Not found | Campaign with this ymCampaignId does not exist. |
Example of a response body
JSON
{ "status": "success", "result": { "ymCampaignId": 2563, "campaignStatus": "started", "campaignAccepts": 287, "campaignRedeems": 24, "campaignShows": 1055, "campaignPinsStats": { "unused": 713, "total": 1000 }, "campaignRedeemStats": { "usedCount": 14, "approvedCount": 9, "declinedCount": 1 } } }