Stop a campaign (campaigns/stop)
Using this method, you can stop the campaign and send it to the archive.
 
Request
Address for sending the request
POST https://yoomoney.ru/api/offerwall/v1/campaigns/stop
Parameters
ParameterTypeDescription
partnerCampaignIdintUnique ID of the campaign. 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/stop'
Response
Parameters
ParameterTypeDescription
ymCampaignIdintUnique ID of the campaign.
campaignStatus
enum
Campaign status. If the campaign is stopped successfully, the response will return the paused status. If an error occurs, the current campaign status will be returned.
Errors
Error codeValueDescription
failMerchantNot enough rightsThe campaign can only be stopped by the aggregator or store that created it.
failFinishedArchivedThe campaign was deleted.
Example of a response body
JSON
{
  "errors": {},
  "result": {
    "campaignStatus": "paused",
    "ymCampaignId": 34
  },
  "status": "success"
}