Market for partners

Enabling Quick Order

The Quick Order interface lets users who are making an order automatically fill in the form on your store's site with the delivery address. It uses data stored in the user's Yandex profile.

Put a special button on the order form page on your store's site. When arranging delivery, the user can click this button to go to his Yandex profile, where he can choose any address that has been saved there. After making a selection, the user is taken back to the store's page that was specified when installing the button. The same page is passed the parameters with the selected address. This means the user does not have to fill in the address fields in the order form every time.

To use the Quick Order interface, you must complete the following actions in this order:

Step 1. Enable the interface

To enable the interface, fill out the registration form. This form must specify the URL of the page to send the delivery address parameters to and to redirect the user to after selecting an address.

After registration, you will be offered the button code, which you will need to install on your store's order form. The url_id parameter will also be generated.

Then you can go to the next step — installing the button on your store's website.

Step 2. Installing the button

After enabling the interface, you need to add the button with the label Адрес из профиля в Яндексе in the form. You can use the button code given to you after registration, or construct your own code.

The button URL must have the format:

http://market.yandex.ru/addresses.xml?callback={callback_url}&size={mini}&type={xml|json}

and contain the following parameters:

  • callback — Mandatory parameter. It contains the URL specified when enabling the interface for sending delivery address parameters and redirecting the user after selecting an address. The URL must be URL-encoded.

  • size — Optional parameter. Acceptable value: mini. Intended for displaying the delivery address interface in a small window.

  • type — Optional parameter. Sets the format for passing the address selected by the user to the store's page. Acceptable values: json, xml. When this parameter is omitted, the address is passed as “key=value” pairs separated by the & character.

Example of the button URL:
http://market.yandex.ru/addresses.xml?callback=http%3A%2F%2Fexample.org%2Fshop%2Forder&size=mini&type=json
Examples of button appearance:

Step 3. Data transfer

Once the interface has been enabled and the button has been installed, the user can fill in the address form automatically. When clicking the button, the user goes to his Yandex profile.

If the user is not authenticated in Yandex, he will be asked to log in. If he refuses to log in, the user is returned to your store's page with the address form.

If an authenticated user does not have any addresses in the Yandex profile, this user can enter addresses and save them to use later.

An authenticated user who has addresses saved in the Yandex profile can select any address for delivering the order. After selecting the address, the user is redirected to the URL that was specified when enabling the interface. Data from the selected address is passed to the same URL as a POST request.

If the button URL does not have the type parameter, the following parameters are passed in the POST request:

  • operation_id — Unique ID for the operation of passing the address (string).

  • id — Address ID (integer).

  • title — Address name (string).

  • street — Street (string).

  • building — Building number (integer).

  • suite — Building unit (string).

  • flat — Apartment (integer).

  • entrance — Entrance number (integer).

  • floor — Floor number (integer).

  • intercom — Entry phone (string).

  • city — City (string).

  • country — Country (string).

  • zip — Mailing index (integer).

  • metro — Metro station (string).

  • cargolift — Whether there is a large-capacity elevator (“yes” if there is, “no” if there isn't).

  • firstname — Name (string).

  • lastname — Surname (string).

  • fathersname — Patronymic (string).

  • phone — Phone number (string).

  • phone-extra — Additional phone number (string).

  • email — Email address for contact (string).

  • comment — Comments on the address (string).

If the button URL has the type parameter, the following parameters are passed in the POST request:

  • operation_id — Unique ID for the operation of passing the address (string).

  • address — The URL-encoded delivery address and user information in the format specified in the type parameter (xml or json).

Example of values for the address parameter in json format (after declaring special symbols):
"{"id":"131420142986084","title":"Домашний","street":"Широкая","building":"1","suite":"1",
"flat":"116","entrance":"1","floor":"7","intercom":"116#22","city":"Санкт-Петербург","country":"Россия",
"zip":"192197","metro":"","cargolift":"yes","firstname":"Ваня","lastname":"Иванов","fathersname":"Иванович",
"phone":"+7 812 123-23-23","phone-extra":"","comment":"Теперь эта улица называется
Ленина","email":"example@yandex.ru"}"
Example of values for the address parameter in xml format (after declaring special symbols):
"<address><id><![CDATA[131420142986084]]></id><title><![CDATA[Домашний]]></title>
<street><![CDATA[Широкая]]></street><building><![CDATA[1]]></building><suite><![CDATA[1]]></suite>
<flat><![CDATA[116]]></flat><entrance><![CDATA[1]]></entrance><floor><![CDATA[7]]></floor>
<intercom><![CDATA[116#22]]></intercom><city><![CDATA[Санкт-Петербург]]></city>
<country><![CDATA[Россия]]></country><zip><![CDATA[192197]]></zip><metro><![CDATA[]]></metro>
<cargolift><![CDATA[yes]]></cargolift><firstname><![CDATA[Ваня]]></firstname>
<lastname><![CDATA[Иванов]]></lastname><fathersname><![CDATA[Иванович]]></fathersname>
<phone><![CDATA[+7 812 123-23-23]]></phone><phone-extra><![CDATA[]]></phone-extra>
<comment><![CDATA[Теперь эта улица называется Ленина]]></comment>
<email><![CDATA[example@yandex.ru]]></address>"

If the URL for the redirect page in the request string contains parameters, these parameters will also be passed in the POST request together with the user's address.

Rate this article
Thank you for your feedback!