Editing a mobile ad unit by ID
Request
PATCH
https://partner.yandex.ru/api/mobile/adunit/{id}
Partner API
Path parameters
|
Name |
Description |
|
id |
Type: string Mobile ad unit ID Pattern: Example: `` |
Body
application/json
{
"caption": "example",
"id": "example",
"strategy": {},
"type": "example"
}
One of 5 types
-
Type: UpdateBannerMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Type: UpdateNativeMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Type: UpdateInterstitialMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Type: UpdateRewardedMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example", "currencyType": "example", "currencyValue": 0 } -
Type: UpdateAppOpenMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" }
Strategy
Ad traffic management strategy
|
Name |
Description |
|
type |
Type: string Strategy type Example: |
Example
{
"type": "example"
}
MaxRevenueStrategy
Doesn't limit the impression cost
Type: object
All of 1 type
-
Type: Strategy
Ad traffic management strategy
Example
{ "type": "example" }
Example
{
"type": "example"
}
MinCpmVStrategy
The threshold (floor) sets the cost per one thousand viewable impressions
Type: object
All of 2 types
-
Type: Strategy
Ad traffic management strategy
Example
{ "type": "example" } -
Type: object
mincpm
Type: number
Floor value
Example
{ "mincpm": 0.5 }
Example
{
"type": "example",
"mincpm": 0.5
}
MinECpmStrategy
The threshold (floor) sets the cost per one thousand impressions
Type: object
All of 2 types
-
Type: Strategy
Ad traffic management strategy
Example
{ "type": "example" } -
Type: object
mincpm
Type: number
Floor value
Example
{ "mincpm": 0.5 }
Example
{
"type": "example",
"mincpm": 0.5
}
UpdateBaseMobileAdUnit
|
Name |
Description |
|
type |
Type: string Type of ad unit or unit action Example: |
|
caption |
Type: string Description Min length: Max length: Example: |
|
id |
Type: string Unit ID Min length: Pattern: Example: |
|
strategy |
One of 3 types
Ad traffic management strategy, CPM floors Example
|
Example
{
"caption": "example",
"id": "example",
"strategy": {
"type": "example"
},
"type": "example"
}
UpdateBannerMobileAdUnit
All of 2 types
-
Type: UpdateBaseMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Banner
Type: object
Banner
Example
{}
Example
{
"caption": "example",
"id": "example",
"strategy": {
"type": "example"
},
"type": "example"
}
UpdateNativeMobileAdUnit
All of 2 types
-
Type: UpdateBaseMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Native ad unit
Type: object
Native ad unit
Example
{}
Example
{
"caption": "example",
"id": "example",
"strategy": {
"type": "example"
},
"type": "example"
}
UpdateInterstitialMobileAdUnit
All of 2 types
-
Type: UpdateBaseMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Interstitial ad unit
Type: object
Interstitial ad unit
Example
{}
Example
{
"caption": "example",
"id": "example",
"strategy": {
"type": "example"
},
"type": "example"
}
UpdateRewardedMobileAdUnit
All of 2 types
-
Type: UpdateBaseMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
Type: Rewarded ad unit
currencyType
Type: string
In-app currency name
Min length:
1Max length:
64Example:
examplecurrencyValue
Type: number
Reward amount for viewing the ad in the in-app currency
Min value:
0Max value:
100000000Rewarded ad unit
Example
{ "currencyType": "example", "currencyValue": 0 }
Example
{
"caption": "example",
"id": "example",
"strategy": {
"type": "example"
},
"type": "example",
"currencyType": "example",
"currencyValue": 0
}
UpdateAppOpenMobileAdUnit
All of 2 types
-
Type: UpdateBaseMobileAdUnit
Example
{ "caption": "example", "id": "example", "strategy": { "type": "example" }, "type": "example" } -
App open ad unit
Type: object
App open ad unit
Example
{}
Example
{
"caption": "example",
"id": "example",
"strategy": {
"type": "example"
},
"type": "example"
}
Responses
200 OK
OK
Body
application/json
{
"data": {
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {},
"type": "example"
},
"warnings": [
"example"
]
}
|
Name |
Description |
|
data |
Type: MobileAdUnit Example
|
|
warnings |
Type: string[] List of warnings that occurred when performing an action Example
|
AdUnitStatus
Type: string
Enum: UNKNOWN, ENABLED, ARCHIVED
BaseMobileAdUnit
|
Name |
Description |
|
applicationId |
Type: number App ID |
|
id |
Type: string Unit ID Min length: Pattern: Example: |
|
type |
Type: string Type of ad unit or unit action Example: |
|
caption |
Type: string Description Min length: Max length: Example: |
|
createDate |
Type: string<date-time> Unit creation date Example: |
|
editable |
Type: boolean Editability |
|
status |
Type: AdUnitStatus Enum: |
|
strategy |
One of 3 types
Ad traffic management strategy, CPM floors Example
|
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {
"type": "example"
},
"type": "example"
}
AppOpenMobileAdUnit
All of 2 types
-
Type: BaseMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
App open ad unit
Type: object
App open ad unit
Example
{}
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {
"type": "example"
},
"type": "example"
}
RewardedMobileAdUnit
All of 2 types
-
Type: BaseMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Type: Rewarded ad unit
currencyType
Type: string
In-app currency name
Min length:
1Max length:
64Example:
examplecurrencyValue
Type: number
Reward amount for viewing the ad in the in-app currency
Min value:
0Max value:
100000000Rewarded ad unit
Example
{ "currencyType": "example", "currencyValue": 0 }
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {
"type": "example"
},
"type": "example",
"currencyType": "example",
"currencyValue": 0
}
BannerMobileAdUnit
All of 2 types
-
Type: BaseMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Banner
Type: object
Banner
Example
{}
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {
"type": "example"
},
"type": "example"
}
NativeMobileAdUnit
All of 2 types
-
Type: BaseMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Native ad unit
Type: object
Native ad unit
Example
{}
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {
"type": "example"
},
"type": "example"
}
InterstitialMobileAdUnit
All of 2 types
-
Type: BaseMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Interstitial ad unit
Type: object
Interstitial ad unit
Example
{}
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {
"type": "example"
},
"type": "example"
}
MobileAdUnit
One of 5 types
-
Type: AppOpenMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Type: RewardedMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example", "currencyType": "example", "currencyValue": 0 } -
Type: BannerMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Type: NativeMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" } -
Type: InterstitialMobileAdUnit
Example
{ "applicationId": 0.5, "caption": "example", "createDate": "2025-01-01T00:00:00Z", "editable": true, "id": "example", "status": "UNKNOWN", "strategy": { "type": "example" }, "type": "example" }
Example
{
"applicationId": 0.5,
"caption": "example",
"createDate": "2025-01-01T00:00:00Z",
"editable": true,
"id": "example",
"status": "UNKNOWN",
"strategy": {},
"type": "example"
}