Start a campaign (campaigns/start)
Using this method, you can start an existing campaign and change its status from
paused
to started
.Request
Address for sending the request
POST https://yoomoney.ru/api/offerwall/v1/campaigns/start
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/start'
Response
Parameters
Parameter | Type | Description |
---|---|---|
ymCampaignId | int | Campaign ID. |
campaignStatus | enum | Campaign status. If successful, the status will change to started . In case of an error, the campaign will return to its current status. |
Errors
Error code | Value | Description |
---|---|---|
failPin | No promo codes | This type of campaign cannot be launched without promo codes. |
failFinished | Completed | This campaign is over. |
failModerator | On moderation | The campaign is awaiting verification. |
campaignNotFound | Not found | Campaign with this ymCampaignId doesn’t exist for this aggregator or store. |
Example of a response body
JSON
{ "status": "success", "result": { "ymCampaignId": 34, "campaignStatus": "started" } }