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
Parameter | Type | Description |
---|---|---|
partnerCampaignId | int | Unique 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
Parameter | Type | Description |
---|---|---|
ymCampaignId | int | Unique 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 code | Value | Description |
---|---|---|
failMerchant | Not enough rights | The campaign can only be stopped by the aggregator or store that created it. |
failFinished | Archived | The campaign was deleted. |
Example of a response body
JSON
{ "errors": {}, "result": { "campaignStatus": "paused", "ymCampaignId": 34 }, "status": "success" }