Get campaign contents (campaigns/get)
Using this method, you can get the contents of a specific campaign: status, copy, links, i. e. everything that determines the campaign’s presentation (whether it’s a discount or bonus) to users.
 
Request
Address for sending the request
POST https://yoomoney.ru/api/offerwall/v1/campaigns/get
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/get'
Response
Parameters
ParameterTypeDescription
ymCampaignId
int
Campaign ID in the YooMoney service. Returned in the response to the campaigns/create request.
Required parameter
campaignStatus
enum
Required parameter
campaignStart
datetime
Start date of the campaign.
Optional parameter
campaignEnd
dateTime
End date of the campaign.
Optional parameter
campaignType
enum
Campaign type. Possible values:
  • codeOnline — with the promo code that the buyer will redeem in the online store (you can use acceptUrl to redirect the buyer to the required website);
  • codeOffline — with the promo code that the buyer can only redeem at the retail outlet (offline);
  • promo — without a promo code (using acceptUrl).
Required parameter
pinType
enum
Type of promo code. Possible values:
  • one-off — single-use;
  • reusable — reusable.
If campaignType=code
pinEnd
datatime
Date after which the promo code expires.
If campaignType=promo
merchantDomain
string
URL of the store’s website.
Required parameter
merchantLogoSvg
varchar (300)
Link to store’s logo in SVG format.
Required parameter
merchantLogoPng
varchar (300)
Link to store’s logo in PNG format.
Required parameter
merchantName
varchar (300)
Store name.
Required parameter
backgroundColor
varchar (30)
Background color.
Required parameter
fontColor
varchar (30)
fontColor
Required parameter
description
varchar (90)
Description of campaign.
Required parameter
conditions
varchar (350)
Conditions of redeeming the offer.
Required parameter
discountType
varchar (30)
Type of discount or bonus. Possible values:
  • text — bonus, gift, or special offer, text value is used;
  • fix — fixed amount;
  • percent — discount in percentage.
Required parameter
discountAmount
varchar (30)
Size of the discount or the bonus name.
Required parameter
campaignFee
varchar (30)
Amount of YooMoney’s remuneration for this campaign.
Optional parameter
Errors
Error codeValueDescription
campaignNotFoundNot foundCampaign with this ymCampaignId does not exist.
Example of a response body
JSON
{
  "status": "success",
  "result": {
    "ymCampaignId": 34,
    "campaignStatus": "started",
    "categoryId": 39,
    "campaignEnd": "2017-12-31T20:29:59.000Z",
    "campaignType": "code",
    "pinType": "one-off",
    "merchantDomain": "example.com",
    "merchantLogoPng": "https://example.com/i/logo.png",
    "merchantLogoSvg": "https://example.com/i/logo.svg",
    "merchantName": "Магазин",
    "backgroundColor": "#ffffff",
    "fontColor": "#000000",
    "description": "Скидка на деньги на сайте ЮMoney",
    "conditions": "Бонус действует 10 дней при заказе от 4000 рублей на сайте example.com",
    "discountType": "text",
    "discountAmount": "100",
    "discountCurrency": 643
  }
}