Get

Returns parameters of shared accounts.

Input data

The input data structure in JSON is shown below.

{
   "method": "AccountManagement",
   "param": {
      /* AccountManagementRequest */
      "Action": (string),
      "SelectionCriteria": {
         /* AccountSelectionCriteria */
         "Logins": [
            (string)
            ...
         ],
         "AccountIDS": [
            (int)
            ...
         ]
      }
   }
}

Parameters are described below.

ParameterDescriptionRequired
AccountManagementRequest object
ActionAction: Get.Yes
SelectionCriteriaThe AccountSelectionCriteria object, which contains criteria for selecting shared accounts.For agencies
AccountSelectionCriteria object
Logins

For agencies, an array containing the usernames of advertisers (no more than 50) to get the shared accounts for.

For advertisers, it is acceptable to specify a single username (your own).

For agencies, one of the parameters Logins or AccountIDS.
AccountIDSArray of IDS for shared accounts (no more than 100).
Notes
  1. For advertisers, both the Logins and AccountIDS parameters are optional, but one of them can be set. If the SelectionCriteria structure is empty or omitted, all shared accounts are returned (in rare cases, an advertiser may have multiple shared accounts).

  2. For agencies, one of the parameters must be set: either Logins, or AccountIDS.

Output data

The output data structure in JSON is shown below.

{
   "data": {
      /* AccountManagementResponse */
      "Accounts": [
         {  /* Account */
            "AccountID": (int),
            "Amount": (float),
            "AmountAvailableForTransfer": (float),
            "Currency": (string),
            "Login": (string),
            "Discount": (float),
            "AgencyName": (string),
            "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)
            }
         }
         ...
      ],
      "ActionsResult": [
         {  /* AccountActionResult */
            
            "AccountID": (int),
            "Login": (string),
            "Errors": [
               {  /* Error */
                  "FaultCode": (int),
                  "FaultString": (string),
                  "FaultDetail": (string)
               }
               ...
            ]
         }
         ...
      ]
   }
}

Parameters are described below.

ParameterDescription
AccountManagementResponse object
AccountsArray of Account objects. Each object contains the parameters of a shared account.
ActionResult

Array of AccountActionResult objects Contains data on errors that occurred when getting information about shared accounts.

Account object
AccountIDID of the shared account.
AmountThe current balance of the shared account (in the shared account currency specified in the Currency parameter).
AmountAvailableForTransferThe amount available to transfer using the TransferMoney operation (in the currency specified in the Currency parameter).
Currency

The currency used for the shared account.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN.

LoginThe username of the advertiser who owns the shared account.
DiscountThe advertiser's current discount, as a percent. Currently not used.
AgencyNameName of the advertising agency that maintains the account. For accounts that are maintained by the advertiser without assistance, this parameter is omitted or equal to NULL.
AccountDayBudget

The AccountDayBudgetInfo object with parameters for the daily limit on the shared account.

SmsNotification

The SmsNotificationInfo object with parameters for sending SMS notifications.

To get notifications, you must subscribe to them (see the Help section Subscribe to SMS notifications). The phone number to send notifications to is taken from the user data (see the Help section Mobile numbers).

EmailNotification

The EmailNotificationInfo object with parameters for sending notifications by email.

AccountDayBudgetInfo object
Amount

The daily budget of the shared account (in the shared account currency specified in the Currency parameter).

SpendMode

Mode for displaying ads:

  • Default — Standard mode.

  • Stretched — Distributed mode.

See Daily 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.

SmsNotificationInfo object
MoneyInSmsNotify when funds are credited to the shared account — Yes/No.
MoneyOutSmsNotify when funds are debited from the shared account — Yes/No.
PausedByDayBudgetSmsNotify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No.
SmsTimeFromThe 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).
SmsTimeToThe 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).
EmailNotificationInfo object
EmailThe email address for sending notifications of events related to the shared account.
MoneyWarningValueThe 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.
PausedByDayBudgetNotify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No.
AccountActionResult object
AccountIDID of the shared account that the error occurred for (if the AccountIDS input array was set).
LoginUsername of the advertiser that the error occurred for (if the Logins input array was set).
ErrorsArray of Error objects with errors that occurred while getting information.
Error object
FaultCodeError code.
FaultStringTextual message about the error.
FaultDetailDetailed description of the reason for the error.

Examples of input data

Python

{
   'Action': 'Get',
   'SelectionCriteria': {
      'AccountIDS': [1327944, 1327974]
   }
}

PHP

array(
   'Action' => 'Get',
   'SelectionCriteria' => array(
      'AccountIDS' => array(1327944, 1327974)
   )
)

Perl

{
   'Action' => 'Get',
   'SelectionCriteria' => {
      'AccountIDS' => [1327944, 1327974]
   }
}