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
ParameterTypeDescription
partnerCampaignIdintCampaign 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
ParameterTypeDescription
ymCampaignIdintCampaign ID in the YooMoney service.
campaignStatusenumCampaign status
campaignAcceptsintNumber 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.
campaignShowsintNumber of impressions, i.e. how many times users saw the campaign.
campaignPinsStats.unusedintNumber of unused promo codes (users can get them and use them).
campaignPinsStats.totalintTotal number of promo codes uploaded for this campaign.
campaignRedeemStats.usedCountintNumber of used promo codes (leads).
campaignRedeemStats.approvedCountintNumber of confirmed promo codes
campaignRedeemStats.declinedCountintNumber of declined promo codes.
Errors
Error codeValueDescription
campaignNotFoundNot foundCampaign 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
		}
	}
}