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.
Parameter | Type | Description |
---|---|---|
partnerCampaignId | int | Campaign ID. Returned in the response to the campaigns/create request. Required parameter |
pinStatus | string | Promo code status. Possible values:
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
Parameter | Type | Description |
---|---|---|
ymCampaignId | int | Unique ID of the campaign. |
pinStatus | string | Status of the selected promo codes. |
pins | object | Object 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" ] } }