CreateNewSubclient (Live)

Registers a client of an advertising agency in Yandex and creates an account in Yandex.Direct.

Attention.

This method is outdated and will soon be disabled. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the Migration guide.

This method is available only to advertising agencies, not to direct advertisers. For agencies, access is provided on request.

Attention.

As of October 10, 2016, advertising agencies can only register clients who are using a real currency. Registration of clients who use Yandex units has been disabled. Accordingly, the logic of the method has changed.

If the agency has a single allowed currency and the Currency parameter is omitted or is set to "cu", the client is created in the agency's currency.

If the agency has multiple currencies available, the Currency parameter is required. If this parameter is omitted or is set to "cu", the method returns an error.

Restrictions

No more than 100 clients can be registered per day.

New in the Live 4 version

Added the Currency input parameter.

Input data

The input data structure in JSON is shown below.

{
   "method": "CreateNewSubclient",
   "param": {
      /* CreateNewSubclientRequest */
      "Login": (string),
      "Name": (string),
      "Surname": (string),
      "Currency": (string)
   }
}

Parameters are described below.

ParameterDescriptionRequired
CreateNewSubclientRequest object
Login

Client's username for registration on Yandex.

This username is used to create a Yandex account, so the username must be unique. Otherwise, the error message 252 is returned.

We do not recommend usernames that have dots in them (they should be replaced with hyphens) or uppercase characters.

Yes
NameClient's name, no more than 20 characters. The following characters are not allowed: &=<>.Yes
SurnameClient's last name, no more than 20 characters. The following characters are not allowed: &=<>.Yes
Currency

The currency that is used for the client's accounts.

Available currencies are shown in the ClientCurrencies output parameter for the GetClientInfo (Live) method.

Yes

Output data

The output data structure in JSON is shown below.

{
   "data": {
      /* CreateNewSubclientResponse */
      "Login": (string),
      "Password": (string),
      "FIO": (string),
      "Email": (string),
      "ClientID": (int)
   }
}

Parameters are described below.

ParameterDescription
CreateNewSubclientResponse object
Login

The Yandex username.

Password

Automatically generated password.

The client can use this password and username to log in on Yandex.

FIO

Last name and initials.

Email

The email address to send notifications and news to.

ClientIDClient ID.

Examples of input data

Python

{
   'Login': 'agrom',
   'Name': 'Alex',
   'Surname': 'Gromov',
   'Currency': 'cu'
}

PHP

array(
   'Login' => 'agrom',
   'Name' => 'Alex',
   'Surname' => 'Gromov',
   'Currency' => 'cu'
)

Perl

{
   'Login' => 'agrom',
   'Name' => 'Alex',
   'Surname' => 'Gromov',
   'Currency' => 'cu'
}