List promo codes by status (campaigns/get-pins-by-status)
sing this method, you can get all the promo codes for a certain campaign by status: specify the status and get a list of all the promo codes with this status in response.
Request
Address for sending the request
POST https://yoomoney.ru/api/offerwall/v1/campaigns/get-pins-by-status
Parameters
The aggregator or store is determined by the token.
ParameterTypeDescription
partnerCampaignId
int
Campaign ID. Returned in the response to the campaigns/create request.
Required parameter
pinStatus
string
Promo code status. Possible values:
  • new_unused — not used yet;
  • accepted_by_user — accepted by the user;
  • redeem_received — redeemed by the user.
Required parameter
Example of a request body
JSON
{
  "pinStatus": "accepted_by_user",
  "ymCampaignId": 60
}
Request example
cURL
curl -X POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer: <access token>' \
  -d '{
  "pinStatus": "accepted_by_user",
  "ymCampaignId": 60
}' 'https://yoomoney.ru/api/offerwall/v1/campaigns/get-pins-by-status'
Response
Parameters
ParameterTypeDescription
ymCampaignIdintUnique ID of the campaign.
pinStatusstringStatus of the selected promo codes.
pinsobjectObject containing all promo codes with this status.
Example of a response body
JSON
{
  "status": "success",
  "result": {
    "ymCampaignId": 60,
    "pinStatus": "accepted_by_user",
    "pins": [
      "dykLadno",
      "storubley",
      "1234567"
    ]
  }
}
© 2024, "YooMoney", NBCO LLC