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: R-M-\d{1,10}-\d{1,7}

Body

application/json
{}

Name

Description

...rest

oneOf UpdateBannerMobileAdUnit

...rest

oneOf UpdateNativeMobileAdUnit

...rest

oneOf UpdateInterstitialMobileAdUnit

...rest

oneOf UpdateRewardedMobileAdUnit

...rest

oneOf UpdateAppOpenMobileAdUnit

UpdateBannerMobileAdUnit

Name

Description

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

id

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

UpdateNativeMobileAdUnit

Name

Description

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

id

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

UpdateInterstitialMobileAdUnit

Name

Description

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

id

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

UpdateRewardedMobileAdUnit

Name

Description

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

currencyType

Type: string

In-app currency name

Min length: 1

Max length: 64

currencyValue

Type: number

Reward amount for viewing the ad in the in-app currency

Min value: 0

Max value: 100000000

id

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

UpdateAppOpenMobileAdUnit

Name

Description

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

id

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

MaxRevenueStrategy

Doesn't limit the impression cost

Name

Description

type*

Type: string

Strategy type

MinCpmVStrategy

The threshold (floor) sets the cost per one thousand viewable impressions

Name

Description

mincpm*

Type: number

Floor value

type*

Type: string

Strategy type

MinECpmStrategy

The threshold (floor) sets the cost per one thousand impressions

Name

Description

mincpm*

Type: number

Floor value

type*

Type: string

Strategy type

Strategy

Ad traffic management strategy

Name

Description

type*

Type: string

Strategy type

Responses

200 OK

OK

Body

application/json
{
    "data": {
        "applicationId": 0,
        "caption": "string",
        "createDate": "2022-12-29T18:02:01Z",
        "editable": false,
        "id": "string",
        "status": "UNKNOWN",
        "strategy": {
            "type": "string"
        },
        "type": "string"
    },
    "warnings": [
        "string"
    ]
}

Name

Description

data

Type: AppOpenMobileAdUnit or RewardedMobileAdUnit or BannerMobileAdUnit or NativeMobileAdUnit or InterstitialMobileAdUnit

warnings

Type: string[]

List of warnings that occurred when performing an action

AppOpenMobileAdUnit

Name

Description

applicationId*

Type: number

App ID

id*

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

createDate

Type: string<date-time>

Unit creation date

editable

Type: boolean

Editability

status

Type: AdUnitStatus

Enum: UNKNOWN, ENABLED, ARCHIVED

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

RewardedMobileAdUnit

Name

Description

applicationId*

Type: number

App ID

currencyType*

Type: string

In-app currency name

Min length: 1

Max length: 64

currencyValue*

Type: number

Reward amount for viewing the ad in the in-app currency

Min value: 0

Max value: 100000000

id*

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

createDate

Type: string<date-time>

Unit creation date

editable

Type: boolean

Editability

status

Type: AdUnitStatus

Enum: UNKNOWN, ENABLED, ARCHIVED

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

BannerMobileAdUnit

Name

Description

applicationId*

Type: number

App ID

id*

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

createDate

Type: string<date-time>

Unit creation date

editable

Type: boolean

Editability

status

Type: AdUnitStatus

Enum: UNKNOWN, ENABLED, ARCHIVED

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

NativeMobileAdUnit

Name

Description

applicationId*

Type: number

App ID

id*

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

createDate

Type: string<date-time>

Unit creation date

editable

Type: boolean

Editability

status

Type: AdUnitStatus

Enum: UNKNOWN, ENABLED, ARCHIVED

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

InterstitialMobileAdUnit

Name

Description

applicationId*

Type: number

App ID

id*

Type: string

Unit ID

Min length: 7

Pattern: R-M-\d{1,10}-\d{1,7}

type*

Type: string

Type of ad unit or unit action

caption

Type: string

Description

Min length: 1

Max length: 255

createDate

Type: string<date-time>

Unit creation date

editable

Type: boolean

Editability

status

Type: AdUnitStatus

Enum: UNKNOWN, ENABLED, ARCHIVED

strategy

Type: MaxRevenueStrategy or MinCpmVStrategy or MinECpmStrategy

Ad traffic management strategy, CPM floors

AdUnitStatus

Type

Description

AdUnitStatus

Enum: UNKNOWN, ENABLED, ARCHIVED

No longer supported, please use an alternative and newer version.