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.

Parameter Description Required
AccountManagementRequest object
Action Action: Get. Yes
SelectionCriteria The 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.
AccountIDS Array 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.

Parameter Description
AccountManagementResponse object
Accounts Array 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
AccountID ID of the shared account.
Amount The current balance of the shared account (in the shared account currency specified in the Currency parameter).
AmountAvailableForTransfer The 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. If this parameter is omitted or NULL, Yandex units are used.

Login The username of the advertiser who owns the shared account.
Discount The advertiser's current discount, as a percent. Currently not used.
AgencyName Name 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).

The minimum acceptable value is shown in the section Currency parameters and limits.

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
MoneyInSms Notify when funds are credited to the shared account — Yes/No.
MoneyOutSms Notify when funds are debited from the shared account — Yes/No.
PausedByDayBudgetSms Notify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No.
SmsTimeFrom 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).
SmsTimeTo 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).
EmailNotificationInfo object
Email The email address for sending notifications of events related to the shared account.
MoneyWarningValue 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.
PausedByDayBudget Notify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No.
AccountActionResult object
AccountID ID of the shared account that the error occurred for (if the AccountIDS input array was set).
Login Username of the advertiser that the error occurred for (if the Logins input array was set).
Errors Array of Error objects with errors that occurred while getting information.
Error object
FaultCode Error code.
FaultString Textual message about the error.
FaultDetail Detailed 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]
   }
}