Update
Changes settings for shared accounts.
Restrictions
The daily budget settings can be changed a maximum of 3 times a day.
Input data
The input data structure in JSON is shown below.
Alert
Values of omitted parameters are not changed.
{
"method": "AccountManagement",
"param": {
/* AccountManagementRequest */
"Action": (string),
"Accounts": [
{ /* Account */
"AccountID": (int),
"AccountDayBudget": {
/* AccountDayBudgetInfo */
"Amount": (float),
"SpendMode": (string)
},
"SmsNotification": {
/* SmsNotificationInfo */
"MoneyInSms": (string),
"MoneyOutSms": (string),
"PausedByDayBudgetSms": (string),
"SmsTimeFrom": (string),
"SmsTimeTo": (string)
},
"EmailNotification": {
/* EmailNotificationInfo */
"Email": (string),
"MoneyWarningValue": (int),
"PausedByDayBudget": (string)
}
}
...
]
}
}
Parameters are described below.
Parameter |
Description |
Required |
AccountManagementRequest object |
||
|
Action: Update. |
Yes |
|
Array of |
No |
Account object |
||
|
ID of the shared account to change settings for. |
Yes |
|
The |
No |
|
The To get notifications, you must subscribe to them (see the Help section Subscribe to SMS notificationsSubscribe to SMS notifications). The phone number to send notifications to is taken from the user data (see the Help section Mobile numbersMobile numbers). |
No |
|
The |
No |
AccountDayBudgetInfo object |
||
|
The daily budget for the shared account (in the shared account currency). To get the minimum acceptable value, use the Dictionaries.get method for version 5 of the API and specify the dictionary name A value of 0 nullifies the daily budget. |
Yes |
|
Mode for displaying ads:
See Daily budgetDaily budget under “Shared account” in the Help for Yandex Direct. The mode applies to all campaigns, and the corresponding setting on the campaign level is ignored. |
Yes |
SmsNotificationInfo object |
||
|
Notify when funds are credited to the shared account — Yes/No. The predefined value is No. |
No |
|
Notify when funds are debited from the shared account — Yes/No. The predefined value is No. |
No |
|
Notify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No. The predefined value is Yes. |
No |
|
The allowed starting time for sending SMS notifications related to the shared account. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”. |
No |
|
The ending time for sending SMS notifications related to the shared account. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”. |
No |
EmailNotificationInfo object |
||
|
The email address for sending notifications of events related to the shared account. |
No |
|
The minimal balance; notification is sent when the account balance is reduced to this amount. Set as a percentage of the amount of the last payment. The predefined value is 20. |
No |
|
Notify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No. The predefined value is Yes. |
No |
Output data
Alert
An error when changing settings for one of the shared accounts does not cause the entire operation to be canceled, and does not affect the success of changing settings for the other shared accounts.
The output data structure in JSON is shown below.
{
"data": {
/* AccountManagementResponse */
"ActionsResult": [
{ /* AccountActionResult */
"AccountID": (int),
"Errors": [
{ /* Error */
"FaultCode": (int),
"FaultString": (string),
"FaultDetail": (string)
}
...
]
}
...
]
}
}
Parameters are described below.
Parameter |
Description |
AccountManagementResponse object |
|
|
Array of
The items in the array are in the same order as the objects in the |
AccountActionResult object |
|
|
ID of the shared account that settings were successfully changed for. |
|
Array of |
Error object |
|
|
Error code. |
|
Textual message about the error. |
|
Detailed description of the reason for the error. |
Examples of input data
Python
{
'Action': 'Update',
'Accounts': [
{
'AccountID': 1327944,
'SmsNotification': {
'MoneyInSms': 'Yes',
'MoneyOutSms': 'Yes'
},
'EmailNotification': {
'Email': 'agrom@yandex.ru',
'MoneyWarningValue': 25
}
}
]
}
PHP
array(
'Action' => 'Update',
'Accounts' => array(
array(
'AccountID' => 1327944,
'SmsNotification' => array(
'MoneyInSms' => 'Yes',
'MoneyOutSms' ='Yes'
),
'EmailNotification' => array(
'Email' => 'agrom@yandex.ru',
'MoneyWarningValue' =25
)
)
)
)
Perl
{
'Action' => 'Update',
'Accounts' => [
{
'AccountID' => 1327944,
'SmsNotification' ={
'MoneyInSms' => 'Yes',
'MoneyOutSms' ='Yes'
},
'EmailNotification' ={
'Email' => 'agrom@yandex.ru',
'MoneyWarningValue' =25
}
}
]
}