InSales API documentation

Accessories

Create accessory

Endpoint

POST /admin/accessories.xml

Parameters

Name Description
accessory[name] required Наименование
accessory[max_count] required Максимальное количество опций в заказе
accessory[min_count] required Минимальное количество опций в заказе
accessory[permalink] required Идентификатор

Request

Route

POST /admin/accessories.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory>
  <name>Опция 1</name>
  <max-count type="integer">3</max-count>
  <min-count type="integer">2</min-count>
  <permalink>opcia-1</permalink>
</accessory>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory>
  <id type="integer">33</id>
  <account-id type="integer">1</account-id>
  <name-translations type="array">
    <name-translation>Опция 1</name-translation>
  </name-translations>
  <min-count type="integer">2</min-count>
  <max-count type="integer">3</max-count>
  <created-at type="dateTime">2025-02-11T00:57:45+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:45+03:00</updated-at>
  <back-office-name>Опция 1</back-office-name>
  <permalink>opcia-1</permalink>
  <name>Опция 1</name>
</accessory>

Destroy accessory

Endpoint

DELETE /admin/accessories/:accessory_id.xml

Request

Route

DELETE /admin/accessories/61.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory>
  <id type="integer">61</id>
  <account-id type="integer">1</account-id>
  <name-translations type="array">
    <name-translation>Удовлетворительный Хлопковый Кулон</name-translation>
  </name-translations>
  <min-count type="integer">4</min-count>
  <max-count type="integer">9</max-count>
  <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
  <back-office-name>Маленький Железный Свитер</back-office-name>
  <permalink>est_alias</permalink>
  <name>Удовлетворительный Хлопковый Кулон</name>
</accessory>

Get accessories

Endpoint

GET /admin/accessories.xml

Request

Route

GET /admin/accessories.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessories type="array">
  <accessory>
    <id type="integer">1</id>
    <account-id type="integer">1</account-id>
    <name-translations type="array">
      <name-translation>Опция 0</name-translation>
    </name-translations>
    <min-count type="integer">1</min-count>
    <max-count type="integer">8</max-count>
    <created-at type="dateTime">2025-02-11T00:57:44+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:44+03:00</updated-at>
    <back-office-name>Эргономичный Пластиковый Часы</back-office-name>
    <permalink>consequatur_recusandae</permalink>
    <name>Опция 0</name>
  </accessory>
  <accessory>
    <id type="integer">2</id>
    <account-id type="integer">1</account-id>
    <name-translations type="array">
      <name-translation>Опция 1</name-translation>
    </name-translations>
    <min-count type="integer">3</min-count>
    <max-count type="integer">4</max-count>
    <created-at type="dateTime">2025-02-11T00:57:44+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:44+03:00</updated-at>
    <back-office-name>Аэродинамический Пластиковый Ботинок</back-office-name>
    <permalink>officia_consequuntur</permalink>
    <name>Опция 1</name>
  </accessory>
  <accessory>
    <id type="integer">3</id>
    <account-id type="integer">1</account-id>
    <name-translations type="array">
      <name-translation>Опция 2</name-translation>
    </name-translations>
    <min-count type="integer">1</min-count>
    <max-count type="integer">4</max-count>
    <created-at type="dateTime">2025-02-11T00:57:44+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:44+03:00</updated-at>
    <back-office-name>Тяжёлый Льняной Нож</back-office-name>
    <permalink>aut_ipsum</permalink>
    <name>Опция 2</name>
  </accessory>
  <accessory>
    <id type="integer">4</id>
    <account-id type="integer">1</account-id>
    <name-translations type="array">
      <name-translation>Опция 0</name-translation>
    </name-translations>
    <min-count type="integer">1</min-count>
    <max-count type="integer">5</max-count>
    <created-at type="dateTime">2025-02-11T00:57:44+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:44+03:00</updated-at>
    <back-office-name>Эргономичный Бронзовый Свитер</back-office-name>
    <permalink>incidunt_vitae</permalink>
    <name>Опция 0</name>
  </accessory>
  <accessory>
    <id type="integer">5</id>
    <account-id type="integer">1</account-id>
    <name-translations type="array">
      <name-translation>Опция 1</name-translation>
    </name-translations>
    <min-count type="integer">2</min-count>
    <max-count type="integer">4</max-count>
    <created-at type="dateTime">2025-02-11T00:57:44+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:44+03:00</updated-at>
    <back-office-name>Тяжёлый Мраморный Стол</back-office-name>
    <permalink>iure_ea</permalink>
    <name>Опция 1</name>
  </accessory>
  <accessory>
    <id type="integer">6</id>
    <account-id type="integer">1</account-id>
    <name-translations type="array">
      <name-translation>Опция 2</name-translation>
    </name-translations>
    <min-count type="integer">2</min-count>
    <max-count type="integer">7</max-count>
    <created-at type="dateTime">2025-02-11T00:57:44+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:44+03:00</updated-at>
    <back-office-name>Удовлетворительный Шелковый Стул</back-office-name>
    <permalink>perferendis_quidem</permalink>
    <name>Опция 2</name>
  </accessory>
</accessories>

Get accessory

Endpoint

GET /admin/accessories/:accessory_id.xml

Request

Route

GET /admin/accessories/19.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory>
  <id type="integer">19</id>
  <account-id type="integer">1</account-id>
  <name-translations type="array">
    <name-translation>Лоснящийся Льняной Скамья</name-translation>
  </name-translations>
  <min-count type="integer">3</min-count>
  <max-count type="integer">3</max-count>
  <created-at type="dateTime">2025-02-11T00:57:45+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:45+03:00</updated-at>
  <back-office-name>Удовлетворительный Кожаный Берет</back-office-name>
  <permalink>ut_commodi</permalink>
  <name>Лоснящийся Льняной Скамья</name>
</accessory>

Update accessory

Endpoint

PUT /admin/accessories/:accessory_id.xml

Parameters

Name Description
accessory[name] Наименование
accessory[max_count] Максимальное количество опций в заказе
accessory[min_count] Минимальное количество опций в заказе
accessory[permalink] Идентификатор

Request

Route

PUT /admin/accessories/47.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory>
  <name>Опция 1</name>
  <max-count type="integer">5</max-count>
  <min-count type="integer">2</min-count>
  <permalink>opcia-1</permalink>
</accessory>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory>
  <account-id type="integer">1</account-id>
  <name>Опция 1</name>
  <min-count type="integer">2</min-count>
  <max-count type="integer">5</max-count>
  <permalink>opcia-1</permalink>
  <id type="integer">47</id>
  <name-translations type="array">
    <name-translation>Опция 1</name-translation>
  </name-translations>
  <created-at type="dateTime">2025-02-11T00:57:45+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:45+03:00</updated-at>
  <back-office-name>Эргономичный Льняной Клавиатура</back-office-name>
</accessory>

AccessoryValues

Create accessory value

Endpoint

POST /admin/accessories/:accessory_id/values.xml

Parameters

Name Description
accessory_value[name] required Название
accessory_value[price] required Цена
accessory_value[accounting_variant_id] Идентификатор списываемого товара

Request

Route

POST /admin/accessories/73/values.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-value>
  <name>Значение опции</name>
  <price type="float">100.0</price>
  <accounting-variant-id nil="true"/>
</accessory-value>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-value>
  <id type="integer">36</id>
  <account-id type="integer">1</account-id>
  <accessory-id type="integer">73</accessory-id>
  <name-translations type="array">
    <name-translation>Значение опции</name-translation>
  </name-translations>
  <price type="decimal">100.0</price>
  <accounting-variant-id type="integer" nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:47+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:47+03:00</updated-at>
  <name>Значение опции</name>
</accessory-value>

Destroy accessory value

Endpoint

DELETE /admin/accessories/:accessory_id/values/:accessory_value_id.xml

Request

Route

DELETE /admin/accessories/77/values/59.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-value>
  <id type="integer">59</id>
  <account-id type="integer">1</account-id>
  <accessory-id type="integer">77</accessory-id>
  <name-translations type="array">
    <name-translation>Значение опции</name-translation>
  </name-translations>
  <price type="decimal">4.85</price>
  <accounting-variant-id type="integer" nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:47+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:47+03:00</updated-at>
  <name>Значение опции</name>
</accessory-value>

Get accessory value

Endpoint

GET /admin/accessories/:accessory_id/values/:accessory_value_id.xml

Request

Route

GET /admin/accessories/71/values/15.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-value>
  <id type="integer">15</id>
  <account-id type="integer">1</account-id>
  <accessory-id type="integer">71</accessory-id>
  <name-translations type="array">
    <name-translation>Значение опции</name-translation>
  </name-translations>
  <price type="decimal">6.63</price>
  <accounting-variant-id type="integer" nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
  <name>Значение опции</name>
</accessory-value>

Get accessory values

Endpoint

GET /admin/accessories/:accessory_id/values.xml

Request

Route

GET /admin/accessories/69/values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-values type="array">
  <accessory-value>
    <id type="integer">1</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции</name-translation>
    </name-translations>
    <price type="decimal">8.83</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции</name>
  </accessory-value>
  <accessory-value>
    <id type="integer">2</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции 0</name-translation>
    </name-translations>
    <price type="decimal">9.45</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции 0</name>
  </accessory-value>
  <accessory-value>
    <id type="integer">3</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции 1</name-translation>
    </name-translations>
    <price type="decimal">2.82</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции 1</name>
  </accessory-value>
  <accessory-value>
    <id type="integer">4</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции 2</name-translation>
    </name-translations>
    <price type="decimal">8.07</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции 2</name>
  </accessory-value>
  <accessory-value>
    <id type="integer">5</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции 0</name-translation>
    </name-translations>
    <price type="decimal">5.32</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции 0</name>
  </accessory-value>
  <accessory-value>
    <id type="integer">6</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции 1</name-translation>
    </name-translations>
    <price type="decimal">5.13</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции 1</name>
  </accessory-value>
  <accessory-value>
    <id type="integer">7</id>
    <account-id type="integer">1</account-id>
    <accessory-id type="integer">69</accessory-id>
    <name-translations type="array">
      <name-translation>Значение опции 2</name-translation>
    </name-translations>
    <price type="decimal">2.07</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:46+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:46+03:00</updated-at>
    <name>Значение опции 2</name>
  </accessory-value>
</accessory-values>

Update accessory value

Endpoint

PUT /admin/accessories/:accessory_id/values/:accessory_value_id.xml

Parameters

Name Description
accessory_value[name] Название
accessory_value[price] Цена
accessory_value[accounting_variant_id] Идентификатор списываемого товара

Request

Route

PUT /admin/accessories/75/values/45.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-value>
  <name>Обновлённое значение опции</name>
  <price type="float">200.0</price>
  <accounting-variant-id nil="true"/>
</accessory-value>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<accessory-value>
  <accessory-id type="integer">75</accessory-id>
  <name>Обновлённое значение опции</name>
  <price type="decimal">200.0</price>
  <accounting-variant-id type="integer" nil="true"/>
  <name-translations type="array">
    <name-translation>Обновлённое значение опции</name-translation>
  </name-translations>
  <id type="integer">45</id>
  <account-id type="integer">1</account-id>
  <created-at type="dateTime">2025-02-11T00:57:47+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:47+03:00</updated-at>
</accessory-value>

Account

Get account

Endpoint

GET admin/account.xml

Request

Route

GET admin/account.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<account>
  <id type="integer">1</id>
  <subdomain>quentin</subdomain>
  <organization>InSales, ltd</organization>
  <contact-phone>+79993332211</contact-phone>
  <notification-email nil="true"/>
  <inviter-id type="integer" nil="true"/>
  <blocked type="boolean">false</blocked>
  <created-at type="timestamp">2008-12-31 03:00:00 +0300</created-at>
  <hide-items-out-of-stock type="boolean">false</hide-items-out-of-stock>
  <country nil="true"/>
  <city nil="true"/>
  <enable-order-discounts type="boolean">false</enable-order-discounts>
  <enable-client-discounts type="boolean">false</enable-client-discounts>
  <enable-group-discounts type="boolean">false</enable-group-discounts>
  <enable-cart-discounts type="boolean">false</enable-cart-discounts>
  <state nil="true"/>
  <registration-type-id type="integer">0</registration-type-id>
  <paid-till type="date">2009-03-02</paid-till>
  <sms-notification-phone nil="true"/>
  <default-vat type="integer">10</default-vat>
  <email>somone@anyone.com</email>
  <icq nil="true"/>
  <phone>+7 812 309 51 21</phone>
  <title>My account</title>
  <minimum-items-price nil="true"/>
  <stock-currency-exchange-rate type="decimal">30.0</stock-currency-exchange-rate>
  <client-cookies-whitelist nil="true"/>
  <main-host>quentin.insales.io:3002</main-host>
  <main-host-protocol>http</main-host-protocol>
  <next-order-number type="integer">1006</next-order-number>
  <time-zone nil="true"/>
  <owner>
    <id type="integer">1</id>
    <name>quentin</name>
    <created-at type="timestamp">2025-02-06 00:57:02 +0300</created-at>
  </owner>
</account>

Update account

Endpoint

PUT /admin/account.xml

Parameters

Name Description
account[client_cookies_whitelist] cookies whitelist

Request

Route

PUT /admin/account.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<account>
  <client-cookies-whitelist>my_cookie</client-cookies-whitelist>
</account>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

ApplicationAction

Create application_action

Endpoint

POST /admin/application_actions.xml

Parameters

Name Description
application_action[title] required title to show in backoffice
application_action[handle] required unique string identifier
application_action[entity] required string, defines entity that action belongs to: order, product, client, discount_code, file, page, article, collection_filter
application_action[url] required URL to which POST request with serialized entities will be made

Request

Route

POST /admin/application_actions.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-action>
  <title>backoffice title</title>
  <handle>unique_handle</handle>
  <entity>product</entity>
  <url>http://www.yandex.ru</url>
</application-action>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-action>
  <id type="integer">2</id>
  <title>backoffice title</title>
  <url>http://www.yandex.ru</url>
  <handle>unique_handle</handle>
  <entity>product</entity>
</application-action>

Destroy application_action

Endpoint

DELETE /admin/application_actions/:application_action_id.xml

Request

Route

DELETE /admin/application_actions/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get application actions

Endpoint

GET /admin/application_actions.xml

Request

Route

GET /admin/application_actions.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-actions type="array">
  <application-action>
    <id type="integer">1</id>
    <title>test</title>
    <url>http://www.google.ru</url>
    <handle>test</handle>
    <entity>order</entity>
  </application-action>
</application-actions>

Get application_action

Endpoint

GET /admin/application_actions/:application_action_id.xml

Request

Route

GET /admin/application_actions/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-action>
  <id type="integer">1</id>
  <title>test</title>
  <url>http://www.google.ru</url>
  <handle>test</handle>
  <entity>order</entity>
</application-action>

Update application_action

Endpoint

PUT /admin/application_actions/:application_action_id.xml

Parameters

Name Description
application_action[title] title to show in backoffice
application_action[handle] unique string identifier
application_action[entity] string, defines entity that action belongs to: order, product, client, discount_code, file, page, article, collection_filter
application_action[url] URL to which POST request with serialized entities will be made

Request

Route

PUT /admin/application_actions/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-action>
  <title>new  title</title>
  <handle>new_unique_handle</handle>
  <entity>client</entity>
  <url>http://www.yandex.ru</url>
</application-action>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-action>
  <id type="integer">1</id>
  <title>new  title</title>
  <url>http://www.yandex.ru</url>
  <handle>new_unique_handle</handle>
  <entity>client</entity>
</application-action>

ApplicationCharge

Create application_charge

Endpoint

POST /admin/application_charges.xml

Parameters

Name Description
application_charge[name] required purpose of payment
application_charge[price] required bill amount
application_charge[return_url] url for notification about payment
application_charge[test] flag for debugging purpose; if true, bill can be confirmed without payment; false by default

Request

Route

POST /admin/application_charges.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <name>Payment for premium</name>
  <price type="integer">300</price>
  <return-url>http://app.my/check_payment_url/%id_in_my_application%</return-url>
  <test type="boolean">true</test>
</application-charge>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <id type="integer">6</id>
  <name>Payment for premium</name>
  <price type="decimal">300.0</price>
  <return-url>http://app.my/check_payment_url/%id_in_my_application%</return-url>
  <test type="boolean">true</test>
  <created-at type="dateTime">2025-02-11T00:57:05+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:05+03:00</updated-at>
  <confirmation-url>https://quentin.insales.io:3002/admin/application_charges/6</confirmation-url>
  <status>pending</status>
</application-charge>

Decline application_charge

Only bill with status ‘pending’ can be declined.

Endpoint

POST /admin/application_charges/:application_charge_id/decline.xml

Request

Route

POST /admin/application_charges/9/decline.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <id type="integer">9</id>
  <name>Pay</name>
  <price type="decimal">180.0</price>
  <return-url>http://applicaiton.my/check_payment_url/%id_in_my_application%</return-url>
  <test type="boolean" nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:05+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:05+03:00</updated-at>
  <confirmation-url>https://quentin.insales.io:3002/admin2/invoices/7</confirmation-url>
  <status>declined</status>
</application-charge>

Get application_charge

Endpoint

GET /admin/application_charges/:application_charge_id.xml

Request

Route

GET /admin/application_charges/3.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <id type="integer">3</id>
  <name>Pay</name>
  <price type="decimal">180.0</price>
  <return-url>http://applicaiton.my/check_payment_url/%id_in_my_application%</return-url>
  <test type="boolean" nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:04+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:04+03:00</updated-at>
  <confirmation-url>https://quentin.insales.io:3002/admin2/invoices/3</confirmation-url>
  <status>pending</status>
</application-charge>

Get application_charges

Endpoint

GET /admin/application_charges.xml

Request

Route

GET /admin/application_charges.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charges type="array">
  <application-charge>
    <id type="integer">1</id>
    <name>Pay</name>
    <price type="decimal">180.0</price>
    <return-url>http://applicaiton.my/check_payment_url/%id_in_my_application%</return-url>
    <test type="boolean" nil="true"/>
    <created-at type="dateTime">2025-02-11T00:57:03+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:03+03:00</updated-at>
    <confirmation-url>https://quentin.insales.io:3002/admin2/invoices/1</confirmation-url>
    <status>pending</status>
  </application-charge>
</application-charges>

ApplicationWidget

Create application_widget

Endpoint

POST /admin/application_widgets.xml

Parameters

Name Description
application_widget[code] required html or javascript code of widget
application_widget[height] required height of iframe block
application_widget[page_type] product or order

Request

Route

POST /admin/application_widgets.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <code>some html or javascript code</code>
  <height type="integer">70</height>
  <page-type>order</page-type>
</application-widget>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <id type="integer">6</id>
  <code>some html or javascript code</code>
  <created-at type="dateTime">2025-02-11T00:57:06+03:00</created-at>
  <height type="integer">70</height>
  <page-type>order</page-type>
</application-widget>

Destroy application_widget

Endpoint

DELETE /admin/application_widgets/:application_widget_id.xml

Request

Route

DELETE /admin/application_widgets/11.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get application_widget

Endpoint

GET /admin/application_widgets/:application_widget_id.xml

Request

Route

GET /admin/application_widgets/3.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <id type="integer">3</id>
  <code>html/js code</code>
  <created-at type="dateTime">2025-02-11T00:57:05+03:00</created-at>
  <height type="integer">50</height>
  <page-type>product</page-type>
</application-widget>

Get application_widgets

Endpoint

GET /admin/application_widgets.xml

Request

Route

GET /admin/application_widgets.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widgets type="array">
  <application-widget>
    <id type="integer">1</id>
    <code>html/js code</code>
    <created-at type="dateTime">2025-02-11T00:57:05+03:00</created-at>
    <height type="integer">50</height>
    <page-type>product</page-type>
  </application-widget>
</application-widgets>

Update application_widget

Endpoint

PUT /admin/application_widgets/:application_widget_id.xml

Parameters

Name Description
application_widget[code] html or javascript code of widget
application_widget[height] height of iframe block
application_widget[page_type] product or order

Request

Route

PUT /admin/application_widgets/9.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <code>code changed</code>
  <height type="integer">80</height>
  <page-type>order</page-type>
</application-widget>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <code>code changed</code>
  <height type="integer">80</height>
  <page-type>order</page-type>
  <id type="integer">9</id>
  <created-at type="dateTime">2025-02-11T00:57:06+03:00</created-at>
</application-widget>

Article

Create article

Endpoint

POST /admin/blogs/:blog_id/articles.xml

Parameters

Name Description
article[title] required article title
article[content] required article content
article[notice] notice for article
article[published_at] required publication date, the article is invisible to users while publication date > current time
article[author] required article author name
article[permalink] permalink on blog/*
article[html_title] html title tag content
article[meta_keywords] html meta words on page
article[meta_description] html meta description
article[image_attributes] image for article
article[related_products_attributes] goods to attach or detach. An array of hashes with the keys: product_id, _destroy.
article[all_tags] array of all tags for article, max 10 tags
article[pinned] set to true to pin article: it will be always on the top of the blog; only one article can be pinned, so when you pin article, previously pinned article will be unpinned

Request

Route

POST /admin/blogs/1/articles.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <title>new article</title>
  <content>&lt;p&gt;content of my article&lt;p&gt;</content>
  <notice>some notice</notice>
  <published-at>2014-09-09</published-at>
  <author>My Name is panda</author>
  <permalink>first_article</permalink>
  <html-title>HTML TAG TITLE</html-title>
  <meta-keywords>new cool products</meta-keywords>
  <meta-description>It's a article about our new products</meta-description>
  <image-attributes>
    <src>https://abc.myinsales.ru/images/no_image_compact.jpg</src>
  </image-attributes>
  <related-products-attributes type="array">
    <related-products-attribute>
      <product-id type="integer">1</product-id>
    </related-products-attribute>
  </related-products-attributes>
  <all-tags type="array">
    <all-tag>test3</all-tag>
    <all-tag>test4</all-tag>
  </all-tags>
  <pinned type="boolean">true</pinned>
</article>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <id type="integer">5</id>
  <created-at type="timestamp">2025-02-11 00:58:29 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:29 +0300</updated-at>
  <custom-template nil="true"/>
  <published-at type="timestamp">2014-09-09 00:00:00 +0400</published-at>
  <pinned type="boolean">true</pinned>
  <title>new article</title>
  <author>My Name is panda</author>
  <permalink>first_article</permalink>
  <html-title>HTML TAG TITLE</html-title>
  <meta-keywords>new cool products</meta-keywords>
  <meta-description>It's a article about our new products</meta-description>
  <image>
    <id type="integer">2</id>
    <created-at type="timestamp">2025-02-11 00:58:29 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/articles/1/2/2/no_image_compact.jpg?1739224709</original-url>
  </image>
  <tags type="array">
    <tag>
      <title>test3</title>
    </tag>
    <tag>
      <title>test4</title>
    </tag>
  </tags>
  <related-products type="array">
    <related-product type="Product">
      <id type="integer">1</id>
      <category-id type="integer">1</category-id>
      <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
      <updated-at type="timestamp">2015-07-27 17:05:35 +0300</updated-at>
      <is-hidden type="boolean">false</is-hidden>
      <available type="boolean">false</available>
      <archived type="boolean">false</archived>
      <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
      <custom-template nil="true"/>
      <unit>pce</unit>
      <sort-weight type="float" nil="true"/>
      <bundle type="boolean" nil="true"/>
      <ignore-discounts type="boolean" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <title>Cool t-shirt</title>
      <short-description>its a cool t-shirt</short-description>
      <permalink>футболка</permalink>
      <html-title nil="true"/>
      <meta-keywords nil="true"/>
      <meta-description nil="true"/>
      <currency-code>LVL</currency-code>
      <collections-ids type="array">
        <collections-id type="integer">1</collections-id>
        <collections-id type="integer">3</collections-id>
        <collections-id type="integer">8</collections-id>
      </collections-ids>
      <sales-channels-id nil="true"/>
      <images type="array"/>
      <video-links type="array"/>
      <option-names type="array">
        <option-name>
          <id type="integer">1</id>
          <position type="integer">1</position>
          <navigational type="boolean">true</navigational>
          <title>Вариант</title>
        </option-name>
      </option-names>
      <properties type="array">
        <property>
          <id type="integer">6</id>
          <position type="integer">1</position>
          <is-hidden type="boolean">true</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>hidden</permalink>
          <title>hidden</title>
        </property>
        <property>
          <id type="integer">8</id>
          <position type="integer">3</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">false</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>not_navigational</permalink>
          <title>not_navigational</title>
        </property>
        <property>
          <id type="integer">4</id>
          <position type="integer">5</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>style</permalink>
          <title>Style</title>
        </property>
        <property>
          <id type="integer">3</id>
          <position type="integer">6</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>vendor</permalink>
          <title>Vendor</title>
        </property>
      </properties>
      <characteristics type="array">
        <characteristic>
          <id type="integer">7</id>
          <property-id type="integer">3</property-id>
          <position type="integer">1</position>
          <title>Nike</title>
          <permalink>nike</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">9</id>
          <property-id type="integer">4</property-id>
          <position type="integer">1</position>
          <title>Old</title>
          <permalink>old</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">12</id>
          <property-id type="integer">6</property-id>
          <position type="integer">1</position>
          <title>Hidden</title>
          <permalink>Hidden</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">13</id>
          <property-id type="integer">8</property-id>
          <position type="integer">1</position>
          <title>NotNavigational</title>
          <permalink>NotNavigational</permalink>
        </characteristic>
      </characteristics>
      <product-accessory-links type="array"/>
      <product-field-values type="array">
        <product-field-value>
          <id type="integer">1</id>
          <product-field-id type="integer">1</product-field-id>
          <value>some product field value</value>
        </product-field-value>
      </product-field-values>
      <variants type="array">
        <variant>
          <variant-field-values type="array">
            <variant-field-value>
              <id type="integer">1</id>
              <variant-field-id type="integer">1</variant-field-id>
              <value>some variant field value</value>
            </variant-field-value>
          </variant-field-values>
          <option-values type="array">
            <option-value>
              <id type="integer">1</id>
              <option-name-id type="integer">1</option-name-id>
              <position type="integer">1</position>
              <title>Red</title>
              <image-url nil="true"/>
            </option-value>
          </option-values>
          <id type="integer">1</id>
          <title>Red</title>
          <product-id type="integer">1</product-id>
          <sku>423</sku>
          <barcode nil="true"/>
          <dimensions>10x20x30</dimensions>
          <available type="boolean">false</available>
          <image-ids type="array"/>
          <image-id type="integer" nil="true"/>
          <weight type="decimal" nil="true"/>
          <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
          <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
          <quantity type="integer">0</quantity>
          <cost-price type="decimal">3.0</cost-price>
          <cost-price-in-site-currency type="decimal">90.0</cost-price-in-site-currency>
          <price-in-site-currency type="decimal">300.0</price-in-site-currency>
          <base-price type="decimal">10.0</base-price>
          <old-price type="decimal" nil="true"/>
          <price2 type="decimal">12.0</price2>
          <price type="decimal">10.0</price>
          <base-price-in-site-currency type="decimal">300.0</base-price-in-site-currency>
          <old-price-in-site-currency type="decimal" nil="true"/>
          <price2-in-site-currency type="decimal">360.0</price2-in-site-currency>
          <prices type="array">
            <price type="numeric">12.0</price>
          </prices>
          <prices-in-site-currency type="array">
            <price-in-site-currency type="numeric">360.0</price-in-site-currency>
          </prices-in-site-currency>
        </variant>
      </variants>
      <product-bundle-components type="array"/>
      <description>guys, its a really cool t-shirt</description>
    </related-product>
  </related-products>
  <notice>some notice</notice>
  <content>&lt;p&gt;content of my article&lt;p&gt;</content>
</article>

Delete article

Endpoint

DELETE /admin/blogs/:blog_id/articles/:article_id.xml

Request

Route

DELETE /admin/blogs/1/articles/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==
Content-Type: application/x-www-form-urlencoded

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get article

Endpoint

GET /admin/blogs/:blog_id/articles/:article_id.xml

Request

Route

GET /admin/blogs/1/articles/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <id type="integer">2</id>
  <created-at type="timestamp">2025-02-11 00:56:42 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:28 +0300</updated-at>
  <custom-template nil="true"/>
  <published-at type="timestamp">2017-03-01 07:53:15 +0300</published-at>
  <pinned type="boolean">false</pinned>
  <title>Второая Статья</title>
  <author>Ivan</author>
  <permalink>statya-2</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <image>
    <id type="integer">1</id>
    <created-at type="timestamp">2025-02-11 00:56:42 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/articles/1/1/1/article_image_1.jpg</original-url>
  </image>
  <tags type="array">
    <tag>
      <title>test</title>
    </tag>
    <tag>
      <title>test2</title>
    </tag>
  </tags>
  <related-products type="array">
    <related-product type="Product">
      <id type="integer">1</id>
      <category-id type="integer">1</category-id>
      <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
      <updated-at type="timestamp">2015-07-27 17:05:35 +0300</updated-at>
      <is-hidden type="boolean">false</is-hidden>
      <available type="boolean">false</available>
      <archived type="boolean">false</archived>
      <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
      <custom-template nil="true"/>
      <unit>pce</unit>
      <sort-weight type="float" nil="true"/>
      <bundle type="boolean" nil="true"/>
      <ignore-discounts type="boolean" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <title>Cool t-shirt</title>
      <short-description>its a cool t-shirt</short-description>
      <permalink>футболка</permalink>
      <html-title nil="true"/>
      <meta-keywords nil="true"/>
      <meta-description nil="true"/>
      <currency-code>LVL</currency-code>
      <collections-ids type="array">
        <collections-id type="integer">1</collections-id>
        <collections-id type="integer">3</collections-id>
        <collections-id type="integer">8</collections-id>
      </collections-ids>
      <sales-channels-id nil="true"/>
      <images type="array"/>
      <video-links type="array"/>
      <option-names type="array">
        <option-name>
          <id type="integer">1</id>
          <position type="integer">1</position>
          <navigational type="boolean">true</navigational>
          <title>Вариант</title>
        </option-name>
      </option-names>
      <properties type="array">
        <property>
          <id type="integer">6</id>
          <position type="integer">1</position>
          <is-hidden type="boolean">true</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>hidden</permalink>
          <title>hidden</title>
        </property>
        <property>
          <id type="integer">8</id>
          <position type="integer">3</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">false</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>not_navigational</permalink>
          <title>not_navigational</title>
        </property>
        <property>
          <id type="integer">4</id>
          <position type="integer">5</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>style</permalink>
          <title>Style</title>
        </property>
        <property>
          <id type="integer">3</id>
          <position type="integer">6</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>vendor</permalink>
          <title>Vendor</title>
        </property>
      </properties>
      <characteristics type="array">
        <characteristic>
          <id type="integer">7</id>
          <property-id type="integer">3</property-id>
          <position type="integer">1</position>
          <title>Nike</title>
          <permalink>nike</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">9</id>
          <property-id type="integer">4</property-id>
          <position type="integer">1</position>
          <title>Old</title>
          <permalink>old</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">12</id>
          <property-id type="integer">6</property-id>
          <position type="integer">1</position>
          <title>Hidden</title>
          <permalink>Hidden</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">13</id>
          <property-id type="integer">8</property-id>
          <position type="integer">1</position>
          <title>NotNavigational</title>
          <permalink>NotNavigational</permalink>
        </characteristic>
      </characteristics>
      <product-accessory-links type="array"/>
      <product-field-values type="array">
        <product-field-value>
          <id type="integer">1</id>
          <product-field-id type="integer">1</product-field-id>
          <value>some product field value</value>
        </product-field-value>
      </product-field-values>
      <variants type="array">
        <variant>
          <variant-field-values type="array">
            <variant-field-value>
              <id type="integer">1</id>
              <variant-field-id type="integer">1</variant-field-id>
              <value>some variant field value</value>
            </variant-field-value>
          </variant-field-values>
          <option-values type="array">
            <option-value>
              <id type="integer">1</id>
              <option-name-id type="integer">1</option-name-id>
              <position type="integer">1</position>
              <title>Red</title>
              <image-url nil="true"/>
            </option-value>
          </option-values>
          <id type="integer">1</id>
          <title>Red</title>
          <product-id type="integer">1</product-id>
          <sku>423</sku>
          <barcode nil="true"/>
          <dimensions>10x20x30</dimensions>
          <available type="boolean">false</available>
          <image-ids type="array"/>
          <image-id type="integer" nil="true"/>
          <weight type="decimal" nil="true"/>
          <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
          <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
          <quantity type="integer">0</quantity>
          <cost-price type="decimal">3.0</cost-price>
          <cost-price-in-site-currency type="decimal">90.0</cost-price-in-site-currency>
          <price-in-site-currency type="decimal">300.0</price-in-site-currency>
          <base-price type="decimal">10.0</base-price>
          <old-price type="decimal" nil="true"/>
          <price2 type="decimal">12.0</price2>
          <price type="decimal">10.0</price>
          <base-price-in-site-currency type="decimal">300.0</base-price-in-site-currency>
          <old-price-in-site-currency type="decimal" nil="true"/>
          <price2-in-site-currency type="decimal">360.0</price2-in-site-currency>
          <prices type="array">
            <price type="numeric">12.0</price>
          </prices>
          <prices-in-site-currency type="array">
            <price-in-site-currency type="numeric">360.0</price-in-site-currency>
          </prices-in-site-currency>
        </variant>
      </variants>
      <product-bundle-components type="array"/>
      <description>guys, its a really cool t-shirt</description>
    </related-product>
  </related-products>
  <notice>Второй анонс</notice>
  <content>Привет</content>
</article>

Get articles list

Endpoint

GET /admin/blogs/:blog_id/articles.xml

Request

Route

GET /admin/blogs/1/articles.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<articles type="array">
  <article>
    <id type="integer">2</id>
    <created-at type="timestamp">2025-02-11 00:56:42 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:58:28 +0300</updated-at>
    <custom-template nil="true"/>
    <published-at type="timestamp">2017-03-01 07:53:15 +0300</published-at>
    <pinned type="boolean">false</pinned>
    <title>Второая Статья</title>
    <author>Ivan</author>
    <permalink>statya-2</permalink>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <image>
      <id type="integer">1</id>
      <created-at type="timestamp">2025-02-11 00:56:42 +0300</created-at>
      <original-url>http://minio.insales.io:9000/insales-test-sber/images/articles/1/1/1/article_image_1.jpg</original-url>
    </image>
    <tags type="array">
      <tag>
        <title>test</title>
      </tag>
      <tag>
        <title>test2</title>
      </tag>
    </tags>
    <related-products type="array">
      <related-product type="Product">
        <id type="integer">1</id>
        <category-id type="integer">1</category-id>
        <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
        <updated-at type="timestamp">2015-07-27 17:05:35 +0300</updated-at>
        <is-hidden type="boolean">false</is-hidden>
        <available type="boolean">false</available>
        <archived type="boolean">false</archived>
        <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
        <custom-template nil="true"/>
        <unit>pce</unit>
        <sort-weight type="float" nil="true"/>
        <bundle type="boolean" nil="true"/>
        <ignore-discounts type="boolean" nil="true"/>
        <vat type="integer">-1</vat>
        <dimensions>10x20x30</dimensions>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <title>Cool t-shirt</title>
        <short-description>its a cool t-shirt</short-description>
        <permalink>футболка</permalink>
        <html-title nil="true"/>
        <meta-keywords nil="true"/>
        <meta-description nil="true"/>
        <currency-code>LVL</currency-code>
        <collections-ids type="array">
          <collections-id type="integer">1</collections-id>
          <collections-id type="integer">3</collections-id>
          <collections-id type="integer">8</collections-id>
        </collections-ids>
        <sales-channels-id nil="true"/>
        <images type="array"/>
        <video-links type="array"/>
        <option-names type="array">
          <option-name>
            <id type="integer">1</id>
            <position type="integer">1</position>
            <navigational type="boolean">true</navigational>
            <title>Вариант</title>
          </option-name>
        </option-names>
        <properties type="array">
          <property>
            <id type="integer">6</id>
            <position type="integer">1</position>
            <is-hidden type="boolean">true</is-hidden>
            <is-navigational type="boolean">true</is-navigational>
            <backoffice type="boolean">false</backoffice>
            <permalink>hidden</permalink>
            <title>hidden</title>
          </property>
          <property>
            <id type="integer">8</id>
            <position type="integer">3</position>
            <is-hidden type="boolean">false</is-hidden>
            <is-navigational type="boolean">false</is-navigational>
            <backoffice type="boolean">false</backoffice>
            <permalink>not_navigational</permalink>
            <title>not_navigational</title>
          </property>
          <property>
            <id type="integer">4</id>
            <position type="integer">5</position>
            <is-hidden type="boolean">false</is-hidden>
            <is-navigational type="boolean">true</is-navigational>
            <backoffice type="boolean">false</backoffice>
            <permalink>style</permalink>
            <title>Style</title>
          </property>
          <property>
            <id type="integer">3</id>
            <position type="integer">6</position>
            <is-hidden type="boolean">false</is-hidden>
            <is-navigational type="boolean">true</is-navigational>
            <backoffice type="boolean">false</backoffice>
            <permalink>vendor</permalink>
            <title>Vendor</title>
          </property>
        </properties>
        <characteristics type="array">
          <characteristic>
            <id type="integer">7</id>
            <property-id type="integer">3</property-id>
            <position type="integer">1</position>
            <title>Nike</title>
            <permalink>nike</permalink>
          </characteristic>
          <characteristic>
            <id type="integer">9</id>
            <property-id type="integer">4</property-id>
            <position type="integer">1</position>
            <title>Old</title>
            <permalink>old</permalink>
          </characteristic>
          <characteristic>
            <id type="integer">12</id>
            <property-id type="integer">6</property-id>
            <position type="integer">1</position>
            <title>Hidden</title>
            <permalink>Hidden</permalink>
          </characteristic>
          <characteristic>
            <id type="integer">13</id>
            <property-id type="integer">8</property-id>
            <position type="integer">1</position>
            <title>NotNavigational</title>
            <permalink>NotNavigational</permalink>
          </characteristic>
        </characteristics>
        <product-accessory-links type="array"/>
        <product-field-values type="array">
          <product-field-value>
            <id type="integer">1</id>
            <product-field-id type="integer">1</product-field-id>
            <value>some product field value</value>
          </product-field-value>
        </product-field-values>
        <variants type="array">
          <variant>
            <variant-field-values type="array">
              <variant-field-value>
                <id type="integer">1</id>
                <variant-field-id type="integer">1</variant-field-id>
                <value>some variant field value</value>
              </variant-field-value>
            </variant-field-values>
            <option-values type="array">
              <option-value>
                <id type="integer">1</id>
                <option-name-id type="integer">1</option-name-id>
                <position type="integer">1</position>
                <title>Red</title>
                <image-url nil="true"/>
              </option-value>
            </option-values>
            <id type="integer">1</id>
            <title>Red</title>
            <product-id type="integer">1</product-id>
            <sku>423</sku>
            <barcode nil="true"/>
            <dimensions>10x20x30</dimensions>
            <available type="boolean">false</available>
            <image-ids type="array"/>
            <image-id type="integer" nil="true"/>
            <weight type="decimal" nil="true"/>
            <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
            <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
            <quantity type="integer">0</quantity>
            <cost-price type="decimal">3.0</cost-price>
            <cost-price-in-site-currency type="decimal">90.0</cost-price-in-site-currency>
            <price-in-site-currency type="decimal">300.0</price-in-site-currency>
            <base-price type="decimal">10.0</base-price>
            <old-price type="decimal" nil="true"/>
            <price2 type="decimal">12.0</price2>
            <price type="decimal">10.0</price>
            <base-price-in-site-currency type="decimal">300.0</base-price-in-site-currency>
            <old-price-in-site-currency type="decimal" nil="true"/>
            <price2-in-site-currency type="decimal">360.0</price2-in-site-currency>
            <prices type="array">
              <price type="numeric">12.0</price>
            </prices>
            <prices-in-site-currency type="array">
              <price-in-site-currency type="numeric">360.0</price-in-site-currency>
            </prices-in-site-currency>
          </variant>
        </variants>
        <product-bundle-components type="array"/>
        <description>guys, its a really cool t-shirt</description>
      </related-product>
    </related-products>
    <notice>Второй анонс</notice>
    <content>Привет</content>
  </article>
  <article>
    <id type="integer">1</id>
    <created-at type="timestamp">2025-02-11 00:56:42 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:42 +0300</updated-at>
    <custom-template nil="true"/>
    <published-at type="timestamp">2009-03-18 07:53:15 +0300</published-at>
    <pinned type="boolean">false</pinned>
    <title>Статья</title>
    <author>Ivan</author>
    <permalink>statya</permalink>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <tags type="array"/>
    <related-products type="array"/>
    <notice>Первый анонс</notice>
    <content>Первая статья</content>
  </article>
</articles>

Update article

Endpoint

PUT /admin/blogs/:blog_id/articles/:article_id.xml

Parameters

Name Description
article[title] article title
article[content] article content
article[notice] notice for article
article[author] article author name
article[permalink] permalink on blog/*
article[html_title] html title tag content
article[meta_keywords] html meta words on page
article[meta_description] html meta description
article[published_at] publication date, the article is invisible to users while publication date > current time
article[image_attributes] image for article
article[all_tags] array of tags for article, max 10 tags: to remove tags from list - pass the array without this tag, to add tag - pass a full list with a new tag added
article[pinned] set to true to pin article: it will be always on the top of the blog; only one article can be pinned, so when you pin article, previously pinned article will be unpinned

Request

Route

PUT /admin/blogs/1/articles/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <title>new title</title>
  <image-attributes>
    <src>https://abc.myinsales.ru/images/no_image_compact.jpg</src>
  </image-attributes>
  <all-tags type="array">
    <all-tag>test</all-tag>
    <all-tag>test3</all-tag>
  </all-tags>
  <pinned type="boolean">true</pinned>
</article>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <pinned type="boolean">true</pinned>
  <id type="integer">2</id>
  <created-at type="timestamp">2025-02-11 00:56:42 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:32 +0300</updated-at>
  <custom-template nil="true"/>
  <published-at type="timestamp">2017-03-01 07:53:15 +0300</published-at>
  <title>new title</title>
  <author>Ivan</author>
  <permalink>statya-2</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <image>
    <id type="integer">4</id>
    <created-at type="timestamp">2025-02-11 00:58:32 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/articles/1/4/4/no_image_compact.jpg?1739224711</original-url>
  </image>
  <tags type="array">
    <tag>
      <title>test</title>
    </tag>
    <tag>
      <title>test3</title>
    </tag>
  </tags>
  <related-products type="array">
    <related-product type="Product">
      <id type="integer">1</id>
      <category-id type="integer">1</category-id>
      <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
      <updated-at type="timestamp">2015-07-27 17:05:35 +0300</updated-at>
      <is-hidden type="boolean">false</is-hidden>
      <available type="boolean">false</available>
      <archived type="boolean">false</archived>
      <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
      <custom-template nil="true"/>
      <unit>pce</unit>
      <sort-weight type="float" nil="true"/>
      <bundle type="boolean" nil="true"/>
      <ignore-discounts type="boolean" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <title>Cool t-shirt</title>
      <short-description>its a cool t-shirt</short-description>
      <permalink>футболка</permalink>
      <html-title nil="true"/>
      <meta-keywords nil="true"/>
      <meta-description nil="true"/>
      <currency-code>LVL</currency-code>
      <collections-ids type="array">
        <collections-id type="integer">1</collections-id>
        <collections-id type="integer">3</collections-id>
        <collections-id type="integer">8</collections-id>
      </collections-ids>
      <sales-channels-id nil="true"/>
      <images type="array"/>
      <video-links type="array"/>
      <option-names type="array">
        <option-name>
          <id type="integer">1</id>
          <position type="integer">1</position>
          <navigational type="boolean">true</navigational>
          <title>Вариант</title>
        </option-name>
      </option-names>
      <properties type="array">
        <property>
          <id type="integer">6</id>
          <position type="integer">1</position>
          <is-hidden type="boolean">true</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>hidden</permalink>
          <title>hidden</title>
        </property>
        <property>
          <id type="integer">8</id>
          <position type="integer">3</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">false</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>not_navigational</permalink>
          <title>not_navigational</title>
        </property>
        <property>
          <id type="integer">4</id>
          <position type="integer">5</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>style</permalink>
          <title>Style</title>
        </property>
        <property>
          <id type="integer">3</id>
          <position type="integer">6</position>
          <is-hidden type="boolean">false</is-hidden>
          <is-navigational type="boolean">true</is-navigational>
          <backoffice type="boolean">false</backoffice>
          <permalink>vendor</permalink>
          <title>Vendor</title>
        </property>
      </properties>
      <characteristics type="array">
        <characteristic>
          <id type="integer">7</id>
          <property-id type="integer">3</property-id>
          <position type="integer">1</position>
          <title>Nike</title>
          <permalink>nike</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">9</id>
          <property-id type="integer">4</property-id>
          <position type="integer">1</position>
          <title>Old</title>
          <permalink>old</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">12</id>
          <property-id type="integer">6</property-id>
          <position type="integer">1</position>
          <title>Hidden</title>
          <permalink>Hidden</permalink>
        </characteristic>
        <characteristic>
          <id type="integer">13</id>
          <property-id type="integer">8</property-id>
          <position type="integer">1</position>
          <title>NotNavigational</title>
          <permalink>NotNavigational</permalink>
        </characteristic>
      </characteristics>
      <product-accessory-links type="array"/>
      <product-field-values type="array">
        <product-field-value>
          <id type="integer">1</id>
          <product-field-id type="integer">1</product-field-id>
          <value>some product field value</value>
        </product-field-value>
      </product-field-values>
      <variants type="array">
        <variant>
          <variant-field-values type="array">
            <variant-field-value>
              <id type="integer">1</id>
              <variant-field-id type="integer">1</variant-field-id>
              <value>some variant field value</value>
            </variant-field-value>
          </variant-field-values>
          <option-values type="array">
            <option-value>
              <id type="integer">1</id>
              <option-name-id type="integer">1</option-name-id>
              <position type="integer">1</position>
              <title>Red</title>
              <image-url nil="true"/>
            </option-value>
          </option-values>
          <id type="integer">1</id>
          <title>Red</title>
          <product-id type="integer">1</product-id>
          <sku>423</sku>
          <barcode nil="true"/>
          <dimensions>10x20x30</dimensions>
          <available type="boolean">false</available>
          <image-ids type="array"/>
          <image-id type="integer" nil="true"/>
          <weight type="decimal" nil="true"/>
          <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
          <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
          <quantity type="integer">0</quantity>
          <cost-price type="decimal">3.0</cost-price>
          <cost-price-in-site-currency type="decimal">90.0</cost-price-in-site-currency>
          <price-in-site-currency type="decimal">300.0</price-in-site-currency>
          <base-price type="decimal">10.0</base-price>
          <old-price type="decimal" nil="true"/>
          <price2 type="decimal">12.0</price2>
          <price type="decimal">10.0</price>
          <base-price-in-site-currency type="decimal">300.0</base-price-in-site-currency>
          <old-price-in-site-currency type="decimal" nil="true"/>
          <price2-in-site-currency type="decimal">360.0</price2-in-site-currency>
          <prices type="array">
            <price type="numeric">12.0</price>
          </prices>
          <prices-in-site-currency type="array">
            <price-in-site-currency type="numeric">360.0</price-in-site-currency>
          </prices-in-site-currency>
        </variant>
      </variants>
      <product-bundle-components type="array"/>
      <description>guys, its a really cool t-shirt</description>
    </related-product>
  </related-products>
  <notice>Второй анонс</notice>
  <content>Привет</content>
</article>

Blog

Create blog

Endpoint

POST /admin/blogs.xml

Parameters

Name Description
blog[title] required title
blog[html_title] html title tag content
blog[meta_keywords] html meta words on page
blog[meta_description] html meta description
blog[notify_about_comment] true by default
blog[captcha_enabled] false by default
blog[disallow_links_in_comments] false by default
blog[commentable] default: 'no', available: no, yes, moderable

Request

Route

POST /admin/blogs.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <title>SuperBlog</title>
  <html-title>HTML TAG TITLE</html-title>
  <meta-keywords>new cool products</meta-keywords>
  <meta-description>It's a blog about our new products</meta-description>
</blog>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <id type="integer">4</id>
  <commentable>no</commentable>
  <notify-about-comment type="boolean">true</notify-about-comment>
  <captcha-enabled type="boolean">false</captcha-enabled>
  <disallow-links-in-comments type="boolean">false</disallow-links-in-comments>
  <handle>superblog</handle>
  <custom-template nil="true"/>
  <title>SuperBlog</title>
  <html-title>HTML TAG TITLE</html-title>
  <meta-keywords>new cool products</meta-keywords>
  <meta-description>It's a blog about our new products</meta-description>
  <tags type="array"/>
</blog>

Destroy blog

Endpoint

DELETE /admin/blogs/:blog_id.xml

Request

Route

DELETE /admin/blogs/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get blog

Endpoint

GET /admin/blogs/:blog_id.xml

Request

Route

GET /admin/blogs/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <id type="integer">1</id>
  <commentable>no</commentable>
  <notify-about-comment type="boolean">true</notify-about-comment>
  <captcha-enabled type="boolean">false</captcha-enabled>
  <disallow-links-in-comments type="boolean">false</disallow-links-in-comments>
  <handle nil="true"/>
  <custom-template nil="true"/>
  <title>Блог</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <tags type="array">
    <tag>
      <title>test</title>
    </tag>
    <tag>
      <title>test2</title>
    </tag>
  </tags>
</blog>

Get blogs

Endpoint

GET /admin/blogs.xml

Request

Route

GET /admin/blogs.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<blogs type="array">
  <blog>
    <id type="integer">1</id>
    <commentable>no</commentable>
    <notify-about-comment type="boolean">true</notify-about-comment>
    <captcha-enabled type="boolean">false</captcha-enabled>
    <disallow-links-in-comments type="boolean">false</disallow-links-in-comments>
    <handle nil="true"/>
    <custom-template nil="true"/>
    <title>Блог</title>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <tags type="array">
      <tag>
        <title>test</title>
      </tag>
      <tag>
        <title>test2</title>
      </tag>
    </tags>
  </blog>
  <blog>
    <id type="integer">2</id>
    <commentable>no</commentable>
    <notify-about-comment type="boolean">true</notify-about-comment>
    <captcha-enabled type="boolean">false</captcha-enabled>
    <disallow-links-in-comments type="boolean">false</disallow-links-in-comments>
    <handle>second_blog</handle>
    <custom-template nil="true"/>
    <title>Second blog</title>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <tags type="array"/>
  </blog>
</blogs>

Update blog

Endpoint

PUT /admin/blogs/:blog_id.xml

Parameters

Name Description
blog[title] title
blog[html_title] html title tag content
blog[meta_keywords] html meta words on page
blog[meta_description] html meta description
blog[notify_about_comment] true by default
blog[captcha_enabled] false by default
blog[disallow_links_in_comments] false by default
blog[commentable] default: 'no', available: no, yes, moderable

Request

Route

PUT /admin/blogs/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <title>WowBlog</title>
  <notify-about-comment type="boolean">false</notify-about-comment>
  <captcha-enabled type="boolean">true</captcha-enabled>
  <disallow-links-in-comments type="boolean">true</disallow-links-in-comments>
  <commentable>yes</commentable>
</blog>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <commentable>yes</commentable>
  <notify-about-comment type="boolean">false</notify-about-comment>
  <captcha-enabled type="boolean">true</captcha-enabled>
  <disallow-links-in-comments type="boolean">true</disallow-links-in-comments>
  <id type="integer">1</id>
  <handle>wowblog</handle>
  <custom-template nil="true"/>
  <title>WowBlog</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <tags type="array">
    <tag>
      <title>test</title>
    </tag>
    <tag>
      <title>test2</title>
    </tag>
  </tags>
</blog>

BonusSystemTransaction

Create transaction for client

Endpoint

POST /admin/clients/:client_id/bonus_system_transactions.xml

Parameters

Name Description
bonus_system_transaction[bonus_points] required bonus points; pass negative quantity if you need to revert their addition or just remove them in some cases
bonus_system_transaction[description] description

Request

Route

POST /admin/clients/2/bonus_system_transactions.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transaction>
  <bonus-points type="integer">100</bonus-points>
  <description>compliment</description>
</bonus-system-transaction>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transaction>
  <id type="integer">16</id>
  <bonus-points type="integer">100</bonus-points>
  <client-id type="integer">2</client-id>
  <bonus-system-id type="integer">1</bonus-system-id>
  <initiator-type>ApplicationPassword</initiator-type>
  <initiator-id type="integer">1</initiator-id>
  <description>compliment</description>
  <status>charged</status>
  <created-at type="dateTime">2025-02-11T00:57:23+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:23+03:00</updated-at>
</bonus-system-transaction>

Get bonus_system_transactions

Endpoint

GET /admin/bonus_system_transactions.xml

Parameters

Name Description
updated_since Set datetime to get only data updated after it.
from_id Set id to get only data starting from it.
per_page Quantity of objects per page.

Request

Route

GET /admin/bonus_system_transactions.xml?updated_since=2009-01-04+14%3A44%3A43+%2B0300

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

updated_since=2009-01-04 14:44:43 +0300

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transactions type="array">
  <bonus-system-transaction>
    <id type="integer">1</id>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">7</client-id>
    <bonus-system-id type="integer">1</bonus-system-id>
    <initiator-type>User</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>Бонус за регистрацию</description>
    <status>charged</status>
    <created-at type="dateTime">2011-03-18T10:53:14+03:00</created-at>
    <updated-at type="dateTime">2011-03-18T10:53:15+03:00</updated-at>
  </bonus-system-transaction>
  <bonus-system-transaction>
    <id type="integer">2</id>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">2</client-id>
    <bonus-system-id type="integer">1</bonus-system-id>
    <initiator-type>Order</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>test</description>
    <status>charged</status>
    <created-at type="dateTime">2025-02-11T00:57:22+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:22+03:00</updated-at>
  </bonus-system-transaction>
  <bonus-system-transaction>
    <id type="integer">3</id>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">2</client-id>
    <bonus-system-id type="integer">1</bonus-system-id>
    <initiator-type>User</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>test</description>
    <status>charged</status>
    <created-at type="dateTime">2025-02-11T00:57:22+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:22+03:00</updated-at>
  </bonus-system-transaction>
</bonus-system-transactions>

Get transaction for client

Endpoint

GET /admin/bonus_system_transactions/:bst_id.xml

Request

Route

GET /admin/bonus_system_transactions/10.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transaction>
  <id type="integer">10</id>
  <bonus-points type="integer">100</bonus-points>
  <client-id type="integer">2</client-id>
  <bonus-system-id type="integer">1</bonus-system-id>
  <initiator-type>Order</initiator-type>
  <initiator-id type="integer">1</initiator-id>
  <description>test</description>
  <status>charged</status>
  <created-at type="dateTime">2025-02-11T00:57:22+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:22+03:00</updated-at>
</bonus-system-transaction>

Get transactions for client

Endpoint

GET /admin/clients/:client_id/bonus_system_transactions.xml

Request

Route

GET /admin/clients/2/bonus_system_transactions.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transactions type="array">
  <bonus-system-transaction>
    <id type="integer">6</id>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">2</client-id>
    <bonus-system-id type="integer">1</bonus-system-id>
    <initiator-type>Order</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>test</description>
    <status>charged</status>
    <created-at type="dateTime">2025-02-11T00:57:22+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:22+03:00</updated-at>
  </bonus-system-transaction>
  <bonus-system-transaction>
    <id type="integer">7</id>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">2</client-id>
    <bonus-system-id type="integer">1</bonus-system-id>
    <initiator-type>User</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>test</description>
    <status>charged</status>
    <created-at type="dateTime">2025-02-11T00:57:22+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:22+03:00</updated-at>
  </bonus-system-transaction>
</bonus-system-transactions>

Category

Create category

Endpoint

POST /admin/categories.xml

Parameters

Name Description
category[title] required title
category[parent_id] parent category id
category[position] position in categories list

Request

Route

POST /admin/categories.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <title>Reebok</title>
</category>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <id type="integer">20497899</id>
  <parent-id type="integer">1</parent-id>
  <title>Reebok</title>
  <created-at type="timestamp">2025-02-11 00:57:52 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:52 +0300</updated-at>
  <position type="integer">1</position>
</category>

Destroy category

Endpoint

DELETE /admin/categories/:category_id.xml

Request

Route

DELETE /admin/categories/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get categories

Endpoint

GET /admin/categories.xml

Request

Route

GET /admin/categories.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<categories type="array">
  <category>
    <id type="integer">6</id>
    <parent-id type="integer">1</parent-id>
    <title>T-shirts</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">0</position>
  </category>
  <category>
    <id type="integer">2</id>
    <parent-id type="integer">1</parent-id>
    <title>Trousers</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">1</position>
  </category>
  <category>
    <id type="integer">3</id>
    <parent-id type="integer">1</parent-id>
    <title>Shirts</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">2</position>
  </category>
  <category>
    <id type="integer">4</id>
    <parent-id type="integer">1</parent-id>
    <title>Socks</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">3</position>
  </category>
  <category>
    <id type="integer">5</id>
    <parent-id type="integer">1</parent-id>
    <title>Hats</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">4</position>
  </category>
  <category>
    <id type="integer">8</id>
    <parent-id type="integer">5</parent-id>
    <title>Top Hat</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">1</position>
  </category>
  <category>
    <id type="integer">1</id>
    <parent-id type="integer" nil="true"/>
    <title>Склад</title>
    <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <position type="integer">0</position>
  </category>
</categories>

Get category

Endpoint

GET /admin/categories/:category_id.xml

Request

Route

GET /admin/categories/6.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <id type="integer">6</id>
  <parent-id type="integer">1</parent-id>
  <title>T-shirts</title>
  <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
  <position type="integer">0</position>
</category>

Update category

Endpoint

PUT /admin/categories/:category_id.xml

Parameters

Name Description
category[title] title

Request

Route

PUT /admin/categories/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <title>Adidas</title>
</category>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <id type="integer">6</id>
  <parent-id type="integer">1</parent-id>
  <title>Adidas</title>
  <created-at type="timestamp">2025-02-11 00:56:43 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:52 +0300</updated-at>
  <position type="integer">0</position>
</category>

Characteristic

Create characteristic

Endpoint

POST /admin/properties/:property_id/characteristics.xml

Parameters

Name Description
characteristic[title] required title
characteristic[permalink] permalink
characteristic[position] position in characteristics list

Request

Route

POST /admin/properties/3/characteristics.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristic>
  <title>Reebok</title>
</characteristic>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristic>
  <id type="integer">898582784</id>
  <property-id type="integer">3</property-id>
  <position type="integer">3</position>
  <title>Reebok</title>
  <permalink>reebok</permalink>
</characteristic>

Destroy characteristic

Endpoint

DELETE /admin/properties/:property_id/characteristics/:characteristic_id.xml

Request

Route

DELETE /admin/properties/3/characteristics/7.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get characteristic

Endpoint

GET /admin/properties/:property_id/characteristics/:characteristic_id.xml

Request

Route

GET /admin/properties/3/characteristics/7.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristic>
  <id type="integer">7</id>
  <property-id type="integer">3</property-id>
  <position type="integer">1</position>
  <title>Nike</title>
  <permalink>nike</permalink>
</characteristic>

Get characteristics

Endpoint

GET /admin/properties/:property_id/characteristics.xml

Request

Route

GET /admin/properties/3/characteristics.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristics type="array">
  <characteristic>
    <id type="integer">7</id>
    <property-id type="integer">3</property-id>
    <position type="integer">1</position>
    <title>Nike</title>
    <permalink>nike</permalink>
  </characteristic>
  <characteristic>
    <id type="integer">8</id>
    <property-id type="integer">3</property-id>
    <position type="integer">2</position>
    <title>Puma</title>
    <permalink>puma</permalink>
  </characteristic>
</characteristics>

Update characteristic

Endpoint

PUT /admin/properties/:property_id/characteristics/:characteristic_id.xml

Parameters

Name Description
characteristic[title] title

Request

Route

PUT /admin/properties/3/characteristics/7.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristic>
  <title>Adidas</title>
</characteristic>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristic>
  <property-id type="integer">3</property-id>
  <id type="integer">7</id>
  <position type="integer">1</position>
  <title>Adidas</title>
  <permalink>nike</permalink>
</characteristic>

Client

Create individual client

To assign values to fields, you should create them in advance. For more information, please go to section about Field. Individual client is a natural person, as opposed to legal entity or a sole trader.

Endpoint

POST /admin/clients.xml

Parameters

Name Description
client[name] required name
client[surname] required surname
client[middlename] required middlename
client[registered] if true, email and password are required
client[email] email
client[password] password at least 6 characters
client[phone] phone number
client[subscribe] set true to subscribe client for emails
client[client_group_id] client group id
client[type] Client::Individual, by default
client[ip_addr] IP address
client[correspondent_account] Correspondent account
client[settlement_account] Settlement account
client[fields_values_attributes] fields values array
client[fields_values_attributes][value] value of field
client[fields_values_attributes][field_id] field id
client[skip_send_mail] set it true to skip sending email confirmation

Request

Route

POST /admin/clients.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <name>Ivan</name>
  <surname>Ivanov</surname>
  <middlename>Ivanovich</middlename>
  <registered type="boolean">true</registered>
  <email>test@example.com</email>
  <password>123456</password>
  <phone>+71111111111</phone>
  <type>Client::Individual</type>
  <fields-values-attributes type="array">
    <fields-values-attribute>
      <field-id type="integer">185</field-id>
      <value>text</value>
    </fields-values-attribute>
  </fields-values-attributes>
</client>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<individual>
  <id type="integer">18</id>
  <email>test@example.com</email>
  <name>Ivan</name>
  <phone>+71111111111</phone>
  <created-at type="timestamp">2025-02-11 00:57:24 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:24 +0300</updated-at>
  <comment nil="true"/>
  <registered type="boolean">true</registered>
  <subscribe type="boolean">true</subscribe>
  <client-group-id type="integer">1</client-group-id>
  <surname>Ivanov</surname>
  <middlename>Ivanovich</middlename>
  <bonus-points type="integer">0</bonus-points>
  <type>Client::Individual</type>
  <correspondent-account nil="true"/>
  <settlement-account nil="true"/>
  <consent-to-personal-data type="boolean">true</consent-to-personal-data>
  <o-auth-provider nil="true"/>
  <messenger-subscription type="boolean" nil="true"/>
  <contact-name>Ivan</contact-name>
  <progressive-discount nil="true"/>
  <group-discount type="decimal">25.0</group-discount>
  <ip-addr></ip-addr>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">9</id>
      <field-id type="integer">185</field-id>
      <value>text</value>
      <created-at type="dateTime">2025-02-11T00:57:24+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:24+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle nil="true"/>
    </fields-value>
  </fields-values>
</individual>

Create juridical client

To assign values to fields, you should create them in advance. For more information, please go to section about Field. Juridical client is a sole trader (individual entrepreneur) or legal entity.

Endpoint

POST /admin/clients.xml

Parameters

Name Description
client[name] required name of company or a sole trader
client[registered] if true, email and password are required
client[email] email
client[password] password at least 6 characters
client[phone] phone number
client[subscribe] set true to subscribe client for emails
client[client_group_id] client group id
client[type] required Client::Juridical
client[ip_addr] IP address
client[juridical_address] address of company or a sole trader
client[inn] required INN
client[kpp] KPP
client[ogrn] OGRN
client[okpo] OKPO
client[bik] BIK
client[bank_name] bank name
client[correspondent_account] Correspondent account
client[settlement_account] Settlement account
client[fields_values_attributes] fields values array
client[fields_values_attributes][field_id] field id
client[fields_values_attributes][value] value of field
client[skip_send_mail] set it true to skip sending email confirmation

Request

Route

POST /admin/clients.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <name>OOO 'Company'</name>
  <type>Client::Juridical</type>
  <juridical-address>123456, Moscow, Novaya st., 1, 222</juridical-address>
  <inn type="integer">1234567890</inn>
  <kpp type="integer">123456789</kpp>
  <bik type="integer">123456789</bik>
  <fields-values-attributes type="array">
    <fields-values-attribute>
      <field-id type="integer">188</field-id>
      <value>text_value</value>
    </fields-values-attribute>
  </fields-values-attributes>
</client>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<juridical>
  <id type="integer">20</id>
  <email nil="true"/>
  <name>OOO 'Company'</name>
  <phone nil="true"/>
  <created-at type="timestamp">2025-02-11 00:57:25 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:25 +0300</updated-at>
  <comment nil="true"/>
  <registered type="boolean">false</registered>
  <subscribe type="boolean">true</subscribe>
  <client-group-id type="integer" nil="true"/>
  <bonus-points type="integer">0</bonus-points>
  <type>Client::Juridical</type>
  <juridical-address>123456, Moscow, Novaya st., 1, 222</juridical-address>
  <inn>1234567890</inn>
  <kpp>123456789</kpp>
  <ogrn nil="true"/>
  <okpo nil="true"/>
  <bik>123456789</bik>
  <bank-name nil="true"/>
  <correspondent-account nil="true"/>
  <settlement-account nil="true"/>
  <consent-to-personal-data type="boolean">true</consent-to-personal-data>
  <o-auth-provider nil="true"/>
  <messenger-subscription type="boolean" nil="true"/>
  <contact-name nil="true"/>
  <progressive-discount nil="true"/>
  <group-discount nil="true"/>
  <ip-addr></ip-addr>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">13</id>
      <field-id type="integer">188</field-id>
      <value>text_value</value>
      <created-at type="dateTime">2025-02-11T00:57:25+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:25+03:00</updated-at>
      <type>Текст</type>
      <name>field_juridical</name>
      <handle nil="true"/>
    </fields-value>
  </fields-values>
</juridical>

Destroy client

Endpoint

DELETE /admin/clients/:client_id.xml

Request

Route

DELETE /admin/clients/5.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get client

Endpoint

GET /admin/clients/:client_id.xml

Request

Route

GET /admin/clients/5.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<individual>
  <id type="integer">5</id>
  <email>john@smith.com</email>
  <name>John Smith</name>
  <phone>+7(926)111-11-11</phone>
  <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:24 +0300</updated-at>
  <comment nil="true"/>
  <registered type="boolean">true</registered>
  <subscribe type="boolean">true</subscribe>
  <client-group-id type="integer" nil="true"/>
  <surname nil="true"/>
  <middlename nil="true"/>
  <bonus-points type="integer">1000</bonus-points>
  <type>Client::Individual</type>
  <correspondent-account nil="true"/>
  <settlement-account nil="true"/>
  <consent-to-personal-data type="boolean" nil="true"/>
  <o-auth-provider nil="true"/>
  <messenger-subscription type="boolean" nil="true"/>
  <contact-name>John Smith</contact-name>
  <progressive-discount nil="true"/>
  <group-discount nil="true"/>
  <ip-addr></ip-addr>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">6</id>
      <field-id type="integer">183</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:24+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:24+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle nil="true"/>
    </fields-value>
  </fields-values>
</individual>

Get clients

Endpoint

GET /admin/clients.xml

Parameters

Name Description
updated_since Set datetime to get only data updated after it.
from_id Set id to get only data starting from it.
per_page Quantity of objects per page.

Request

Route

GET /admin/clients.xml?updated_since=2009-01-04+14%3A44%3A43+%2B0300

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

updated_since=2009-01-04 14:44:43 +0300

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<clients type="array">
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array"/>
  </client>
  <client>
    <id type="integer">3</id>
    <email>some-one2@yandex.ru</email>
    <name>Just Man</name>
    <phone>+7(926)111-22-33</phone>
    <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer">1</client-group-id>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Just Man</contact-name>
    <progressive-discount nil="true"/>
    <group-discount type="decimal">25.0</group-discount>
    <ip-addr></ip-addr>
    <fields-values type="array"/>
  </client>
  <client>
    <id type="integer">5</id>
    <email>john@smith.com</email>
    <name>John Smith</name>
    <phone>+7(926)111-11-11</phone>
    <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:24 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">true</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">1000</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>John Smith</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">4</id>
        <field-id type="integer">181</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:24+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:24+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
</clients>

Update client

Endpoint

PUT /admin/clients/:client_id.xml

Parameters

Name Description
client[name] name
client[phone] phone number
client[subscribe] set true to subscribe client for emails
client[client_group_id] client group id
client[ip_addr] IP address
client[juridical_address] address of company or a sole trader
client[inn] INN
client[kpp] KPP
client[ogrn] OGRN
client[okpo] OKPO
client[bik] BIK
client[bank_name] bank name
client[correspondent_account] Correspondent account
client[settlement_account] Settlement account
client[fields_values_attributes] fields values array

Request

Route

PUT /admin/clients/5.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <phone>+7(911)111-11-11</phone>
  <subscribe type="boolean">false</subscribe>
  <client-group-id type="integer">2</client-group-id>
  <fields-values-attributes type="array">
    <fields-values-attribute>
      <field-id type="integer">191</field-id>
      <value>new value</value>
    </fields-values-attribute>
  </fields-values-attributes>
</client>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<individual>
  <phone>+79111111111</phone>
  <subscribe type="boolean">false</subscribe>
  <client-group-id type="integer">2</client-group-id>
  <id type="integer">5</id>
  <email>john@smith.com</email>
  <name>John Smith</name>
  <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:25 +0300</updated-at>
  <comment nil="true"/>
  <registered type="boolean">true</registered>
  <surname nil="true"/>
  <middlename nil="true"/>
  <bonus-points type="integer">1000</bonus-points>
  <type>Client::Individual</type>
  <correspondent-account nil="true"/>
  <settlement-account nil="true"/>
  <consent-to-personal-data type="boolean" nil="true"/>
  <o-auth-provider nil="true"/>
  <messenger-subscription type="boolean" nil="true"/>
  <contact-name>John Smith</contact-name>
  <progressive-discount nil="true"/>
  <group-discount nil="true"/>
  <ip-addr></ip-addr>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <field-id type="integer">191</field-id>
      <id type="integer">16</id>
      <value>new value</value>
      <created-at type="dateTime">2025-02-11T00:57:25+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:25+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle nil="true"/>
    </fields-value>
  </fields-values>
</individual>

ClientGroup

Create client group

Endpoint

POST /admin/client_groups.xml

Parameters

Name Description
client_group[title] client group title
client_group[discount] discount
client_group[discount_description] discount description
client_group[is_default] set as default group

Request

Route

POST /admin/client_groups.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-group>
  <title>test group</title>
  <discount type="float">0.2</discount>
  <discount-description>test group discount</discount-description>
  <is-default type="boolean">false</is-default>
</client-group>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-group>
  <id type="integer">18</id>
  <title>test group</title>
  <is-default type="boolean">false</is-default>
  <discount type="decimal">0.2</discount>
  <created-at type="dateTime">2025-02-11T00:57:23+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:23+03:00</updated-at>
  <discount-description>test group discount</discount-description>
</client-group>

Destroy client group

Endpoint

DELETE /admin/client_groups/:client_group_id.xml

Request

Route

DELETE /admin/client_groups/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get client group

Endpoint

GET /admin/client_groups/:client_group_id.xml

Request

Route

GET /admin/client_groups/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-group>
  <id type="integer">1</id>
  <title>vip</title>
  <is-default type="boolean">true</is-default>
  <discount type="decimal">25.0</discount>
  <created-at type="dateTime">2024-11-03T00:56:41+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:56:43+03:00</updated-at>
  <discount-description nil="true"/>
</client-group>

Get client groups

Endpoint

GET /admin/client_groups.xml

Request

Route

GET /admin/client_groups.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-groups type="array">
  <client-group>
    <id type="integer">1</id>
    <title>vip</title>
    <is-default type="boolean">true</is-default>
    <discount type="decimal">25.0</discount>
    <created-at type="dateTime">2024-11-03T00:56:41+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:56:43+03:00</updated-at>
    <discount-description nil="true"/>
  </client-group>
</client-groups>

Update client group

Endpoint

PUT /admin/client_groups/:client_group_id.xml

Parameters

Name Description
client_group[title] client group title
client_group[discount] discount
client_group[discount_description] discount description
client_group[is_default] set as default group

Request

Route

PUT /admin/client_groups/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-group>
  <title>test group</title>
  <discount type="float">0.2</discount>
  <discount-description>test group discount</discount-description>
  <is-default type="boolean">false</is-default>
</client-group>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Collect

Add product to collection

Endpoint

POST /admin/collects.xml

Parameters

Name Description
collect[collection_id] required collection id
collect[product_id] required product id

Request

Route

POST /admin/collects.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <collection-id type="integer">2</collection-id>
  <product-id type="integer">1</product-id>
</collect>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <collection-id type="integer">2</collection-id>
  <product-id type="integer">1</product-id>
  <created-at type="timestamp">2025-02-11 00:57:57 +0300</created-at>
  <position type="integer">1</position>
  <id type="integer">9853</id>
</collect>

Get collections by product

Endpoint

GET /admin/collects.xml?product_id=:product_id

Request

Route

GET /admin/collects.xml?product_id=1

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

product_id=1

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collects type="array">
  <collect>
    <collection-id type="integer">1</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">1</position>
    <id type="integer">1</id>
  </collect>
  <collect>
    <collection-id type="integer">3</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">3</position>
    <id type="integer">3</id>
  </collect>
  <collect>
    <collection-id type="integer">8</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">1</position>
    <id type="integer">4</id>
  </collect>
</collects>

Get collects

Endpoint

GET /admin/collects.xml

Request

Route

GET /admin/collects.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collects type="array">
  <collect>
    <collection-id type="integer">1</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">1</position>
    <id type="integer">1</id>
  </collect>
  <collect>
    <collection-id type="integer">1</collection-id>
    <product-id type="integer">2</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">2</position>
    <id type="integer">2</id>
  </collect>
  <collect>
    <collection-id type="integer">3</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">3</position>
    <id type="integer">3</id>
  </collect>
  <collect>
    <collection-id type="integer">8</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">1</position>
    <id type="integer">4</id>
  </collect>
  <collect>
    <collection-id type="integer">8</collection-id>
    <product-id type="integer">2</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">2</position>
    <id type="integer">5</id>
  </collect>
  <collect>
    <collection-id type="integer">8</collection-id>
    <product-id type="integer">3</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">3</position>
    <id type="integer">6</id>
  </collect>
</collects>

Get products by collection

Endpoint

GET /admin/collects.xml?collection_id=:collection_id

Request

Route

GET /admin/collects.xml?collection_id=1

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

collection_id=1

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collects type="array">
  <collect>
    <collection-id type="integer">1</collection-id>
    <product-id type="integer">1</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">1</position>
    <id type="integer">1</id>
  </collect>
  <collect>
    <collection-id type="integer">1</collection-id>
    <product-id type="integer">2</product-id>
    <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
    <position type="integer">2</position>
    <id type="integer">2</id>
  </collect>
</collects>

Move product to another collection

Endpoint

PUT /admin/collects/:collect_id.xml

Parameters

Name Description
collect[collection_id] collection id

Request

Route

PUT /admin/collects/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <collection-id type="integer">3</collection-id>
</collect>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <collection-id type="integer">3</collection-id>
  <id type="integer">2</id>
  <product-id type="integer">2</product-id>
  <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
  <position type="integer">2</position>
</collect>

Remove product from collection

Endpoint

DELETE /admin/collects/:collect_id.xml

Request

Route

DELETE /admin/collects/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Update position

Endpoint

PUT /admin/collects/:collect_id.xml

Parameters

Name Description
collect[position] position

Request

Route

PUT /admin/collects/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <position type="integer">3</position>
</collect>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <position type="integer">3</position>
  <collection-id type="integer">1</collection-id>
  <product-id type="integer">2</product-id>
  <id type="integer">2</id>
  <created-at type="timestamp">2009-03-18 07:53:15 +0300</created-at>
</collect>

Collection

Create collection

Endpoint

POST /admin/collections.xml

Parameters

Name Description
collection[title] required title
collection[parent_id] required parent collection id
collection[position] position in collections list
collection[sort_type] Alphabetically: A - Z => 1, Alphabetically: Z - A => 2, By date: New - Old => 3, By date: Old - New => 4, By price: Expensive - Cheap => 5, By price: Cheap - Expensive => 6, Manual => 7, By discount: Large - Little => 8, By discount: Little - Large => 9, By sort rank: Low - High => 10, By sort rank: High - Low => 11, Sort by ascending popularity => 12, Sort by descending popularity => 13
collection[description] description
collection[html_title] html title
collection[seo_description] seo description
collection[meta_description] meta description
collection[meta_keywords] meta keywords
collection[is_hidden] set true to hide collection
collection[permalink] generated
collection[recursive] recursive
collection[image_attributes] image for collection
collection[image_attributes][src] image url
collection[field_values_attributes] collection field values attributes

Request

Route

POST /admin/collections.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <title>T-shirts</title>
  <parent-id type="integer">1</parent-id>
  <position type="integer">1</position>
  <sort-type type="integer">1</sort-type>
  <description>text</description>
  <image-attributes>
    <src>https://abc.myinsales.ru/images/no_image_compact.jpg</src>
  </image-attributes>
  <field-values-attributes type="array">
    <field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </field-values-attribute>
  </field-values-attributes>
</collection>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <id type="integer">20924766</id>
  <parent-id type="integer">1</parent-id>
  <created-at type="timestamp">2025-02-11 00:57:50 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:50 +0300</updated-at>
  <is-hidden type="boolean">false</is-hidden>
  <position type="integer">1</position>
  <sort-type type="integer">1</sort-type>
  <custom-template nil="true"/>
  <recursive type="boolean" nil="true"/>
  <is-smart type="boolean" nil="true"/>
  <title>T-shirts</title>
  <html-title nil="true"/>
  <meta-description nil="true"/>
  <meta-keywords nil="true"/>
  <permalink>t-shirts</permalink>
  <url>/collection/t-shirts</url>
  <image>
    <id type="integer">1</id>
    <created-at type="timestamp">2025-02-11 00:57:50 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/collections/1/1/1/image.jpg?1739224669</original-url>
  </image>
  <field-values type="array">
    <field-value type="CollectionFieldValue">
      <id type="integer">3</id>
      <collection-field-id type="integer">1</collection-field-id>
      <value>12345</value>
    </field-value>
  </field-values>
  <description>text</description>
  <seo_description/>
</collection>

Destroy collection

Endpoint

DELETE /admin/collections/:collection_id.xml

Request

Route

DELETE /admin/collections/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get collection

Endpoint

GET /admin/collections/:collection_id.xml

Request

Route

GET /admin/collections/6.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <id type="integer">6</id>
  <parent-id type="integer">1</parent-id>
  <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
  <is-hidden type="boolean">false</is-hidden>
  <position type="integer">0</position>
  <sort-type type="integer">7</sort-type>
  <custom-template nil="true"/>
  <recursive type="boolean" nil="true"/>
  <is-smart type="boolean" nil="true"/>
  <title>all</title>
  <html-title nil="true"/>
  <meta-description nil="true"/>
  <meta-keywords nil="true"/>
  <permalink>all</permalink>
  <url>/collection/all</url>
  <field-values type="array"/>
  <description/>
  <seo_description/>
</collection>

Get collections

Endpoint

GET /admin/collections.xml

Parameters

Name Description
updated_since Set datetime to get only data updated after it.
from_id Set id to get only data starting from it.
per_page Quantity of objects per page.

Request

Route

GET /admin/collections.xml?updated_since=2016-07-04+14%3A44%3A43+%2B0300

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

updated_since=2016-07-04 14:44:43 +0300

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collections type="array">
  <collection>
    <id type="integer">1</id>
    <parent-id type="integer" nil="true"/>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">-1</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>T-shirts</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>футболка</permalink>
    <url>/collection/футболка</url>
    <field-values type="array">
      <field-value type="CollectionFieldValue">
        <id type="integer">1</id>
        <collection-field-id type="integer">1</collection-field-id>
        <value>some collection field value</value>
      </field-value>
      <field-value type="CollectionFieldValue">
        <id type="integer">2</id>
        <collection-field-id type="integer">2</collection-field-id>
        <value>some collection field value</value>
      </field-value>
    </field-values>
    <description/>
    <seo_description/>
  </collection>
  <collection>
    <id type="integer">2</id>
    <parent-id type="integer">1</parent-id>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">1</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>Shirts</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>shirts</permalink>
    <url>/collection/shirts</url>
    <field-values type="array"/>
    <description/>
    <seo_description/>
  </collection>
  <collection>
    <id type="integer">3</id>
    <parent-id type="integer">1</parent-id>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">2</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>Trousers</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>trousers</permalink>
    <url>/collection/trousers</url>
    <field-values type="array"/>
    <description/>
    <seo_description/>
  </collection>
  <collection>
    <id type="integer">4</id>
    <parent-id type="integer">1</parent-id>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">3</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>Stylish</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>stylish</permalink>
    <url>/collection/stylish</url>
    <field-values type="array"/>
    <description/>
    <seo_description/>
  </collection>
  <collection>
    <id type="integer">5</id>
    <parent-id type="integer">1</parent-id>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">4</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>Sport</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>sport</permalink>
    <url>/collection/sport</url>
    <field-values type="array"/>
    <description/>
    <seo_description/>
  </collection>
  <collection>
    <id type="integer">6</id>
    <parent-id type="integer">1</parent-id>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">0</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>all</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>all</permalink>
    <url>/collection/all</url>
    <field-values type="array"/>
    <description/>
    <seo_description/>
  </collection>
  <collection>
    <id type="integer">8</id>
    <parent-id type="integer">1</parent-id>
    <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:56:43 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <position type="integer">4</position>
    <sort-type type="integer">7</sort-type>
    <custom-template nil="true"/>
    <recursive type="boolean" nil="true"/>
    <is-smart type="boolean" nil="true"/>
    <title>sort test</title>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>sort test</permalink>
    <url>/collection/sort test</url>
    <field-values type="array"/>
    <description/>
    <seo_description/>
  </collection>
</collections>

Update collection

Endpoint

PUT /admin/collections/:collection_id.xml

Parameters

Name Description
collection[title] title
collection[position] position in collections list
collection[sort_type] Alphabetically: A - Z => 1, Alphabetically: Z - A => 2, By date: New - Old => 3, By date: Old - New => 4, By price: Expensive - Cheap => 5, By price: Cheap - Expensive => 6, Manual => 7, By discount: Large - Little => 8, By discount: Little - Large => 9, By sort rank: Low - High => 10, By sort rank: High - Low => 11, Sort by ascending popularity => 12, Sort by descending popularity => 13
collection[description] description
collection[html_title] html title
collection[seo_description] seo description
collection[meta_description] meta description
collection[meta_keywords] meta keywords
collection[is_hidden] set true to hide collection
collection[permalink] generated
collection[recursive] recursive
collection[field_values_attributes] collection field values attributes

Request

Route

PUT /admin/collections/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <title>Books</title>
  <position type="integer">2</position>
  <sort-type type="integer">11</sort-type>
  <description>Description</description>
  <is-hidden type="boolean">true</is-hidden>
  <field-values-attributes type="array">
    <field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </field-values-attribute>
  </field-values-attributes>
</collection>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <is-hidden type="boolean">true</is-hidden>
  <sort-type type="integer">11</sort-type>
  <position type="integer">2</position>
  <id type="integer">6</id>
  <parent-id type="integer">1</parent-id>
  <created-at type="timestamp">2024-11-03 00:56:41 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:51 +0300</updated-at>
  <custom-template nil="true"/>
  <recursive type="boolean" nil="true"/>
  <is-smart type="boolean" nil="true"/>
  <title>Books</title>
  <html-title nil="true"/>
  <meta-description nil="true"/>
  <meta-keywords nil="true"/>
  <permalink>all</permalink>
  <url>/collection/all</url>
  <field-values type="array">
    <field-value type="CollectionFieldValue">
      <id type="integer">5</id>
      <collection-field-id type="integer">1</collection-field-id>
      <value>12345</value>
    </field-value>
  </field-values>
  <description>Description</description>
  <seo_description/>
</collection>

CollectionField

Create collection_field

Endpoint

POST /admin/collection_fields.xml

Parameters

Name Description
collection_field[title] required title
collection_field[handle] required handle used in liquid
collection_field[type] required CollectionField::TextArea - textarea, CollectionField::TextField - textfield
collection_field[position] position in collection_fields list
collection_field[is_hidden] boolean

Request

Route

POST /admin/collection_fields.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field>
  <title>Size</title>
  <handle>size</handle>
  <type>CollectionField::TextArea</type>
</collection-field>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field>
  <id type="integer">4</id>
  <handle>size</handle>
  <type>CollectionField::TextArea</type>
  <application-id type="integer">1</application-id>
  <position type="integer">3</position>
  <is-hidden type="boolean" nil="true"/>
  <title>Size</title>
</collection-field>

Destroy collection_field by handle

Endpoint

DELETE /admin/collection_fields/:collection_field_handle.xml

Request

Route

DELETE /admin/collection_fields/handle2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Destroy collection_field

Endpoint

DELETE /admin/collection_fields/:collection_field_id.xml

Request

Route

DELETE /admin/collection_fields/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get collection_field by handle

Endpoint

GET /admin/collection_fields/:collection_field_handle.xml

Request

Route

GET /admin/collection_fields/handle2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field>
  <id type="integer">2</id>
  <handle>handle2</handle>
  <type>CollectionField::TextArea</type>
  <application-id type="integer">1</application-id>
  <position type="integer">2</position>
  <is-hidden type="boolean" nil="true"/>
  <title>title2</title>
</collection-field>

Get collection_field

Endpoint

GET /admin/collection_fields/:collection_field_id.xml

Request

Route

GET /admin/collection_fields/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field>
  <id type="integer">2</id>
  <handle>handle2</handle>
  <type>CollectionField::TextArea</type>
  <application-id type="integer">1</application-id>
  <position type="integer">2</position>
  <is-hidden type="boolean" nil="true"/>
  <title>title2</title>
</collection-field>

Get collection_fields

Endpoint

GET /admin/collection_fields.xml

Request

Route

GET /admin/collection_fields.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-fields type="array">
  <collection-field>
    <id type="integer">1</id>
    <handle>handle</handle>
    <type>CollectionField::TextField</type>
    <application-id type="integer" nil="true"/>
    <position type="integer">1</position>
    <is-hidden type="boolean" nil="true"/>
    <title>title</title>
  </collection-field>
  <collection-field>
    <id type="integer">2</id>
    <handle>handle2</handle>
    <type>CollectionField::TextArea</type>
    <application-id type="integer">1</application-id>
    <position type="integer">2</position>
    <is-hidden type="boolean" nil="true"/>
    <title>title2</title>
  </collection-field>
</collection-fields>

Update collection_field by handle

Endpoint

PUT /admin/collection_fields/:collection_field_handle.xml

Parameters

Name Description Method
collection_field[title] title
collection_field[handle] handle used in liquid new_handle
collection_field[position] position in collection_fields list
collection_field[is_hidden] boolean

Request

Route

PUT /admin/collection_fields/handle2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field>
  <title>Volume</title>
  <position type="integer">2</position>
</collection-field>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Update collection_field

Endpoint

PUT /admin/collection_fields/:collection_field_id.xml

Parameters

Name Description
collection_field[title] title
collection_field[handle] handle used in liquid
collection_field[position] position in collection_fields list
collection_field[is_hidden] boolean

Request

Route

PUT /admin/collection_fields/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field>
  <title>Volume</title>
  <handle>volume</handle>
  <position type="integer">2</position>
</collection-field>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

CollectionFieldValue

Get collection field value by handle

Endpoint

GET /admin/collections/:collection_id/collection_field_values/:field_handle.xml

Parameters

Name Description
collection_id collection id
field_handle field handle

Request

Route

GET /admin/collections/1/collection_field_values/handle2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field-value>
  <id type="integer">2</id>
  <collection-field-id type="integer">2</collection-field-id>
  <value>some collection field value</value>
</collection-field-value>

Get collection field value

Endpoint

GET /admin/collections/:collection_id/collection_field_values/:field_id.xml

Parameters

Name Description
collection_id collection id
field_id field_id

Request

Route

GET /admin/collections/1/collection_field_values/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field-value>
  <id type="integer">2</id>
  <collection-field-id type="integer">2</collection-field-id>
  <value>some collection field value</value>
</collection-field-value>

Get collection fields values

Endpoint

GET /admin/collections/:collection_id/collection_field_values.xml

Parameters

Name Description
collection_id collection id

Request

Route

GET /admin/collections/1/collection_field_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field-values type="array">
  <collection-field-value>
    <id type="integer">1</id>
    <collection-field-id type="integer">1</collection-field-id>
    <value>some collection field value</value>
  </collection-field-value>
  <collection-field-value>
    <id type="integer">2</id>
    <collection-field-id type="integer">2</collection-field-id>
    <value>some collection field value</value>
  </collection-field-value>
</collection-field-values>

Update collection field value by handle

Endpoint

PUT /admin/collections/:collection_id/collection_field_values/:field_handle.xml

Parameters

Name Description
collection_id collection id
field_handle field handle
collection_field_value[value] field value

Request

Route

PUT /admin/collections/1/collection_field_values/handle2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field-value>
  <value>new test value of field</value>
</collection-field-value>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Update collection field value

Endpoint

PUT /admin/collections/:collection_id/collection_field_values/:field_id.xml

Parameters

Name Description
collection_id collection id
field_id field_id
collection_field_value[value] field value

Request

Route

PUT /admin/collections/1/collection_field_values/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-field-value>
  <value>new test value of field</value>
</collection-field-value>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

CollectionFilter

Create collection filter

Endpoint

POST /admin/collection_filters.xml

Parameters

Name Description
filter[title] required filter title
filter[collection_id] required collection id
filter[description] description
filter[permalink] filter permalink
filter[html_title] tag title
filter[meta_keywords] tag keyword
filter[meta_description] tag description
filter[properties_attributes] properties
filter[options_attributes] options
filter[field_values_attributes] collection filter field values attributes

Request

Route

POST /admin/collection_filters.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<filter>
  <title>new filter</title>
  <collection-id type="integer">1</collection-id>
  <properties-attributes type="array">
    <properties-attribute>
      <title>first property</title>
      <value>first prop value</value>
    </properties-attribute>
    <properties-attribute>
      <title>second property</title>
      <value>second property value</value>
    </properties-attribute>
  </properties-attributes>
  <options-attributes type="array">
    <options-attribute>
      <title>first option</title>
      <value>first option value</value>
    </options-attribute>
    <options-attribute>
      <title>second option</title>
      <value>second option value</value>
    </options-attribute>
  </options-attributes>
  <field-values-attributes type="array">
    <field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </field-values-attribute>
  </field-values-attributes>
</filter>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filter>
  <id type="integer">3</id>
  <collection-id type="integer">1</collection-id>
  <permalink>new-filter</permalink>
  <title>new filter</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <characteristics type="array">
    <characteristic>
      <id type="integer">898582776</id>
      <property-id type="integer">35187295</property-id>
      <position type="integer">1</position>
      <title>first prop value</title>
      <permalink>first-prop-value</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">898582777</id>
      <property-id type="integer">35187296</property-id>
      <position type="integer">1</position>
      <title>second property value</title>
      <permalink>second-property-value</permalink>
    </characteristic>
  </characteristics>
  <option-values type="array">
    <option-value>
      <id type="integer">21063155</id>
      <option-name-id type="integer">2517841</option-name-id>
      <position type="integer">1</position>
      <title>first option value</title>
      <image-url nil="true"/>
    </option-value>
    <option-value>
      <id type="integer">21063156</id>
      <option-name-id type="integer">2517842</option-name-id>
      <position type="integer">1</position>
      <title>second option value</title>
      <image-url nil="true"/>
    </option-value>
  </option-values>
  <description/>
  <seo_description/>
</collection-filter>

Delete collection filter

Endpoint

DELETE /admin/collection_filters/:filter_id.xml

Parameters

Name Description
filter[id] required filter id

Request

Route

DELETE /admin/collection_filters/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==
Content-Type: application/x-www-form-urlencoded

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get collection filter

Endpoint

GET /admin/collection_filters/:filter_id.xml

Parameters

Name Description
filter_id filter id

Request

Route

GET /admin/collection_filters/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filter>
  <id type="integer">1</id>
  <collection-id type="integer">1</collection-id>
  <permalink>foobar</permalink>
  <title>seo filter</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <characteristics type="array">
    <characteristic>
      <id type="integer">1</id>
      <property-id type="integer">1</property-id>
      <position type="integer">1</position>
      <title>Japan</title>
      <permalink>japan</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">2</id>
      <property-id type="integer">2</property-id>
      <position type="integer">1</position>
      <title>Germany</title>
      <permalink>germany</permalink>
    </characteristic>
  </characteristics>
  <option-values type="array"/>
  <description/>
  <seo_description/>
</collection-filter>

Get collection filters

Endpoint

GET /admin/collection_filters.xml?collection_id=:collection_id

Parameters

Name Description
collection_id collection id

Request

Route

GET /admin/collection_filters.xml?collection_id=1

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

collection_id=1

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filters type="array">
  <collection-filter>
    <id type="integer">1</id>
    <collection-id type="integer">1</collection-id>
    <permalink>foobar</permalink>
    <title>seo filter</title>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <characteristics type="array">
      <characteristic>
        <id type="integer">1</id>
        <property-id type="integer">1</property-id>
        <position type="integer">1</position>
        <title>Japan</title>
        <permalink>japan</permalink>
      </characteristic>
      <characteristic>
        <id type="integer">2</id>
        <property-id type="integer">2</property-id>
        <position type="integer">1</position>
        <title>Germany</title>
        <permalink>germany</permalink>
      </characteristic>
    </characteristics>
    <option-values type="array"/>
    <description/>
    <seo_description/>
  </collection-filter>
  <collection-filter>
    <id type="integer">2</id>
    <collection-id type="integer">1</collection-id>
    <permalink>barfoo</permalink>
    <title>seo filter 2</title>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <characteristics type="array"/>
    <option-values type="array">
      <option-value>
        <id type="integer">1</id>
        <option-name-id type="integer">1</option-name-id>
        <position type="integer">1</position>
        <title>Red</title>
        <image-url nil="true"/>
      </option-value>
      <option-value>
        <id type="integer">2</id>
        <option-name-id type="integer">1</option-name-id>
        <position type="integer">2</position>
        <title>Зеленый</title>
        <image-url nil="true"/>
      </option-value>
    </option-values>
    <description/>
    <seo_description/>
  </collection-filter>
</collection-filters>

Update collection filter

Endpoint

PUT /admin/collection_filters/:filter_id.xml

Parameters

Name Description
filter[id] required filter id
filter[title] filter title
filter[collection_id] collection id
filter[description] description
filter[permalink] filter permalink
filter[html_title] tag title
filter[meta_keywords] tag keyword
filter[meta_description] tag description
filter[properties_attributes] properties
filter[options_attributes] options
filter[field_values_attributes] collection filter field values attributes

Request

Route

PUT /admin/collection_filters/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<filter>
  <title>new-seo-filter</title>
  <permalink>new-seo-filter</permalink>
  <properties-attributes type="array">
    <properties-attribute>
      <title>first property</title>
      <value>first prop value</value>
    </properties-attribute>
    <properties-attribute>
      <title>second property</title>
      <value>second property value</value>
    </properties-attribute>
  </properties-attributes>
  <options-attributes type="array">
    <options-attribute>
      <title>first option</title>
      <value>first option value</value>
    </options-attribute>
    <options-attribute>
      <title>second option</title>
      <value>second option value</value>
    </options-attribute>
  </options-attributes>
  <field-values-attributes type="array">
    <field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </field-values-attribute>
  </field-values-attributes>
</filter>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filter>
  <permalink>new-seo-filter</permalink>
  <id type="integer">1</id>
  <collection-id type="integer">1</collection-id>
  <title>new-seo-filter</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <characteristics type="array">
    <characteristic>
      <id type="integer">898582780</id>
      <property-id type="integer">35187299</property-id>
      <position type="integer">1</position>
      <title>first prop value</title>
      <permalink>first-prop-value</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">898582781</id>
      <property-id type="integer">35187300</property-id>
      <position type="integer">1</position>
      <title>second property value</title>
      <permalink>second-property-value</permalink>
    </characteristic>
  </characteristics>
  <option-values type="array">
    <option-value>
      <id type="integer">21063159</id>
      <option-name-id type="integer">2517845</option-name-id>
      <position type="integer">1</position>
      <title>first option value</title>
      <image-url nil="true"/>
    </option-value>
    <option-value>
      <id type="integer">21063160</id>
      <option-name-id type="integer">2517846</option-name-id>
      <position type="integer">1</position>
      <title>second option value</title>
      <image-url nil="true"/>
    </option-value>
  </option-values>
  <description/>
  <seo_description/>
</collection-filter>

CustomStatus

Create custom status

For more information about custom statuses More info

Endpoint

POST /admin/custom_statuses.xml

Parameters

Name Description
custom_status[system_status] required system status
custom_status[title] required description

Request

Route

POST /admin/custom_statuses.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-status>
  <system-status>new</system-status>
  <title>New (ordered by phone)</title>
</custom-status>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-status>
  <id type="integer">4</id>
  <permalink>new-ordered-by-phone</permalink>
  <position type="integer">2</position>
  <system-status>new</system-status>
  <created-at type="dateTime">2025-02-11T00:57:26+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:26+03:00</updated-at>
  <is-default type="boolean">false</is-default>
  <title>New (ordered by phone)</title>
  <color>#DC5F59</color>
</custom-status>

Destroy custom status

For more information about custom statuses More info

Endpoint

DELETE /admin/custom_statuses/:custom_status_permalink.xml

Request

Route

DELETE /admin/custom_statuses/novyy.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get custom status

For more information about custom statuses More info

Endpoint

GET /admin/custom_statuses/:custom_status_permalink.xml

Request

Route

GET /admin/custom_statuses/novyy.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-status>
  <id type="integer">1</id>
  <permalink>novyy</permalink>
  <position type="integer">1</position>
  <system-status>new</system-status>
  <created-at type="dateTime">2025-02-11T00:57:26+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:26+03:00</updated-at>
  <is-default type="boolean">true</is-default>
  <title>Новый</title>
  <color>#DC5F59</color>
</custom-status>

Get custom statuses

For more information about custom statuses More info

Endpoint

GET /admin/custom_statuses.xml

Request

Route

GET /admin/custom_statuses.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-statuses type="array">
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>new</permalink>
    <position type="integer" nil="true"/>
    <system-status>new</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>Новый</title>
    <color>#DC5F59</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>accepted</permalink>
    <position type="integer" nil="true"/>
    <system-status>accepted</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>В обработке</title>
    <color>#85C5E0</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>approved</permalink>
    <position type="integer" nil="true"/>
    <system-status>approved</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>Согласован</title>
    <color>#86AA60</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>dispatched</permalink>
    <position type="integer" nil="true"/>
    <system-status>dispatched</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>Отгружен</title>
    <color>#3A9FC9</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>delivered</permalink>
    <position type="integer" nil="true"/>
    <system-status>delivered</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>Доставлен</title>
    <color>#249641</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>returning</permalink>
    <position type="integer" nil="true"/>
    <system-status>returning</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>В процессе возврата</title>
    <color>#686A69</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>declined</permalink>
    <position type="integer" nil="true"/>
    <system-status>declined</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>Отменен</title>
    <color>#929594</color>
  </custom-status>
  <custom-status>
    <id type="integer" nil="true"/>
    <permalink>returned</permalink>
    <position type="integer" nil="true"/>
    <system-status>returned</system-status>
    <created-at type="dateTime" nil="true"/>
    <updated-at type="dateTime" nil="true"/>
    <is-default type="boolean">true</is-default>
    <title>Возврат</title>
    <color>#A69196</color>
  </custom-status>
</custom-statuses>

Update custom status

For more information about custom statuses More info

Endpoint

PUT /admin/custom_statuses/:custom_status_permalink.xml

Parameters

Name Description
custom_status[title] discount

Request

Route

PUT /admin/custom_statuses/novyy.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-status>
  <title>New (ordered by website)</title>
</custom-status>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

DeliveryVariant

Create delivery_variant External

DeliveryVariant::External is an external delivery variant.

Endpoint

POST /admin/delivery_variants.xml

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::External, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::MapZoneDelivery, DeliveryVariant::None, DeliveryVariant::OfficialEmsShipping, DeliveryVariant::OfficialFirstClass, DeliveryVariant::OfficialRussianpost, DeliveryVariant::PickUp, DeliveryVariant::PriceDepend
delivery_variant[description] description
delivery_variant[position] position
delivery_variant[add_payment_gateways] set true to add all payment variants
delivery_variant[delivery_locations_attributes] array of delivery locations
delivery_variant[delivery_locations_attributes][country] Optional. Default: RU. It should be enabled in checkout options to be binded to shipping method.
delivery_variant[delivery_locations_attributes][region] Required. Field Region should be enabled in checkout options to be binded to shipping method. Examples: "Ивановская", "Омская"
delivery_variant[delivery_locations_attributes][area] Optional. Ignored if city present. Field Region should be filled. Examples: "Знаменский"
delivery_variant[delivery_locations_attributes][city] Optional. Field Region should be filled. Examples: "Омск"
delivery_variant[inverted] false by default, if true this delivery variant will be available for all regions except passed in parameters 'country', 'region' and 'city'
delivery_variant[charge_up_to] free on orders from given sum
delivery_variant[javascript] if needed, paste javascript to be displayed on page of delivery variant selection
delivery_variant[url] url for sending request on delivery price estimation
delivery_variant[api_version] 'v1' or 'v2' (recomended)
delivery_variant[customer_pickup] false by default, set it true if this delivery variant is customer pickup

Request

Route

POST /admin/delivery_variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<delivery-variant>
  <title>express delivery</title>
  <type>DeliveryVariant::External</type>
  <description>text</description>
  <position type="integer">1</position>
  <add-payment-gateways type="boolean">true</add-payment-gateways>
  <delivery-locations-attributes type="array">
    <delivery-locations-attribute>
      <region>A</region>
      <city>B</city>
    </delivery-locations-attribute>
  </delivery-locations-attributes>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="integer">1000</charge-up-to>
  <javascript>&lt;script type='text/javascript' src='http://mydelivery.ru/delivery.js'&gt;&lt;/script&gt;
        &lt;script type='text/javascript'&gt;
          $(function(){
          alert('Choose a point of customer pickup');
          });
        &lt;/script&gt;</javascript>
  <url>http://google.ru</url>
</delivery-variant>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<external>
  <id type="integer">20</id>
  <updated-at type="timestamp">2025-02-11 00:57:13 +0300</updated-at>
  <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
  <position type="integer">1</position>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::External</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout nil="true"/>
  <delivery-date-required nil="true"/>
  <forbid-weekends nil="true"/>
  <estimated-delivery-period nil="true"/>
  <order-time-is-later nil="true"/>
  <forbidden-days nil="true"/>
  <show-time-intervals-in-checkout nil="true"/>
  <time-intervals-required nil="true"/>
  <url>http://google.ru</url>
  <javascript>&lt;script type='text/javascript' src='http://mydelivery.ru/delivery.js'&gt;&lt;/script&gt;
        &lt;script type='text/javascript'&gt;
          $(function(){
          alert('Choose a point of customer pickup');
          });
        &lt;/script&gt;</javascript>
  <customer-pickup type="boolean">false</customer-pickup>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">9</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">10</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">11</id>
      <payment-gateway-id type="integer">4</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <id type="integer">3</id>
      <region>A</region>
      <city>B</city>
      <country>RU</country>
    </delivery-location>
  </delivery-locations>
  <delivery-time-intervals type="array"/>
</external>

Create delivery_variant Fixed

DeliveryVariant::Fixed is a delivery variant with a fixed delivery price.

Endpoint

POST /admin/delivery_variants.xml

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::External, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::MapZoneDelivery, DeliveryVariant::None, DeliveryVariant::OfficialEmsShipping, DeliveryVariant::OfficialFirstClass, DeliveryVariant::OfficialRussianpost, DeliveryVariant::PickUp, DeliveryVariant::PriceDepend
delivery_variant[description] description
delivery_variant[position] position
delivery_variant[add_payment_gateways] set true to add all payment variants
delivery_variant[delivery_locations_attributes] array of delivery locations
delivery_variant[delivery_locations_attributes][country] if shop has many countries, fill this field;it should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][region] field Region should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][city] field Region should be filled
delivery_variant[inverted] false by default, if true this delivery variant will be available for all regions except passed in parameters 'country', 'region' and 'city'
delivery_variant[charge_up_to] free on orders from given sum
delivery_variant[price] required delivery price
delivery_variant[javascript] if needed, paste javascript to be displayed on page of delivery variant selection
delivery_variant[show_calendar_in_checkout] show delivery date selection in checkout
delivery_variant[delivery_date_required] delivery date selection is required in chekout
delivery_variant[forbid_weekends] weekend days are forbidden for delivery
delivery_variant[estimated_delivery_period] estimated delivery period
delivery_variant[order_time_is_later] increase estimated delivery time for one day if order time is later
delivery_variant[forbidden_days] forbidden days for delivery (23.02,08.03,..)
delivery_variant[show_time_intervals_in_checkout] show delivery time intervals in checkout
delivery_variant[time_intervals_required] delivery time interval selection is required in checkout
delivery_variant[time_intervals] time intervals (10-12, 12-16, ...)

Request

Route

POST /admin/delivery_variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<delivery-variant>
  <title>express delivery</title>
  <type>DeliveryVariant::Fixed</type>
  <description>text</description>
  <position type="integer">1</position>
  <add-payment-gateways type="boolean">true</add-payment-gateways>
  <delivery-locations-attributes type="array">
    <delivery-locations-attribute>
      <region>A</region>
      <city>B</city>
    </delivery-locations-attribute>
  </delivery-locations-attributes>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="integer">1000</charge-up-to>
  <price type="integer">300</price>
  <show-calendar-in-checkout type="boolean">true</show-calendar-in-checkout>
  <delivery-date-required type="boolean">true</delivery-date-required>
  <forbid-weekends type="boolean">true</forbid-weekends>
  <estimated-delivery-period type="integer">2</estimated-delivery-period>
  <order-time-is-later>18:00</order-time-is-later>
  <forbidden-days>23.02,08.03,01.05</forbidden-days>
  <show-time-intervals-in-checkout type="boolean">true</show-time-intervals-in-checkout>
  <time-intervals-required type="boolean">true</time-intervals-required>
  <time-intervals>10-12,12-16,16-20</time-intervals>
</delivery-variant>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<fixed>
  <id type="integer">18</id>
  <updated-at type="timestamp">2025-02-11 00:57:13 +0300</updated-at>
  <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
  <position type="integer">1</position>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::Fixed</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout type="boolean">true</show-calendar-in-checkout>
  <delivery-date-required type="boolean">true</delivery-date-required>
  <forbid-weekends type="boolean">true</forbid-weekends>
  <estimated-delivery-period type="integer">2</estimated-delivery-period>
  <order-time-is-later>18:00</order-time-is-later>
  <forbidden-days>23.02,08.03,01.05</forbidden-days>
  <show-time-intervals-in-checkout type="boolean">true</show-time-intervals-in-checkout>
  <time-intervals-required type="boolean">true</time-intervals-required>
  <price type="decimal">300.0</price>
  <javascript nil="true"/>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">3</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">4</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">5</id>
      <payment-gateway-id type="integer">4</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:13 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <id type="integer">1</id>
      <region>A</region>
      <city>B</city>
      <country>RU</country>
    </delivery-location>
  </delivery-locations>
  <delivery-time-intervals type="array">
    <delivery-time-interval>
      <time-from>10:00</time-from>
      <time-to>12:00</time-to>
      <monday type="boolean">true</monday>
      <tuesday type="boolean">true</tuesday>
      <wednesday type="boolean">true</wednesday>
      <thursday type="boolean">true</thursday>
      <friday type="boolean">true</friday>
      <saturday type="boolean">true</saturday>
      <sunday type="boolean">true</sunday>
    </delivery-time-interval>
    <delivery-time-interval>
      <time-from>12:00</time-from>
      <time-to>16:00</time-to>
      <monday type="boolean">true</monday>
      <tuesday type="boolean">true</tuesday>
      <wednesday type="boolean">true</wednesday>
      <thursday type="boolean">true</thursday>
      <friday type="boolean">true</friday>
      <saturday type="boolean">true</saturday>
      <sunday type="boolean">true</sunday>
    </delivery-time-interval>
    <delivery-time-interval>
      <time-from>16:00</time-from>
      <time-to>20:00</time-to>
      <monday type="boolean">true</monday>
      <tuesday type="boolean">true</tuesday>
      <wednesday type="boolean">true</wednesday>
      <thursday type="boolean">true</thursday>
      <friday type="boolean">true</friday>
      <saturday type="boolean">true</saturday>
      <sunday type="boolean">true</sunday>
    </delivery-time-interval>
  </delivery-time-intervals>
</fixed>

Create delivery_variant LocationDepend

DeliveryVariant::LocationDepend is a delivery variant where delivery price depends on location (through delivery zones) and weight of delivered object.

Endpoint

POST /admin/delivery_variants.xml

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::External, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::MapZoneDelivery, DeliveryVariant::None, DeliveryVariant::OfficialEmsShipping, DeliveryVariant::OfficialFirstClass, DeliveryVariant::OfficialRussianpost, DeliveryVariant::PickUp, DeliveryVariant::PriceDepend
delivery_variant[description] description
delivery_variant[position] position
delivery_variant[add_payment_gateways] set true to add all payment variants
delivery_variant[delivery_locations_attributes] array of delivery locations
delivery_variant[delivery_locations_attributes][country] if shop has many countries, fill this field;it should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][region] field Region should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][city] field Region should be filled
delivery_variant[inverted] false by default, if true this delivery variant will be available for all regions except passed in parameters 'country', 'region' and 'city'
delivery_variant[charge_up_to] free on orders from given sum
delivery_variant[delivery_zones_attributes] required array of delivery zones
delivery_variant[delivery_zones_attributes][title] title of delivery zone
delivery_variant[delivery_zones_attributes][tariffs_attributes] required array of tariffs attributes for delivery zone
delivery_variant[delivery_zones_attributes][tariffs_attributes][price] required delivery tariff price
delivery_variant[delivery_zones_attributes][tariffs_attributes][step] required increment which increases delivery price; measured in kg
delivery_variant[delivery_zones_attributes][tariffs_attributes][step_price] required price of increment
delivery_variant[delivery_zones_attributes][tariffs_attributes][max_weight] required max weight for tariff
delivery_variant[delivery_zones_attributes][locations_attributes] array of locations in delivery zone
delivery_variant[delivery_zones_attributes][locations_attributes][country] required field country should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_zones_attributes][locations_attributes][region] field Region should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][locations_attributes][city] field Region should be filled

Request

Route

POST /admin/delivery_variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<delivery-variant>
  <title>express delivery</title>
  <type>DeliveryVariant::LocationDepend</type>
  <description>text</description>
  <position type="integer">1</position>
  <add-payment-gateways type="boolean">true</add-payment-gateways>
  <delivery-locations-attributes type="array">
    <delivery-locations-attribute>
      <region>A</region>
      <city>B</city>
    </delivery-locations-attribute>
  </delivery-locations-attributes>
  <inverted type="boolean">true</inverted>
  <charge-up-to type="integer">1000</charge-up-to>
  <delivery-zones-attributes type="array">
    <delivery-zones-attribute>
      <title>test</title>
      <tariffs-attributes type="array">
        <tariffs-attribute>
          <max-weight type="integer">30</max-weight>
          <price type="integer">100</price>
          <step type="integer">2</step>
          <step-price type="integer">50</step-price>
        </tariffs-attribute>
      </tariffs-attributes>
      <locations-attributes type="array">
        <locations-attribute>
          <country>A</country>
          <region>C</region>
          <city>D</city>
        </locations-attribute>
      </locations-attributes>
    </delivery-zones-attribute>
  </delivery-zones-attributes>
</delivery-variant>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<location-depend>
  <id type="integer">22</id>
  <updated-at type="timestamp">2025-02-11 00:57:14 +0300</updated-at>
  <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
  <position type="integer">1</position>
  <inverted type="boolean">true</inverted>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::LocationDepend</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout nil="true"/>
  <delivery-date-required nil="true"/>
  <forbid-weekends nil="true"/>
  <estimated-delivery-period nil="true"/>
  <order-time-is-later nil="true"/>
  <forbidden-days nil="true"/>
  <show-time-intervals-in-checkout nil="true"/>
  <time-intervals-required nil="true"/>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">15</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">16</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">17</id>
      <payment-gateway-id type="integer">4</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <id type="integer">5</id>
      <region>A</region>
      <city>B</city>
      <country>RU</country>
    </delivery-location>
  </delivery-locations>
  <delivery-time-intervals type="array"/>
  <delivery-zones type="array">
    <delivery-zone>
      <id type="integer">1</id>
      <title>test</title>
      <tariffs type="array">
        <tariff type="DeliveryZoneTariff">
          <id type="integer">1</id>
          <max-weight type="decimal">30.0</max-weight>
          <price type="decimal">100.0</price>
          <step type="decimal">2.0</step>
          <step-price type="decimal">50.0</step-price>
        </tariff>
      </tariffs>
      <locations type="array">
        <location type="DeliveryLocation">
          <id type="integer">6</id>
          <region>C</region>
          <city>D</city>
          <country>A</country>
        </location>
      </locations>
    </delivery-zone>
  </delivery-zones>
</location-depend>

Create delivery_variant PickUp

DeliveryVariant::PickUp is a delivery variant with a fixed delivery price.

Endpoint

POST /admin/delivery_variants.xml

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::External, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::MapZoneDelivery, DeliveryVariant::None, DeliveryVariant::OfficialEmsShipping, DeliveryVariant::OfficialFirstClass, DeliveryVariant::OfficialRussianpost, DeliveryVariant::PickUp, DeliveryVariant::PriceDepend
delivery_variant[description] description
delivery_variant[position] position
delivery_variant[add_payment_gateways] set true to add all payment variants
delivery_variant[delivery_locations_attributes] array of delivery locations
delivery_variant[delivery_locations_attributes][country] if shop has many countries, fill this field;it should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][region] field Region should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][city] field Region should be filled
delivery_variant[inverted] false by default, if true this delivery variant will be available for all regions except passed in parameters 'country', 'region' and 'city'
delivery_variant[charge_up_to] free on orders from given sum
delivery_variant[javascript] if needed, paste javascript to be displayed on page of delivery variant selection
delivery_variant[show_calendar_in_checkout] show delivery date selection in checkout
delivery_variant[delivery_date_required] delivery date selection is required in chekout
delivery_variant[forbid_weekends] weekend days are forbidden for delivery
delivery_variant[estimated_delivery_period] estimated delivery period
delivery_variant[order_time_is_later] increase estimated delivery time for one day if order time is later
delivery_variant[forbidden_days] forbidden days for delivery (23.02,08.03,..)
delivery_variant[show_time_intervals_in_checkout] show delivery time intervals in checkout
delivery_variant[time_intervals_required] delivery time interval selection is required in checkout
delivery_variant[time_intervals] time intervals (10-12, 12-16, ...)
delivery_variant[pick_up_sources_attributes] array of pick up sources
delivery_variant[pick_up_sources_attributes][title] required title
delivery_variant[pick_up_sources_attributes][http_method] required http method (GET, POST) used for request
delivery_variant[pick_up_sources_attributes][url] required url for receiving list of delivery points
delivery_variant[pick_up_sources_attributes][point_info_url] required url for receiving delivery info to the selected point

Request

Route

POST /admin/delivery_variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<delivery-variant>
  <title>express delivery</title>
  <type>DeliveryVariant::PickUp</type>
  <description>text</description>
  <position type="integer">1</position>
  <add-payment-gateways type="boolean">true</add-payment-gateways>
  <delivery-locations-attributes type="array">
    <delivery-locations-attribute>
      <region>A</region>
      <city>B</city>
    </delivery-locations-attribute>
  </delivery-locations-attributes>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="integer">1000</charge-up-to>
  <show-calendar-in-checkout type="boolean">true</show-calendar-in-checkout>
  <delivery-date-required type="boolean">true</delivery-date-required>
  <forbid-weekends type="boolean">true</forbid-weekends>
  <estimated-delivery-period type="integer">2</estimated-delivery-period>
  <order-time-is-later>18:00</order-time-is-later>
  <forbidden-days>23.02,08.03,01.05</forbidden-days>
  <show-time-intervals-in-checkout type="boolean">true</show-time-intervals-in-checkout>
  <time-intervals-required type="boolean">true</time-intervals-required>
  <time-intervals>10-12,12-16,16-20</time-intervals>
  <pick-up-sources-attributes type="array">
    <pick-up-sources-attribute>
      <title>My company</title>
      <pick-up-source-http-method>POST</pick-up-source-http-method>
      <url>https://example.com/get_points</url>
      <point-info-url>https://example.com/get_point_info</point-info-url>
    </pick-up-sources-attribute>
  </pick-up-sources-attributes>
</delivery-variant>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<pick-up>
  <id type="integer">26</id>
  <updated-at type="timestamp">2025-02-11 00:57:14 +0300</updated-at>
  <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
  <position type="integer">1</position>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::PickUp</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout type="boolean">true</show-calendar-in-checkout>
  <delivery-date-required type="boolean">true</delivery-date-required>
  <forbid-weekends type="boolean">true</forbid-weekends>
  <estimated-delivery-period type="integer">2</estimated-delivery-period>
  <order-time-is-later>18:00</order-time-is-later>
  <forbidden-days>23.02,08.03,01.05</forbidden-days>
  <show-time-intervals-in-checkout type="boolean">true</show-time-intervals-in-checkout>
  <time-intervals-required type="boolean">true</time-intervals-required>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">27</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">28</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">29</id>
      <payment-gateway-id type="integer">4</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">30</id>
      <payment-gateway-id type="integer">18</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <id type="integer">11</id>
      <region>A</region>
      <city>B</city>
      <country>RU</country>
    </delivery-location>
  </delivery-locations>
  <delivery-time-intervals type="array">
    <delivery-time-interval>
      <time-from>10:00</time-from>
      <time-to>12:00</time-to>
      <monday type="boolean">true</monday>
      <tuesday type="boolean">true</tuesday>
      <wednesday type="boolean">true</wednesday>
      <thursday type="boolean">true</thursday>
      <friday type="boolean">true</friday>
      <saturday type="boolean">true</saturday>
      <sunday type="boolean">true</sunday>
    </delivery-time-interval>
    <delivery-time-interval>
      <time-from>12:00</time-from>
      <time-to>16:00</time-to>
      <monday type="boolean">true</monday>
      <tuesday type="boolean">true</tuesday>
      <wednesday type="boolean">true</wednesday>
      <thursday type="boolean">true</thursday>
      <friday type="boolean">true</friday>
      <saturday type="boolean">true</saturday>
      <sunday type="boolean">true</sunday>
    </delivery-time-interval>
    <delivery-time-interval>
      <time-from>16:00</time-from>
      <time-to>20:00</time-to>
      <monday type="boolean">true</monday>
      <tuesday type="boolean">true</tuesday>
      <wednesday type="boolean">true</wednesday>
      <thursday type="boolean">true</thursday>
      <friday type="boolean">true</friday>
      <saturday type="boolean">true</saturday>
      <sunday type="boolean">true</sunday>
    </delivery-time-interval>
  </delivery-time-intervals>
  <pick-up-sources type="array">
    <pick-up-source>
      <id type="integer">1</id>
      <url>https://example.com/get_points</url>
      <created-at type="dateTime">2025-02-11T00:57:14+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:14+03:00</updated-at>
      <point-info-url>https://example.com/get_point_info</point-info-url>
      <title>My company</title>
    </pick-up-source>
  </pick-up-sources>
  <pick-up-source-delivery-variants type="array">
    <pick-up-source-delivery-variant>
      <id type="integer">1</id>
      <pick-up-source-id type="integer">1</pick-up-source-id>
      <created-at type="dateTime">2025-02-11T00:57:14+03:00</created-at>
    </pick-up-source-delivery-variant>
  </pick-up-source-delivery-variants>
</pick-up>

Create delivery_variant PriceDepend

DeliveryVariant::PriceDepend is a delivery variant with rules which define delivery price depending on order sum and weight.

Endpoint

POST /admin/delivery_variants.xml

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::External, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::MapZoneDelivery, DeliveryVariant::None, DeliveryVariant::OfficialEmsShipping, DeliveryVariant::OfficialFirstClass, DeliveryVariant::OfficialRussianpost, DeliveryVariant::PickUp, DeliveryVariant::PriceDepend
delivery_variant[description] description
delivery_variant[position] position
delivery_variant[add_payment_gateways] set true to add all payment variants
delivery_variant[delivery_locations_attributes] array of delivery locations
delivery_variant[delivery_locations_attributes][country] if shop has many countries, fill this field;it should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][region] field Region should be enabled in checkout options to be binded to shipping method
delivery_variant[delivery_locations_attributes][city] field Region should be filled
delivery_variant[inverted] false by default, if true this delivery variant will be available for all regions except passed in parameters 'country', 'region' and 'city'
delivery_variant[charge_up_to] free on orders from given sum
delivery_variant[min_price] minimal delivery price
delivery_variant[rules_attributes] array of rules define delivery price depending on order sum and weight
delivery_variant[rules_attributes][price] delivery price by a rule
delivery_variant[rules_attributes][order_price] order sum by a rule
delivery_variant[rules_attributes][order_weight] order weight by a rule

Request

Route

POST /admin/delivery_variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<delivery-variant>
  <title>express delivery</title>
  <type>DeliveryVariant::PriceDepend</type>
  <description>text</description>
  <position type="integer">1</position>
  <add-payment-gateways type="boolean">true</add-payment-gateways>
  <delivery-locations-attributes type="array">
    <delivery-locations-attribute>
      <region>A</region>
      <city>B</city>
    </delivery-locations-attribute>
  </delivery-locations-attributes>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="integer">1000</charge-up-to>
  <min-price type="integer">300</min-price>
  <rules-attributes type="array">
    <rules-attribute>
      <price type="integer">300</price>
      <order-price type="integer">10</order-price>
      <order-weight type="integer">1</order-weight>
    </rules-attribute>
  </rules-attributes>
</delivery-variant>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-depend>
  <id type="integer">24</id>
  <updated-at type="timestamp">2025-02-11 00:57:14 +0300</updated-at>
  <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
  <position type="integer">1</position>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::PriceDepend</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout nil="true"/>
  <delivery-date-required nil="true"/>
  <forbid-weekends nil="true"/>
  <estimated-delivery-period nil="true"/>
  <order-time-is-later nil="true"/>
  <forbidden-days nil="true"/>
  <show-time-intervals-in-checkout nil="true"/>
  <time-intervals-required nil="true"/>
  <min-price type="decimal">300.0</min-price>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">21</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">22</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">23</id>
      <payment-gateway-id type="integer">4</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:14 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <id type="integer">9</id>
      <region>A</region>
      <city>B</city>
      <country>RU</country>
    </delivery-location>
  </delivery-locations>
  <delivery-time-intervals type="array"/>
  <rules type="array">
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">9</id>
      <order-price type="decimal">10.0</order-price>
      <price type="decimal">300.0</price>
      <order-weight type="decimal">1.0</order-weight>
    </rule>
  </rules>
</price-depend>

Destroy delivery_variant

Endpoint

DELETE /admin/delivery_variants/:delivery_variant_id.xml

Request

Route

DELETE /admin/delivery_variants/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get delivery_variant

Endpoint

GET /admin/delivery_variants/:delivery_variant_id.xml

Request

Route

GET /admin/delivery_variants/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-depend>
  <id type="integer">2</id>
  <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <position type="integer">2</position>
  <inverted type="boolean">false</inverted>
  <charge-up-to type="decimal" nil="true"/>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>курьер</title>
  <description></description>
  <type>DeliveryVariant::PriceDepend</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout nil="true"/>
  <delivery-date-required nil="true"/>
  <forbid-weekends nil="true"/>
  <estimated-delivery-period nil="true"/>
  <order-time-is-later nil="true"/>
  <forbidden-days nil="true"/>
  <show-time-intervals-in-checkout nil="true"/>
  <time-intervals-required nil="true"/>
  <min-price type="float">200.0</min-price>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">2</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array"/>
  <delivery-time-intervals type="array"/>
  <rules type="array">
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">1</id>
      <order-price type="float">2000.0</order-price>
      <price type="float">600.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">2</id>
      <order-price type="float">2000.0</order-price>
      <price type="float">700.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">3</id>
      <order-price type="float">2000.0</order-price>
      <price type="float">800.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">4</id>
      <order-price type="float">10000.0</order-price>
      <price type="float">300.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">5</id>
      <order-price type="float">10000.0</order-price>
      <price type="float">400.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">6</id>
      <order-price type="float">10000.0</order-price>
      <price type="float">500.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">7</id>
      <order-price nil="true"/>
      <price type="float">0.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">8</id>
      <order-price nil="true"/>
      <price type="float">100.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
  </rules>
</price-depend>

Get delivery_variants

Endpoint

GET /admin/delivery_variants.xml

Request

Route

GET /admin/delivery_variants.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <object>
    <id type="integer">1</id>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <position type="integer">1</position>
    <inverted type="boolean">false</inverted>
    <charge-up-to type="decimal" nil="true"/>
    <show-zip-code type="boolean">false</show-zip-code>
    <title>самовывоз</title>
    <description>самовывоз из офиса</description>
    <type>DeliveryVariant::Fixed</type>
    <min-order-sum nil="true"/>
    <show-calendar-in-checkout nil="true"/>
    <delivery-date-required nil="true"/>
    <forbid-weekends nil="true"/>
    <estimated-delivery-period nil="true"/>
    <order-time-is-later nil="true"/>
    <forbidden-days nil="true"/>
    <show-time-intervals-in-checkout nil="true"/>
    <time-intervals-required nil="true"/>
    <price type="float">100.0</price>
    <javascript nil="true"/>
    <payment-delivery-variants type="array">
      <payment-delivery-variant>
        <id type="integer">1</id>
        <payment-gateway-id type="integer">1</payment-gateway-id>
        <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
      </payment-delivery-variant>
    </payment-delivery-variants>
    <delivery-locations type="array"/>
    <delivery-time-intervals type="array"/>
  </object>
  <object>
    <id type="integer">2</id>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <position type="integer">2</position>
    <inverted type="boolean">false</inverted>
    <charge-up-to type="decimal" nil="true"/>
    <show-zip-code type="boolean">false</show-zip-code>
    <title>курьер</title>
    <description></description>
    <type>DeliveryVariant::PriceDepend</type>
    <min-order-sum nil="true"/>
    <show-calendar-in-checkout nil="true"/>
    <delivery-date-required nil="true"/>
    <forbid-weekends nil="true"/>
    <estimated-delivery-period nil="true"/>
    <order-time-is-later nil="true"/>
    <forbidden-days nil="true"/>
    <show-time-intervals-in-checkout nil="true"/>
    <time-intervals-required nil="true"/>
    <min-price type="float">200.0</min-price>
    <payment-delivery-variants type="array">
      <payment-delivery-variant>
        <id type="integer">2</id>
        <payment-gateway-id type="integer">1</payment-gateway-id>
        <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
      </payment-delivery-variant>
    </payment-delivery-variants>
    <delivery-locations type="array"/>
    <delivery-time-intervals type="array"/>
    <rules type="array">
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">1</id>
        <order-price type="float">2000.0</order-price>
        <price type="float">600.0</price>
        <order-weight type="integer">10</order-weight>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">2</id>
        <order-price type="float">2000.0</order-price>
        <price type="float">700.0</price>
        <order-weight type="integer">20</order-weight>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">3</id>
        <order-price type="float">2000.0</order-price>
        <price type="float">800.0</price>
        <order-weight nil="true"/>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">4</id>
        <order-price type="float">10000.0</order-price>
        <price type="float">300.0</price>
        <order-weight type="integer">10</order-weight>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">5</id>
        <order-price type="float">10000.0</order-price>
        <price type="float">400.0</price>
        <order-weight type="integer">20</order-weight>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">6</id>
        <order-price type="float">10000.0</order-price>
        <price type="float">500.0</price>
        <order-weight nil="true"/>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">7</id>
        <order-price nil="true"/>
        <price type="float">0.0</price>
        <order-weight type="integer">10</order-weight>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <id type="integer">8</id>
        <order-price nil="true"/>
        <price type="float">100.0</price>
        <order-weight type="integer">20</order-weight>
      </rule>
    </rules>
  </object>
  <object>
    <id type="integer">3</id>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <position type="integer">3</position>
    <inverted type="boolean">false</inverted>
    <charge-up-to type="decimal" nil="true"/>
    <show-zip-code type="boolean">false</show-zip-code>
    <title>Внешний</title>
    <description>Внешний способ</description>
    <type>DeliveryVariant::External</type>
    <min-order-sum nil="true"/>
    <show-calendar-in-checkout nil="true"/>
    <delivery-date-required nil="true"/>
    <forbid-weekends nil="true"/>
    <estimated-delivery-period nil="true"/>
    <order-time-is-later nil="true"/>
    <forbidden-days nil="true"/>
    <show-time-intervals-in-checkout nil="true"/>
    <time-intervals-required nil="true"/>
    <url nil="true"/>
    <javascript nil="true"/>
    <customer-pickup type="boolean">false</customer-pickup>
    <payment-delivery-variants type="array"/>
    <delivery-locations type="array"/>
    <delivery-time-intervals type="array"/>
  </object>
  <object>
    <id type="integer">4</id>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <position type="integer">3</position>
    <inverted type="boolean">false</inverted>
    <charge-up-to type="decimal" nil="true"/>
    <show-zip-code type="boolean">false</show-zip-code>
    <title>Внешний</title>
    <description>Внешний способ</description>
    <type>DeliveryVariant::MapZoneDelivery</type>
    <min-order-sum nil="true"/>
    <show-calendar-in-checkout nil="true"/>
    <delivery-date-required nil="true"/>
    <forbid-weekends nil="true"/>
    <estimated-delivery-period nil="true"/>
    <order-time-is-later nil="true"/>
    <forbidden-days nil="true"/>
    <show-time-intervals-in-checkout nil="true"/>
    <time-intervals-required nil="true"/>
    <payment-delivery-variants type="array"/>
    <delivery-locations type="array"/>
    <delivery-time-intervals type="array"/>
  </object>
</objects>

Update delivery variant

Endpoint

PUT /admin/delivery_variants/:delivery_variant_id.xml

Parameters

Name Description
delivery_variant[title] title
delivery_variant[description] description
delivery_variant[position] position
delivery_variant[add_payment_gateways] set true to add all payment variants
delivery_variant[charge_up_to] free on orders from given sum
delivery_variant[payment_delivery_variants_attributes] array of available payment gateways for this delivery variant
delivery_variant[pick_up_sources_attributes] array of pick up sources
delivery_variant[payment_delivery_variants_attributes][_destroy] set it 1 to delete this payment variant
delivery_variant[payment_delivery_variants_attributes][id] only for removal: id of delivery variant and payment gateway binding you want to delete
delivery_variant[payment_delivery_variants_attributes][payment_gateway_id] for creation: id of payment gateway you want to bind with this delivery variant

Request

Route

PUT /admin/delivery_variants/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<delivery-variant>
  <title>new title</title>
  <description>new description</description>
  <position type="integer">1</position>
  <charge-up-to type="integer">2500</charge-up-to>
  <payment-delivery-variants-attributes type="array">
    <payment-delivery-variants-attribute>
      <_destroy type="integer">1</_destroy>
      <id type="integer">2</id>
    </payment-delivery-variants-attribute>
    <payment-delivery-variants-attribute>
      <payment-gateway-id type="integer">3</payment-gateway-id>
    </payment-delivery-variants-attribute>
  </payment-delivery-variants-attributes>
  <pick-up-sources-attributes type="array">
    <pick-up-sources-attribute>
      <title>My company</title>
      <pick-up-source-http-method>POST</pick-up-source-http-method>
      <url>https://example.com/get_points</url>
      <point-info-url>https://example.com/get_point_info</point-info-url>
    </pick-up-sources-attribute>
  </pick-up-sources-attributes>
</delivery-variant>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-depend>
  <charge-up-to type="decimal">2500.0</charge-up-to>
  <position type="integer">1</position>
  <id type="integer">2</id>
  <updated-at type="timestamp">2025-02-11 00:57:15 +0300</updated-at>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <inverted type="boolean">false</inverted>
  <show-zip-code type="boolean">false</show-zip-code>
  <title>new title</title>
  <description>new description</description>
  <type>DeliveryVariant::PriceDepend</type>
  <min-order-sum nil="true"/>
  <show-calendar-in-checkout nil="true"/>
  <delivery-date-required nil="true"/>
  <forbid-weekends nil="true"/>
  <estimated-delivery-period nil="true"/>
  <order-time-is-later nil="true"/>
  <forbidden-days nil="true"/>
  <show-time-intervals-in-checkout nil="true"/>
  <time-intervals-required nil="true"/>
  <min-price type="float">200.0</min-price>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">37</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
      <created-at type="timestamp">2025-02-11 00:57:15 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array"/>
  <delivery-time-intervals type="array"/>
  <rules type="array">
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">1</id>
      <order-price type="float">2000.0</order-price>
      <price type="float">600.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">2</id>
      <order-price type="float">2000.0</order-price>
      <price type="float">700.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">3</id>
      <order-price type="float">2000.0</order-price>
      <price type="float">800.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">4</id>
      <order-price type="float">10000.0</order-price>
      <price type="float">300.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">5</id>
      <order-price type="float">10000.0</order-price>
      <price type="float">400.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">6</id>
      <order-price type="float">10000.0</order-price>
      <price type="float">500.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">7</id>
      <order-price nil="true"/>
      <price type="float">0.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <id type="integer">8</id>
      <order-price nil="true"/>
      <price type="float">100.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
  </rules>
</price-depend>

DiscountCode

Create discount code

Endpoint

POST /admin/discount_codes.xml

Parameters

Name Description
discount_code[code] required code
discount_code[description] description
discount_code[disabled] disabled
discount_code[act_once] act once
discount_code[act_once_for_client] act once for client
discount_code[expired_at] expired at
discount_code[type_id] required type_id (1 - percent, 2 - money)
discount_code[discount] required discount
discount_code[min_price] min price

Request

Route

POST /admin/discount_codes.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<discount-code>
  <code>BIRTHDAY</code>
  <description>Birthday discount</description>
  <act-once-for-client type="boolean">true</act-once-for-client>
  <expired-at type="date">2025-02-18</expired-at>
  <type-id type="integer">1</type-id>
  <discount type="integer">10</discount>
  <min-price type="integer">500</min-price>
</discount-code>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<discount-code>
  <id type="integer">173</id>
  <code>birthday</code>
  <disabled type="boolean">true</disabled>
  <act-once type="boolean">true</act-once>
  <expired-at type="date">2025-02-18</expired-at>
  <type-id type="integer">1</type-id>
  <discount type="decimal">10.0</discount>
  <description>Birthday discount</description>
  <created-at type="dateTime">2025-02-11T00:57:27+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:27+03:00</updated-at>
  <skip-discounted-product type="boolean" nil="true"/>
  <min-price type="decimal">500.0</min-price>
  <act-once-for-client type="boolean">true</act-once-for-client>
  <skip-bundles type="boolean" nil="true"/>
  <worked type="boolean">false</worked>
  <discount-collections type="array"/>
</discount-code>

Destroy discount code

Endpoint

DELETE /admin/discount_codes/:discount_code_id.xml

Request

Route

DELETE /admin/discount_codes/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get discount code

Endpoint

GET /admin/discount_codes/:discount_code_id.xml

Request

Route

GET /admin/discount_codes/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<discount-code>
  <id type="integer">1</id>
  <code>dc1</code>
  <disabled type="boolean">false</disabled>
  <act-once type="boolean">true</act-once>
  <expired-at type="date">2020-12-12</expired-at>
  <type-id type="integer">1</type-id>
  <discount type="decimal">30.0</discount>
  <description>процентная скидка</description>
  <created-at type="dateTime">2009-03-18T10:53:14+03:00</created-at>
  <updated-at type="dateTime">2009-03-18T10:53:15+03:00</updated-at>
  <skip-discounted-product type="boolean" nil="true"/>
  <min-price type="decimal" nil="true"/>
  <act-once-for-client type="boolean" nil="true"/>
  <skip-bundles type="boolean" nil="true"/>
  <worked type="boolean">false</worked>
  <discount-collections type="array"/>
</discount-code>

Get discount codes

Endpoint

GET /admin/discount_codes.xml

Request

Route

GET /admin/discount_codes.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<discount-codes type="array">
  <discount-code>
    <id type="integer">2</id>
    <code>dc2</code>
    <disabled type="boolean">false</disabled>
    <act-once type="boolean">true</act-once>
    <expired-at type="date">2020-12-12</expired-at>
    <type-id type="integer">2</type-id>
    <discount type="decimal">100.0</discount>
    <description>фиксированная скидка</description>
    <created-at type="dateTime">2009-03-18T10:53:14+03:00</created-at>
    <updated-at type="dateTime">2009-03-18T10:53:15+03:00</updated-at>
    <skip-discounted-product type="boolean" nil="true"/>
    <min-price type="decimal" nil="true"/>
    <act-once-for-client type="boolean" nil="true"/>
    <skip-bundles type="boolean" nil="true"/>
    <worked type="boolean">false</worked>
    <discount-collections type="array"/>
  </discount-code>
  <discount-code>
    <id type="integer">1</id>
    <code>dc1</code>
    <disabled type="boolean">false</disabled>
    <act-once type="boolean">true</act-once>
    <expired-at type="date">2020-12-12</expired-at>
    <type-id type="integer">1</type-id>
    <discount type="decimal">30.0</discount>
    <description>процентная скидка</description>
    <created-at type="dateTime">2009-03-18T10:53:14+03:00</created-at>
    <updated-at type="dateTime">2009-03-18T10:53:15+03:00</updated-at>
    <skip-discounted-product type="boolean" nil="true"/>
    <min-price type="decimal" nil="true"/>
    <act-once-for-client type="boolean" nil="true"/>
    <skip-bundles type="boolean" nil="true"/>
    <worked type="boolean">false</worked>
    <discount-collections type="array"/>
  </discount-code>
</discount-codes>

Update discount code

Endpoint

PUT /admin/discount_codes/:discount_code_id.xml

Parameters

Name Description
discount_code[discount] discount

Request

Route

PUT /admin/discount_codes/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<discount-code>
  <discount type="integer">15</discount>
</discount-code>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Domain

Create domain

Endpoint

POST /admin/domains.xml

Parameters

Name Description
domain[domain] required domain
domain[main] boolean, could be false only if there are more than one domain

Request

Route

POST /admin/domains.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <domain>another-domain.ru</domain>
  <main type="boolean">true</main>
</domain>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <id type="integer">14</id>
  <domain>another-domain.ru</domain>
  <created-at type="timestamp">2025-02-11 00:57:16 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:16 +0300</updated-at>
  <main type="boolean">true</main>
</domain>

Destroy domain

Endpoint

DELETE /admin/domains/:domain_id.xml

Request

Route

DELETE /admin/domains/19.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get domain

Endpoint

GET /admin/domains/:domain_id.xml

Request

Route

GET /admin/domains/11.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <id type="integer">11</id>
  <domain>some-domain.ru</domain>
  <created-at type="timestamp">2025-02-11 00:57:16 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:16 +0300</updated-at>
  <main type="boolean">true</main>
</domain>

Get domains

Endpoint

GET /admin/domains.xml

Request

Route

GET /admin/domains.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<domains type="array">
  <domain>
    <id type="integer">9</id>
    <domain>some-domain.ru</domain>
    <created-at type="timestamp">2025-02-11 00:57:16 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:16 +0300</updated-at>
    <main type="boolean">true</main>
  </domain>
</domains>

Update domain

Endpoint

PUT /admin/domains/:domain_id.xml

Parameters

Name Description
domain[domain] domain
domain[main] boolean, could be false only if there are more than one domain

Request

Route

PUT /admin/domains/17.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <domain>other-domain.ru</domain>
</domain>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <domain>other-domain.ru</domain>
  <id type="integer">17</id>
  <created-at type="timestamp">2025-02-11 00:57:16 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:16 +0300</updated-at>
  <main type="boolean">true</main>
</domain>

ExternalDiscount

Create external discount

Endpoint

POST /admin/external_discounts.xml

Parameters

Name Description
external_discount[description] description
external_discount[url] external service url
external_discount[order_lines_depend] discount calculation depends on order lines
external_discount[active] active
external_discount[observed_fields] discount calculation depends on this order fields (array of field ids)

Request

Route

POST /admin/external_discounts.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<external-discount>
  <description>Birthday discount</description>
  <url>https://myservice.com/birthday_external_discount</url>
  <order-lines-depend type="boolean">false</order-lines-depend>
  <active type="boolean">true</active>
  <observed-fields type="array">
    <observed-field type="integer">1</observed-field>
    <observed-field type="integer">2</observed-field>
  </observed-fields>
</external-discount>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<external-discount>
  <id type="integer">6</id>
  <url>https://myservice.com/birthday_external_discount</url>
  <order-lines-depend type="boolean">false</order-lines-depend>
  <created-at type="timestamp">2025-02-11 00:57:28 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:28 +0300</updated-at>
  <active type="boolean">true</active>
  <description>Birthday discount</description>
  <observed-fields type="array">
    <observed-field type="integer">1</observed-field>
    <observed-field type="integer">2</observed-field>
  </observed-fields>
</external-discount>

Destroy external discount

Endpoint

DELETE /admin/external_discounts/:external_discount_id.xml

Request

Route

DELETE /admin/external_discounts/11.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get external discount

Endpoint

GET /admin/external_discounts/:external_discount_id.xml

Request

Route

GET /admin/external_discounts/3.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<external-discount>
  <id type="integer">3</id>
  <url>https://myservice.com/external_discount</url>
  <order-lines-depend type="boolean" nil="true"/>
  <created-at type="timestamp">2025-02-11 00:57:28 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:28 +0300</updated-at>
  <active type="boolean">true</active>
  <description>My External Discount</description>
  <observed-fields type="array"/>
</external-discount>

Get external discounts

Endpoint

GET /admin/external_discounts.xml

Request

Route

GET /admin/external_discounts.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<external-discounts type="array">
  <external-discount>
    <id type="integer">1</id>
    <url>https://myservice.com/external_discount</url>
    <order-lines-depend type="boolean" nil="true"/>
    <created-at type="timestamp">2025-02-11 00:57:28 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:28 +0300</updated-at>
    <active type="boolean">true</active>
    <description>My External Discount</description>
    <observed-fields type="array"/>
  </external-discount>
</external-discounts>

Update external discount

Endpoint

PUT /admin/external_discounts/:external_discount_id.xml

Parameters

Name Description
external_discount[description] description
external_discount[url] external service url
external_discount[order_lines_depend] discount calculation depends on order lines
external_discount[active] active

Request

Route

PUT /admin/external_discounts/9.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<external-discount>
  <url>https://myservice.com/birthday_external_discount_v2</url>
</external-discount>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<external-discount>
  <url>https://myservice.com/birthday_external_discount_v2</url>
  <id type="integer">9</id>
  <order-lines-depend type="boolean" nil="true"/>
  <created-at type="timestamp">2025-02-11 00:57:28 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:28 +0300</updated-at>
  <active type="boolean">true</active>
  <description>My External Discount</description>
  <observed-fields type="array"/>
</external-discount>

Field

Create field

Endpoint

POST /admin/fields.xml

Parameters

Name Description
field[type] required Field::TextField, Field::TextArea, Field::Checkbox, Field::FileField (only for Order), Field::Delivery
field[office_title] required title for backoffice
field[destiny] required integer, defines subject that field belongs to: 1 - ShippingAddress, 2 - Client::Individual, 5 - Client::Juridical, 3 - Order, 4 - OrderLine, 6 - Client
field[handle] You can create or update value by handle
field[title] title
field[active] true by default, defines ability of filling field by a customer
field[for_buyer] true by defaut, defines visibility for a customer
field[obligatory] false by default
field[show_in_result] true by default, field will be shown in result
field[show_in_checkout] true by default, field will be shown in checkout
field[position] position in fields list
field[is_indexed] boolean, true if searchable
field[hide_in_backoffice] boolean, true to hide in backoffice

Request

Route

POST /admin/fields.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <type>Field::TextField</type>
  <office-title>title_for_text_field</office-title>
  <destiny type="integer">1</destiny>
  <handle>my_awesome_field_1</handle>
  <title>title_for_text_field</title>
  <active type="boolean">false</active>
  <for-buyer type="boolean">false</for-buyer>
  <show-in-result type="boolean">false</show-in-result>
  <show-in-checkout type="boolean">false</show-in-checkout>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
</field>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <id type="integer">177</id>
  <destiny type="integer">1</destiny>
  <position type="integer">22</position>
  <office-title>title_for_text_field</office-title>
  <for-buyer type="boolean">false</for-buyer>
  <obligatory type="boolean">false</obligatory>
  <active type="boolean">false</active>
  <system-name nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:17+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:17+03:00</updated-at>
  <show-in-result type="boolean">false</show-in-result>
  <show-in-checkout type="boolean">false</show-in-checkout>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
  <handle>my_awesome_field_1</handle>
  <title>title_for_text_field</title>
  <example nil="true"/>
  <type>Field::TextField</type>
</field>

Create select field

Endpoint

POST /admin/fields.xml

Parameters

Name Description
field[type] required Field::Select
field[office_title] required title for backoffice
field[destiny] required integer, defines subject that field belongs to: 1 - ShippingAddress, 2 - Client::Individual, 5 - Client::Juridical, 3 - Order, 4 - OrderLine, 6 - Client
field[handle] You can create or update value by handle
field[title] title
field[active] true by default, defines ability of filling field by a customer
field[for_buyer] true by defaut, defines visibility for a customer
field[obligatory] false by default
field[show_in_result] true by default, field will be shown in result
field[show_in_checkout] true by default, field will be shown in checkout
field[position] position in fields list
field[is_indexed] boolean, true if searchable
field[hide_in_backoffice] boolean, true to hide in backoffice
field[field_options_attributes] array of field options objects

Request

Route

POST /admin/fields.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <type>Field::Select</type>
  <office-title>title_for_select_field</office-title>
  <destiny type="integer">1</destiny>
  <handle>my_select_field_1</handle>
  <title>title_for_select_field</title>
  <active type="boolean">false</active>
  <for-buyer type="boolean">false</for-buyer>
  <show-in-result type="boolean">false</show-in-result>
  <show-in-checkout type="boolean">false</show-in-checkout>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
  <field-options-attributes type="array">
    <field-options-attribute>
      <value type="integer">1</value>
    </field-options-attribute>
    <field-options-attribute>
      <value type="integer">2</value>
    </field-options-attribute>
  </field-options-attributes>
</field>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <id type="integer">179</id>
  <destiny type="integer">1</destiny>
  <position type="integer">22</position>
  <office-title>title_for_select_field</office-title>
  <for-buyer type="boolean">false</for-buyer>
  <obligatory type="boolean">false</obligatory>
  <active type="boolean">false</active>
  <system-name nil="true"/>
  <created-at type="dateTime">2025-02-11T00:57:18+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:18+03:00</updated-at>
  <show-in-result type="boolean">false</show-in-result>
  <show-in-checkout type="boolean">false</show-in-checkout>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
  <handle>my_select_field_1</handle>
  <title>title_for_select_field</title>
  <example nil="true"/>
  <type>Field::Select</type>
  <field-options type="array">
    <field-option>
      <id type="integer">5</id>
      <position type="integer">1</position>
      <value>1</value>
    </field-option>
    <field-option>
      <id type="integer">6</id>
      <position type="integer">2</position>
      <value>2</value>
    </field-option>
  </field-options>
</field>

Destroy field

Only these types can be destroyed: Field::TextField, Field::TextArea, Field::Select,Field::Checkbox, Field::Delivery, Field::FileField (only for Order)

Endpoint

DELETE /admin/fields/:field_id.xml

Request

Route

DELETE /admin/fields/23.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get field

Endpoint

GET /admin/fields/:field_id.xml

Request

Route

GET /admin/fields/23.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <id type="integer">23</id>
  <destiny type="integer">2</destiny>
  <position type="integer">6</position>
  <office-title>Селект</office-title>
  <for-buyer type="boolean">true</for-buyer>
  <obligatory type="boolean">false</obligatory>
  <active type="boolean">false</active>
  <system-name nil="true"/>
  <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
  <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
  <show-in-result type="boolean">true</show-in-result>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <is-indexed type="boolean" nil="true"/>
  <hide-in-backoffice type="boolean" nil="true"/>
  <handle nil="true"/>
  <title>Селект</title>
  <example nil="true"/>
  <type>Field::Select</type>
  <field-options type="array">
    <field-option>
      <id type="integer">1</id>
      <position type="integer">1</position>
      <value>Передан</value>
    </field-option>
    <field-option>
      <id type="integer">2</id>
      <position type="integer">2</position>
      <value>Не передан</value>
    </field-option>
  </field-options>
</field>

Get fields

Endpoint

GET /admin/fields.xml

Request

Route

GET /admin/fields.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<fields type="array">
  <field>
    <id type="integer">1</id>
    <destiny type="integer">1</destiny>
    <position type="integer">0</position>
    <office-title>Страна</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>country</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::Country</type>
  </field>
  <field>
    <id type="integer">11</id>
    <destiny type="integer">2</destiny>
    <position type="integer">1</position>
    <office-title>Имя</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">true</obligatory>
    <active type="boolean">true</active>
    <system-name>name</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::ObligatoryTextField</type>
  </field>
  <field>
    <id type="integer">2</id>
    <destiny type="integer">1</destiny>
    <position type="integer">1</position>
    <office-title>Регион</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>state</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">3</id>
    <destiny type="integer">1</destiny>
    <position type="integer">2</position>
    <office-title>Город</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>city</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">12</id>
    <destiny type="integer">2</destiny>
    <position type="integer">2</position>
    <office-title>Телефон</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">true</obligatory>
    <active type="boolean">true</active>
    <system-name>phone</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::Phone</type>
  </field>
  <field>
    <id type="integer">4</id>
    <destiny type="integer">1</destiny>
    <position type="integer">3</position>
    <office-title>Адрес</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">true</active>
    <system-name>address</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextArea</type>
  </field>
  <field>
    <id type="integer">13</id>
    <destiny type="integer">2</destiny>
    <position type="integer">3</position>
    <office-title>E-mail</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">true</obligatory>
    <active type="boolean">true</active>
    <system-name>email</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">14</id>
    <destiny type="integer">2</destiny>
    <position type="integer">4</position>
    <office-title>Подтверждение e-mail</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">true</obligatory>
    <active type="boolean">false</active>
    <system-name>email_confirmation</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">5</id>
    <destiny type="integer">1</destiny>
    <position type="integer">4</position>
    <office-title>Почтовый индекс</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>zip</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">21</id>
    <destiny type="integer">2</destiny>
    <position type="integer">4</position>
    <office-title>Фамилия</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>surname</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">22</id>
    <destiny type="integer">2</destiny>
    <position type="integer">5</position>
    <office-title>Отчество</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>middlename</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">23</id>
    <destiny type="integer">2</destiny>
    <position type="integer">6</position>
    <office-title>Селект</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name nil="true"/>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title>Селект</title>
    <example nil="true"/>
    <type>Field::Select</type>
    <field-options type="array">
      <field-option>
        <id type="integer">1</id>
        <position type="integer">1</position>
        <value>Передан</value>
      </field-option>
      <field-option>
        <id type="integer">2</id>
        <position type="integer">2</position>
        <value>Не передан</value>
      </field-option>
    </field-options>
  </field>
  <field>
    <id type="integer">172</id>
    <destiny type="integer">2</destiny>
    <position type="integer">18</position>
    <office-title>Согласие на обработку персональных данных</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">true</obligatory>
    <active type="boolean">false</active>
    <system-name>consent_to_personal_data</system-name>
    <created-at type="dateTime">2025-02-11T00:56:43+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:56:43+03:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemCheckbox</type>
  </field>
  <field>
    <id type="integer">106</id>
    <destiny type="integer">1</destiny>
    <position type="integer">19</position>
    <office-title>Улица</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>street</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">107</id>
    <destiny type="integer">1</destiny>
    <position type="integer">20</position>
    <office-title>Дом</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>house</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">108</id>
    <destiny type="integer">1</destiny>
    <position type="integer">21</position>
    <office-title>Квартира</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">false</obligatory>
    <active type="boolean">false</active>
    <system-name>flat</system-name>
    <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
    <updated-at type="dateTime">2010-10-12T13:31:09+04:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle nil="true"/>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <id type="integer">174</id>
    <destiny type="integer">3</destiny>
    <position type="integer">22</position>
    <office-title>АКС айди отгрузки</office-title>
    <for-buyer type="boolean">true</for-buyer>
    <obligatory type="boolean">true</obligatory>
    <active type="boolean">false</active>
    <system-name nil="true"/>
    <created-at type="dateTime">2025-02-11T00:56:43+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:56:43+03:00</updated-at>
    <show-in-result type="boolean">true</show-in-result>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <is-indexed type="boolean" nil="true"/>
    <hide-in-backoffice type="boolean" nil="true"/>
    <handle>aks_shipment_id</handle>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::TextField</type>
  </field>
</fields>

Update field

Endpoint

PUT /admin/fields/:non_select_field_id.xml

Parameters

Name Description
field[office_title] title for backoffice
field[title] title
field[active] true by default, defines ability of filling field by a customer
field[for_buyer] true by defaut, defines visibility for a customer
field[obligatory] false by default
field[show_in_result] true by default, field will be shown in result
field[show_in_checkout] true by default, field will be shown in checkout
field[position] position in fields list
field[handle] You can create or update value by handle
field[is_indexed] boolean, true if searchable
field[hide_in_backoffice] boolean, true to hide in backoffice

Request

Route

PUT /admin/fields/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <office-title>state_code</office-title>
  <title>State code</title>
  <active type="boolean">true</active>
  <for-buyer type="boolean">true</for-buyer>
  <obligatory type="boolean">true</obligatory>
  <show-in-result type="boolean">true</show-in-result>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <position type="integer">1</position>
  <handle>my_awesome_field_2</handle>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
</field>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <handle>my_awesome_field_2</handle>
  <active type="boolean">true</active>
  <for-buyer type="boolean">true</for-buyer>
  <office-title>state_code</office-title>
  <obligatory type="boolean">true</obligatory>
  <show-in-result type="boolean">true</show-in-result>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <position type="integer">1</position>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
  <id type="integer">2</id>
  <destiny type="integer">1</destiny>
  <system-name>state</system-name>
  <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:17+03:00</updated-at>
  <title>State code</title>
  <example nil="true"/>
  <type>Field::SystemTextField</type>
</field>

Update select field

Endpoint

PUT /admin/fields/:field_id.xml

Parameters

Name Description
field[office_title] title for backoffice
field[title] title
field[active] true by default, defines ability of filling field by a customer
field[for_buyer] true by defaut, defines visibility for a customer
field[obligatory] false by default
field[show_in_result] true by default, field will be shown in result
field[show_in_checkout] true by default, field will be shown in checkout
field[position] position in fields list
field[handle] You can create or update value by handle
field[is_indexed] boolean, true if searchable
field[hide_in_backoffice] boolean, true to hide in backoffice
field[field_options_attributes] array of field options objects

Request

Route

PUT /admin/fields/23.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <office-title>state_code</office-title>
  <title>State code</title>
  <active type="boolean">true</active>
  <for-buyer type="boolean">true</for-buyer>
  <obligatory type="boolean">true</obligatory>
  <show-in-result type="boolean">true</show-in-result>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <position type="integer">2</position>
  <handle>my_awesome_field_10</handle>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
  <field-options-attributes type="array">
    <field-options-attribute>
      <value type="integer">10</value>
    </field-options-attribute>
    <field-options-attribute>
      <id type="integer">1</id>
      <value type="integer">20</value>
    </field-options-attribute>
  </field-options-attributes>
</field>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <handle>my_awesome_field_10</handle>
  <active type="boolean">true</active>
  <for-buyer type="boolean">true</for-buyer>
  <office-title>state_code</office-title>
  <obligatory type="boolean">true</obligatory>
  <show-in-result type="boolean">true</show-in-result>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <position type="integer">2</position>
  <is-indexed type="boolean">true</is-indexed>
  <hide-in-backoffice type="boolean">true</hide-in-backoffice>
  <id type="integer">23</id>
  <destiny type="integer">2</destiny>
  <system-name nil="true"/>
  <created-at type="dateTime">2010-10-12T13:31:09+04:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:18+03:00</updated-at>
  <title>State code</title>
  <example nil="true"/>
  <type>Field::Select</type>
  <field-options type="array">
    <field-option>
      <id type="integer">1</id>
      <position type="integer">1</position>
      <value>20</value>
    </field-option>
    <field-option>
      <id type="integer">2</id>
      <position type="integer">2</position>
      <value>Не передан</value>
    </field-option>
    <field-option>
      <id type="integer">3</id>
      <position type="integer">3</position>
      <value>10</value>
    </field-option>
  </field-options>
</field>

File

Create file from attachment

Endpoint

POST /admin/files.xml

Parameters

Name Description
file[attachment] required file
file[filename] required file name

Request

Route

POST /admin/files.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <attachment>/9j/4AAQSkZJRgABAQEASABIAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4w
ICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAG
BAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAs
ICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgo
KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AA
EQgAWQBkAwEiAAIRAQMRAf/EAB0AAAEEAwEBAAAAAAAAAAAAAAgABQYHAQME
Agn/xABEEAABAwMBBAYHBgIHCQAAAAABAgMEAAURBgcSITEIE0FRYYEUIjJx
kbHSIzd1lKGzFRg1QkNSYqLwJSYzY3KCksLT/8QAGQEAAgMBAAAAAAAAAAAA
AAAAAAEDBAUC/8QAIxEAAgICAgIBBQAAAAAAAAAAAAECEQMEEjEhQVEFEyIz
gf/aAAwDAQACEQMRAD8AKmlVT7Q9oF4sGqV223NxFthpC0hxoqUSQSeO8O6o
cvbbd23ktO/w5LiuASWFDP8AmrlzivDY+LqwiaVDwNtl5KlpDUTeQMqHobvA
fGtLm3G9IRvlFvCOPFUZwf8AtS+7D5EEbSoYv5g7qpwIaNqUonAHo7nP/wAq
4pHSQujDq2nFWhLiCUqSqO5kEdntV1YBVUqEtfSXvGfVVZvy7n1VpV0mL7n1
TZfyzn1UwC6pUIKukzqDs/gv5Zz661npM6j7DZfyrn10AGFSoOVdJnU39X+C
/lXPrr2OkjqlxIDD1jW6R/wxDdz8SrFABh0qZ9IXB67aTs1xlhAkS4bL7m4M
J3lIBOB2DJpUAUNt3usew67NzmRm5LLbbSeqcGQSUKA4VV8rag2JoQxY7e2w
ocFdWARU86UPUpvxVKSpbG/F6xCTglPrZwe/FVDb1Q4Vyc9HjIQyyvAku4cc
HHhugjdB8s+NUtnHjk7mrJY5JKPFPwXBZro07aWp98YMVCsKaQ4d31f76u4d
3fXq/SrdfYhTYoMVx5KSClZwV45lIJ9Y+GKi1usV01pdWFMOmW2jGX3DlpA7
CByJ9/Luq2bZpyBpiE21bCHZ6R68pwZDiu0b3+h4VhuEMfn38fBS2c1A26g0
9qELUpNtdbaPFCkxktocHhkAg+BqIXiJJknfeZWiaBhSVJwXMdo7zRoL1XLa
ixw8A2p7rG+rdxlLiBk8+Y4jj41HZ1tsGso5D8CEuafW3mMNqV78cD7+Yra1
c7nSaKq2+PaAxP61gc6tDa7oFenrupyGHHITw6xpxQ9bHahf+NJ4E9owarAg
pUQoYIrQaa7L+PIskeSMGsVk1ikdirts/wDSDfuPyNcVd1m/pFr3K+RoA+ke
zj7vtM/hsb9tNKls4+77TP4ZG/bTSoAHXpTuFGonhkAbkfn7lVS1tdRMkIRI
O6CrOeQzjl8R+tXJ0qsK1M8kkZ6uPgHtOFcKHp9L7LXpLCypkEJWlQzuE8s+
BqOcFIGX7p2/Lstl/h0Wa20pWSpDDZPDwXgDPPlXbaZl1E1wpnOSG1J+xSXd
5RPd61UDA1M5AblJVGYeL7WG1nILTg4BYAOMgZ+NXHscntahtsx6Y71a22/R
9xtPsrUCAodw5ms2enxtmfsY3FOTHDVe0G4yFqhz7UhEtlCmGkqGVNk8CEnx
8fGvOkhchFEiZPhxIyXApS1kNgAcgnHEnPj8a49QliU6lltaRLDhQCsZ3TnB
xnxzjspnf07cusT10z0pCVb286d3cAPYOVa+th4pUis+LjXRONfzEaiaSxAl
FXo32eFew6o4OFA9vcrvobr7C6mW6hbZQQo44csH/XCr2hT4iI4bQ2SFulMh
wD1lgJGefLPLyrfd9A2fVbyZlnddW8GwpUb2G5I5ApdPAODGCOGR7q1J6jyQ
uL8ljTuH4+gZyhQVu4416cZcax1ja0Z5bySM0Tlk0JFtqt17diKTzjxkBCz/
ANTisk+VP0pVsYgLju2mJMiKG643JCnQoeJJ/UcakX0ebjfLyauPG8nQINd1
m4XFr3K+Rp013ZEWPUsyPGSRCU4Vx+OfszxAz4A48qa7QP8AaDXuPyNZE4OE
nGXaOJRcW0z6R7OPu+0z+GRv200qxs3+73TP4ZG/bTSrkQMnS6WU6kfx2Nxj
+iqoazXRCHermgLaWnq3N44C0nsPce0HvAq9el2f955A/wCVG+SqHAAUqsTV
kkn6fUw6gAuuQnfWZkIRkY7j2Z7+NPemrmzoqUtReffYloCHWwNzkchQwSeH
f41Cos6TFQUR5TzSFc0oWQD5V0tyWpI3JjqgvscPH40JemRyg5KpdFkS7/Gv
Oun7rBJXbmGUuvKVkJBCcqwO/IPGsW3XLc5b5fe6tTn9mTugDuHuFQiTcYkG
xuW+3uF56Qft3sYSEZB3R3kkDJ7hTAOfCp1kcOiJa8ZLz/C/bJMt7cZW4hS2
XVgLQlXnnOedTS33q0Wq2b8PcMxSjiO2AXFZ7cJz29tDZbwZMF9pXEhPWDvO
Of6Zp30/f3LddIRjoyktqQnJxneBGM+PCtjX3opRjJUmSY8Siy29Rank3+0u
zmS4xIiK3XUJO6efAntyKY7BPdvS3WH3kNvupIbcUopSF9mTngCe3srk01MQ
9MTujMKYkpIxzJ4EK/xA8KYWUu225vRST1gWUj3d/wAKt5MzXGS66NrBDhT9
GvarGdbbjCc04zNb3UuNuDCknBHH4cxwPMVBbUMTmz4H5GiCv7LGudGyLbIb
37tAiqkQXwPX+zGS0T2pKQQO44qgrYAJbZ/vA4+FYW9+2yvvY3DJb9n0X2b/
AHeaY/DI37aaVY2bfd5pj8Mj/tppVTKZXO1nZReNZarcuMN62iKpltvckqVv
byc8cBJHbUI/l2vh5uWH4r+iiiKgOZFa1Ptp9pYFAAvno6Xw/wBrYB5r+isK
6Od8PJ7T/wDn+iidVPjJ5upFa1XWEkEqkIAHeaABhV0b7+cn0jT481/RVQX6
3x9Napm2y4W9iWuBIUy8G/VQ4U88HAIHlmjan7SdKQypK7s24ocCGULc/UDF
BptHuEe5671BOiq3o8ia442VDBKSeHA8qQmME+5W95SPQrOmGBnO4srKvjyx
VmaJ2IXvV+l4F9t0i0MxZYUptt8rC07qinjhBHNJ7aqXeG9x3fKi02HbR9LW
nZpY7Xc7mmLLYQ4FpW0vdBLqyPWAxyIpgiCJ6OerEexcrInjng66OPf7FeXO
jlq1a983KyFZ5qLzuT57lE9bL/arpFTIt1wjSWFcAtpYUM93vrsEtg8nUHzp
2xgrN9HbWbSipq72hCsYymQ8DjyRWgdGvVSTlM6whQ5EOOf/ADosw82eS0/G
vQWk/wBYUgfkadI2x6zaUs1slKbW/DhtR3FNklJUlABIzxxwpU77w7xSoA5J
DTqgd2mSdbZzgPV/OpNSoArefp29O56v5moxetCajuEKRG31oQ8goKkLIIBG
OBq76VKh2CC5sX2kwlbsGe3KYHshxeFAf9wPzrhlbDNYvhx56A6uUs7yt15r
BPwozKVFCAgOwjXa1bqbKRx9pUlvj5U7RdiG0bqgyyiNDZHAbzyVEfBNGTSp
hQO2z7ZNqjTLMkv3Bch+SpKnDvHdGBwwPPnVhwdN3xvHWOk+dWNSpUOyLw7T
Pbx1i8+dO7ER5A9ZQpxpUxGkNKA5ilW6lQB//9k=
</attachment>
  <filename>some file</filename>
</file>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <id type="integer">4</id>
  <created-at type="dateTime">2025-02-11T00:58:35+03:00</created-at>
  <absolute-url>http://minio.insales.io:9000/insales-test-sber/files/1/4/4/original/some_file.?1739224715</absolute-url>
</file>

Create file from url

Endpoint

POST /admin/files.xml

Parameters

Name Description
file[src] required file url

Request

Route

POST /admin/files.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <src>https://abc.myinsales.ru/images/no_image_compact.jpg</src>
</file>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <id type="integer">2</id>
  <created-at type="dateTime">2025-02-11T00:58:35+03:00</created-at>
  <absolute-url>http://minio.insales.io:9000/insales-test-sber/files/1/2/2/original/no_image_compact.jpg?1739224715</absolute-url>
</file>

Destroy file

Endpoint

DELETE /admin/files/:account_file_id.xml

Request

Route

DELETE /admin/files/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get file

Endpoint

GET /admin/files/:account_file_id.xml

Request

Route

GET /admin/files/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <id type="integer">1</id>
  <created-at type="dateTime">2009-03-18T07:53:15+03:00</created-at>
  <absolute-url>http://minio.insales.io:9000/insales-test-sber/files/1/original/thumb_prayerbeads.jpg</absolute-url>
</file>

Get files

Endpoint

GET /admin/files.xml

Request

Route

GET /admin/files.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<files type="array">
  <file>
    <id type="integer">1</id>
    <created-at type="dateTime">2009-03-18T07:53:15+03:00</created-at>
    <absolute-url>http://minio.insales.io:9000/insales-test-sber/files/1/original/thumb_prayerbeads.jpg</absolute-url>
  </file>
</files>

Image

Create image from attachment

After uploading your picture you may find ‘loading.gif’ instead of it. That’s because picture uploading and creating of thumbnails are asynchronous. When it’s uploaded and thumbnails’re created its attribute updated_at will be overwritten with new timestamp.

Endpoint

POST /admin/products/:product_id/images.xml

Parameters

Name Description
image[attachment] required image file
image[filename] required file name
image[title] title
image[position] position

Request

Route

POST /admin/products/1/images.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <attachment>/9j/4AAQSkZJRgABAQEASABIAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4w
ICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAG
BAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAs
ICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgo
KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AA
EQgAWQBkAwEiAAIRAQMRAf/EAB0AAAEEAwEBAAAAAAAAAAAAAAgABQYHAQME
Agn/xABEEAABAwMBBAYHBgIHCQAAAAABAgMEAAURBgcSITEIE0FRYYEUIjJx
kbHSIzd1lKGzFRg1QkNSYqLwJSYzY3KCksLT/8QAGQEAAgMBAAAAAAAAAAAA
AAAAAAEDBAUC/8QAIxEAAgICAgIBBQAAAAAAAAAAAAECEQMEEjEhQVEFEyIz
gf/aAAwDAQACEQMRAD8AKmlVT7Q9oF4sGqV223NxFthpC0hxoqUSQSeO8O6o
cvbbd23ktO/w5LiuASWFDP8AmrlzivDY+LqwiaVDwNtl5KlpDUTeQMqHobvA
fGtLm3G9IRvlFvCOPFUZwf8AtS+7D5EEbSoYv5g7qpwIaNqUonAHo7nP/wAq
4pHSQujDq2nFWhLiCUqSqO5kEdntV1YBVUqEtfSXvGfVVZvy7n1VpV0mL7n1
TZfyzn1UwC6pUIKukzqDs/gv5Zz661npM6j7DZfyrn10AGFSoOVdJnU39X+C
/lXPrr2OkjqlxIDD1jW6R/wxDdz8SrFABh0qZ9IXB67aTs1xlhAkS4bL7m4M
J3lIBOB2DJpUAUNt3usew67NzmRm5LLbbSeqcGQSUKA4VV8rag2JoQxY7e2w
ocFdWARU86UPUpvxVKSpbG/F6xCTglPrZwe/FVDb1Q4Vyc9HjIQyyvAku4cc
HHhugjdB8s+NUtnHjk7mrJY5JKPFPwXBZro07aWp98YMVCsKaQ4d31f76u4d
3fXq/SrdfYhTYoMVx5KSClZwV45lIJ9Y+GKi1usV01pdWFMOmW2jGX3DlpA7
CByJ9/Luq2bZpyBpiE21bCHZ6R68pwZDiu0b3+h4VhuEMfn38fBS2c1A26g0
9qELUpNtdbaPFCkxktocHhkAg+BqIXiJJknfeZWiaBhSVJwXMdo7zRoL1XLa
ixw8A2p7rG+rdxlLiBk8+Y4jj41HZ1tsGso5D8CEuafW3mMNqV78cD7+Yra1
c7nSaKq2+PaAxP61gc6tDa7oFenrupyGHHITw6xpxQ9bHahf+NJ4E9owarAg
pUQoYIrQaa7L+PIskeSMGsVk1ikdirts/wDSDfuPyNcVd1m/pFr3K+RoA+ke
zj7vtM/hsb9tNKls4+77TP4ZG/bTSoAHXpTuFGonhkAbkfn7lVS1tdRMkIRI
O6CrOeQzjl8R+tXJ0qsK1M8kkZ6uPgHtOFcKHp9L7LXpLCypkEJWlQzuE8s+
BqOcFIGX7p2/Lstl/h0Wa20pWSpDDZPDwXgDPPlXbaZl1E1wpnOSG1J+xSXd
5RPd61UDA1M5AblJVGYeL7WG1nILTg4BYAOMgZ+NXHscntahtsx6Y71a22/R
9xtPsrUCAodw5ms2enxtmfsY3FOTHDVe0G4yFqhz7UhEtlCmGkqGVNk8CEnx
8fGvOkhchFEiZPhxIyXApS1kNgAcgnHEnPj8a49QliU6lltaRLDhQCsZ3TnB
xnxzjspnf07cusT10z0pCVb286d3cAPYOVa+th4pUis+LjXRONfzEaiaSxAl
FXo32eFew6o4OFA9vcrvobr7C6mW6hbZQQo44csH/XCr2hT4iI4bQ2SFulMh
wD1lgJGefLPLyrfd9A2fVbyZlnddW8GwpUb2G5I5ApdPAODGCOGR7q1J6jyQ
uL8ljTuH4+gZyhQVu4416cZcax1ja0Z5bySM0Tlk0JFtqt17diKTzjxkBCz/
ANTisk+VP0pVsYgLju2mJMiKG643JCnQoeJJ/UcakX0ebjfLyauPG8nQINd1
m4XFr3K+Rp013ZEWPUsyPGSRCU4Vx+OfszxAz4A48qa7QP8AaDXuPyNZE4OE
nGXaOJRcW0z6R7OPu+0z+GRv200qxs3+73TP4ZG/bTSrkQMnS6WU6kfx2Nxj
+iqoazXRCHermgLaWnq3N44C0nsPce0HvAq9el2f955A/wCVG+SqHAAUqsTV
kkn6fUw6gAuuQnfWZkIRkY7j2Z7+NPemrmzoqUtReffYloCHWwNzkchQwSeH
f41Cos6TFQUR5TzSFc0oWQD5V0tyWpI3JjqgvscPH40JemRyg5KpdFkS7/Gv
Oun7rBJXbmGUuvKVkJBCcqwO/IPGsW3XLc5b5fe6tTn9mTugDuHuFQiTcYkG
xuW+3uF56Qft3sYSEZB3R3kkDJ7hTAOfCp1kcOiJa8ZLz/C/bJMt7cZW4hS2
XVgLQlXnnOedTS33q0Wq2b8PcMxSjiO2AXFZ7cJz29tDZbwZMF9pXEhPWDvO
Of6Zp30/f3LddIRjoyktqQnJxneBGM+PCtjX3opRjJUmSY8Siy29Rank3+0u
zmS4xIiK3XUJO6efAntyKY7BPdvS3WH3kNvupIbcUopSF9mTngCe3srk01MQ
9MTujMKYkpIxzJ4EK/xA8KYWUu225vRST1gWUj3d/wAKt5MzXGS66NrBDhT9
GvarGdbbjCc04zNb3UuNuDCknBHH4cxwPMVBbUMTmz4H5GiCv7LGudGyLbIb
37tAiqkQXwPX+zGS0T2pKQQO44qgrYAJbZ/vA4+FYW9+2yvvY3DJb9n0X2b/
AHeaY/DI37aaVY2bfd5pj8Mj/tppVTKZXO1nZReNZarcuMN62iKpltvckqVv
byc8cBJHbUI/l2vh5uWH4r+iiiKgOZFa1Ptp9pYFAAvno6Xw/wBrYB5r+isK
6Od8PJ7T/wDn+iidVPjJ5upFa1XWEkEqkIAHeaABhV0b7+cn0jT481/RVQX6
3x9Napm2y4W9iWuBIUy8G/VQ4U88HAIHlmjan7SdKQypK7s24ocCGULc/UDF
BptHuEe5671BOiq3o8ia442VDBKSeHA8qQmME+5W95SPQrOmGBnO4srKvjyx
VmaJ2IXvV+l4F9t0i0MxZYUptt8rC07qinjhBHNJ7aqXeG9x3fKi02HbR9LW
nZpY7Xc7mmLLYQ4FpW0vdBLqyPWAxyIpgiCJ6OerEexcrInjng66OPf7FeXO
jlq1a983KyFZ5qLzuT57lE9bL/arpFTIt1wjSWFcAtpYUM93vrsEtg8nUHzp
2xgrN9HbWbSipq72hCsYymQ8DjyRWgdGvVSTlM6whQ5EOOf/ADosw82eS0/G
vQWk/wBYUgfkadI2x6zaUs1slKbW/DhtR3FNklJUlABIzxxwpU77w7xSoA5J
DTqgd2mSdbZzgPV/OpNSoArefp29O56v5moxetCajuEKRG31oQ8goKkLIIBG
OBq76VKh2CC5sX2kwlbsGe3KYHshxeFAf9wPzrhlbDNYvhx56A6uUs7yt15r
BPwozKVFCAgOwjXa1bqbKRx9pUlvj5U7RdiG0bqgyyiNDZHAbzyVEfBNGTSp
hQO2z7ZNqjTLMkv3Bch+SpKnDvHdGBwwPPnVhwdN3xvHWOk+dWNSpUOyLw7T
Pbx1i8+dO7ER5A9ZQpxpUxGkNKA5ilW6lQB//9k=
</attachment>
  <filename>image.jpg</filename>
</image>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <id type="integer">8</id>
  <product-id type="integer">1</product-id>
  <position type="integer">1</position>
  <created-at type="timestamp">2025-02-11 00:57:58 +0300</created-at>
  <image-processing type="boolean">true</image-processing>
  <external-id nil="true"/>
  <title nil="true"/>
  <url>/images/loading.gif</url>
  <original-url>/images/loading.gif</original-url>
  <medium-url>/images/loading.gif</medium-url>
  <small-url>/images/loading.gif</small-url>
  <thumb-url>/images/loading.gif</thumb-url>
  <compact-url>/images/loading.gif</compact-url>
  <large-url>/images/loading.gif</large-url>
  <filename>image.jpg</filename>
  <image-content-type>image/jpeg</image-content-type>
</image>

Create image from src

After uploading your picture you may find ‘loading.gif’ instead of it. That’s because picture uploading and creating of thumbnails are asynchronous. When it’s uploaded and thumbnails’re created its attribute updated_at will be overwritten with a new timestamp.

Endpoint

POST /admin/products/:product_id/images.xml

Parameters

Name Description
image[src] required image url
image[filename] file name
image[title] title
image[position] position
image[external_id] ID in external system. It helps to identify image after recreation and so on

Request

Route

POST /admin/products/1/images.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <src>https://abc.myinsales.ru/images/no_image_compact.jpg</src>
</image>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <id type="integer">6</id>
  <product-id type="integer">1</product-id>
  <position type="integer">1</position>
  <created-at type="timestamp">2025-02-11 00:57:58 +0300</created-at>
  <image-processing type="boolean">true</image-processing>
  <external-id nil="true"/>
  <title nil="true"/>
  <url>/images/loading.gif</url>
  <original-url>/images/loading.gif</original-url>
  <medium-url>/images/loading.gif</medium-url>
  <small-url>/images/loading.gif</small-url>
  <thumb-url>/images/loading.gif</thumb-url>
  <compact-url>/images/loading.gif</compact-url>
  <large-url>/images/loading.gif</large-url>
  <filename>no_image_compact.jpg</filename>
  <image-content-type>image/jpeg</image-content-type>
</image>

Destroy image

Endpoint

DELETE /admin/products/:product_id/images/:image_id.xml

Request

Route

DELETE /admin/products/1/images/12.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get image

Endpoint

GET /admin/products/:product_id/images/:image_id.xml

Request

Route

GET /admin/products/1/images/4.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <id type="integer">4</id>
  <product-id type="integer">1</product-id>
  <position type="integer">1</position>
  <created-at type="timestamp">2025-02-11 00:57:57 +0300</created-at>
  <image-processing type="boolean">true</image-processing>
  <external-id nil="true"/>
  <title nil="true"/>
  <url>/images/loading.gif</url>
  <original-url>/images/loading.gif</original-url>
  <medium-url>/images/loading.gif</medium-url>
  <small-url>/images/loading.gif</small-url>
  <thumb-url>/images/loading.gif</thumb-url>
  <compact-url>/images/loading.gif</compact-url>
  <large-url>/images/loading.gif</large-url>
  <filename>image.jpg</filename>
  <image-content-type>image/jpeg</image-content-type>
</image>

Get images

Endpoint

GET /admin/products/:product_id/images.xml

Request

Route

GET /admin/products/1/images.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<nil-classes type="array"/>

Update image

Endpoint

PUT /admin/products/:product_id/images/:image_id.xml

Parameters

Name Description
image[position] position
image[title] title

Request

Route

PUT /admin/products/1/images/10.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <position type="integer">5</position>
  <title>myimage</title>
</image>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <position type="integer">5</position>
  <id type="integer">10</id>
  <product-id type="integer">1</product-id>
  <created-at type="timestamp">2025-02-11 00:57:58 +0300</created-at>
  <image-processing type="boolean">true</image-processing>
  <external-id nil="true"/>
  <title>myimage</title>
  <url>/images/loading.gif</url>
  <original-url>/images/loading.gif</original-url>
  <medium-url>/images/loading.gif</medium-url>
  <small-url>/images/loading.gif</small-url>
  <thumb-url>/images/loading.gif</thumb-url>
  <compact-url>/images/loading.gif</compact-url>
  <large-url>/images/loading.gif</large-url>
  <filename>image.jpg</filename>
  <image-content-type>image/jpeg</image-content-type>
</image>

JsTag

Create js_tag from code

Please be careful when plugging in jquery: many default themes use old version of it. Including of a new version of JQuery may result in malfunction of your store.

Endpoint

POST /admin/js_tags.xml

Parameters

Name Description
js_tag[type] required JsTag::TextTag
js_tag[content] required javascript code without tag SCRIPT
js_tag[name] name for js tag

Request

Route

POST /admin/js_tags.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<js-tag>
  <type>JsTag::TextTag</type>
  <content>alert('test');</content>
  <name>alert test</name>
</js-tag>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<text-tag>
  <id type="integer">6</id>
  <name>alert test</name>
  <content>alert('test');</content>
  <created-at type="timestamp">2025-02-11 00:58:36 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:36 +0300</updated-at>
  <type>JsTag::TextTag</type>
</text-tag>

Create js_tag from url

Please be careful while including JQuery: many default themes use an old version of it. Including of a new version of JQuery may result in malfunction of your store.

Endpoint

POST /admin/js_tags.xml

Parameters

Name Description
js_tag[type] required JsTag::FileTag
js_tag[content] required url of javascript file
js_tag[name] name for js tag

Request

Route

POST /admin/js_tags.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<js-tag>
  <type>JsTag::FileTag</type>
  <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
  <name>jquery-1.9.1.min</name>
</js-tag>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<file-tag>
  <id type="integer">10</id>
  <name>jquery-1.9.1.min</name>
  <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
  <created-at type="timestamp">2025-02-11 00:58:36 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:36 +0300</updated-at>
  <type>JsTag::FileTag</type>
</file-tag>

Destroy js_tag

Endpoint

DELETE /admin/js_tags/:js_tag_id.xml

Request

Route

DELETE /admin/js_tags/15.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get js_tag

Endpoint

GET /admin/js_tags/:js_tag_id.xml

Request

Route

GET /admin/js_tags/3.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<file-tag>
  <id type="integer">3</id>
  <name>jquery1.9.1</name>
  <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
  <created-at type="timestamp">2025-02-11 00:58:36 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:36 +0300</updated-at>
  <type>JsTag::FileTag</type>
</file-tag>

Get js_tags

Endpoint

GET /admin/js_tags.xml

Request

Route

GET /admin/js_tags.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<js-tags type="array">
  <js-tag>
    <id type="integer">1</id>
    <name>jquery1.9.1</name>
    <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
    <created-at type="timestamp">2025-02-11 00:58:36 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:58:36 +0300</updated-at>
    <type>JsTag::FileTag</type>
  </js-tag>
</js-tags>

Update js_tag

Endpoint

PUT /admin/js_tags/:js_tag_id.xml

Parameters

Name Description
js_tag[content] url of javascript file or javascript code without tag SCRIPT
js_tag[name] name for js tag

Request

Route

PUT /admin/js_tags/13.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<js-tag>
  <content>http://code.jquery.com/jquery-2.2.4.min.js</content>
  <name>jquery-2.2.4</name>
</js-tag>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<file-tag>
  <name>jquery-2.2.4</name>
  <content>http://code.jquery.com/jquery-2.2.4.min.js</content>
  <id type="integer">13</id>
  <created-at type="timestamp">2025-02-11 00:58:36 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:37 +0300</updated-at>
  <type>JsTag::FileTag</type>
</file-tag>

Marketplace

Create Google Merchant marketplace

Endpoint

POST /admin/marketplaces.xml

Parameters

Name Description
marketplace[name] required Name
marketplace[type] required Marketplace::GoogleMerchant
marketplace[description_type] 1 fo short description, 2 for full
marketplace[local_delivery_cost] Local delivery cost
marketplace[adult] 1 if products are adult-only, else 0
marketplace[utm_label] UTM label

Request

Route

POST /admin/marketplaces.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<marketplace>
  <name>GM</name>
  <type>Marketplace::GoogleMerchant</type>
  <description-type type="integer">1</description-type>
  <adult type="integer">0</adult>
</marketplace>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">9</id>
  <name>GM</name>
  <type>Marketplace::GoogleMerchant</type>
  <created-at>2025-02-11T00:58:26.847+03:00</created-at>
  <updated-at>2025-02-11T00:58:26.847+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/9.xml</url>
  <collection-ids type="array"/>
  <description-type type="integer">1</description-type>
  <local-delivery-cost nil="true"/>
  <utm-label nil="true"/>
  <adult type="boolean">false</adult>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">false</use-variants>
</hash>

Create Liquid for Yandex marketplace

Endpoint

POST /admin/marketplaces.xml

Parameters

Name Description
marketplace[name] required Name
marketplace[type] required Marketplace type, e.g. Marketplace::LiquidYandexMarket
marketplace[shop_name] Shop name
marketplace[use_variants] Create document for all variants, not aggregated product
marketplace[shop_company] Company name
marketplace[page_encoding] required Encoding, windows-1251 or utf-8
marketplace[offer_liquid] required Liquid template
marketplace[collection_ids] Collections to load

Request

Route

POST /admin/marketplaces.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<marketplace>
  <name>LYM</name>
  <type>Marketplace::LiquidYandexMarket</type>
  <shop-name>eBay</shop-name>
  <use-variants type="integer">1</use-variants>
  <shop-company>eBay</shop-company>
  <page-encoding>utf-8</page-encoding>
  <offer-liquid>
&lt;offer type="vendor.model" available="{% if product.available %}true{% else %}false{% endif %}" id="{{product.id}}" &gt;
  &lt;url&gt;{{account.url}}/product_by_id/{{product.id}}&lt;/url&gt;
  &lt;price&gt;{{product.price}}&lt;/price&gt;
  &lt;currencyId&gt;RUR&lt;/currencyId&gt;
  &lt;categoryId&gt;{{collection.id}}&lt;/categoryId&gt;
  {%for image in product.images limit: 10 %}
  &lt;picture&gt;{{image.url}}&lt;/picture&gt;
  {% endfor %}
  &lt;store&gt;false&lt;/store&gt;
  &lt;pickup&gt;true&lt;/pickup&gt;
  &lt;delivery&gt;true&lt;/delivery&gt;
  &lt;vendor&gt;{{product.properties.vendor}}&lt;/vendor&gt;
  &lt;model&gt;{{product.title}}&lt;/model&gt;
  &lt;description&gt;{{product.description}}&lt;/description&gt;
&lt;/offer&gt;
        </offer-liquid>
  <collection-ids type="array">
    <collection-id type="integer">6</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">8</collection-id>
  </collection-ids>
</marketplace>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">15</id>
  <name>LYM</name>
  <type>Marketplace::LiquidYandexMarket</type>
  <created-at>2025-02-11T00:58:27.617+03:00</created-at>
  <updated-at>2025-02-11T00:58:27.617+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/15.xml</url>
  <collection-ids type="array"/>
  <local-delivery-cost nil="true"/>
  <vendor-id nil="true"/>
  <offer-liquid>
&lt;offer type="vendor.model" available="{% if product.available %}true{% else %}false{% endif %}" id="{{product.id}}" &gt;
  &lt;url&gt;{{account.url}}/product_by_id/{{product.id}}&lt;/url&gt;
  &lt;price&gt;{{product.price}}&lt;/price&gt;
  &lt;currencyId&gt;RUR&lt;/currencyId&gt;
  &lt;categoryId&gt;{{collection.id}}&lt;/categoryId&gt;
  {%for image in product.images limit: 10 %}
  &lt;picture&gt;{{image.url}}&lt;/picture&gt;
  {% endfor %}
  &lt;store&gt;false&lt;/store&gt;
  &lt;pickup&gt;true&lt;/pickup&gt;
  &lt;delivery&gt;true&lt;/delivery&gt;
  &lt;vendor&gt;{{product.properties.vendor}}&lt;/vendor&gt;
  &lt;model&gt;{{product.title}}&lt;/model&gt;
  &lt;description&gt;{{product.description}}&lt;/description&gt;
&lt;/offer&gt;
        </offer-liquid>
  <page-encoding>utf-8</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">true</use-variants>
</hash>

Create Model for Yandex marketplace

Endpoint

POST /admin/marketplaces.xml

Parameters

Name Description
marketplace[name] required Name
marketplace[type] required Marketplace type, e.g. Marketplace::ModelYandexMarket
marketplace[shop_name] Shop name
marketplace[shop_company] Company name
marketplace[description_type] 1 fo short description, 2 for full
marketplace[vendor_id] required id of corresponding property
marketplace[use_sku_as_vendor_code] Use sku as vendor code
marketplace[pickup] Pickup enable
marketplace[store] Offline store exists
marketplace[delivery_style] Delivery pricing type, 0 for old, 1 for new
marketplace[local_delivery_cost] Local delivery cost
marketplace[adult] 1 if products are adult-only, else 0
marketplace[utm_label] UTM label
marketplace[page_encoding] required Encoding, windows-1251 or utf-8
marketplace[image_style] required Image style: thumb, compact, medium, large or original
marketplace[model_type] required Model naming type: name or sku
marketplace[collection_ids] Collections to load

Request

Route

POST /admin/marketplaces.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<marketplace>
  <name>YM</name>
  <type>Marketplace::ModelYandexMarket</type>
  <shop-name>eBay</shop-name>
  <shop-company>eBay</shop-company>
  <description-type type="integer">1</description-type>
  <vendor-id type="integer">6</vendor-id>
  <adult type="integer">0</adult>
  <page-encoding>windows-1251</page-encoding>
  <image-style>oroginal</image-style>
  <collection-ids type="array">
    <collection-id type="integer">6</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">8</collection-id>
  </collection-ids>
</marketplace>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">7</id>
  <name>YM</name>
  <type>Marketplace::ModelYandexMarket</type>
  <created-at>2025-02-11T00:58:26.578+03:00</created-at>
  <updated-at>2025-02-11T00:58:26.578+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/7.xml</url>
  <collection-ids type="array"/>
  <delivery-price-kind nil="true"/>
  <description-type type="integer">1</description-type>
  <local-delivery-cost nil="true"/>
  <sales-notes nil="true"/>
  <utm-label nil="true"/>
  <vendor-id type="integer">6</vendor-id>
  <page-encoding>windows-1251</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <adult type="boolean">false</adult>
  <delivery type="boolean">true</delivery>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <pickup type="boolean">false</pickup>
  <store type="boolean">false</store>
  <use-sku-as-vendor-code type="boolean">false</use-sku-as-vendor-code>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">false</use-variants>
</hash>

Destroy marketplace

Endpoint

DELETE /admin/marketplaces/:ym_marketplace_id.xml

Request

Route

DELETE /admin/marketplaces/19.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <status type="symbol">ok</status>
</hash>

Get marketplace

Endpoint

GET /admin/marketplaces/:ym_marketplace_id.xml

Request

Route

GET /admin/marketplaces/5.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">5</id>
  <name>Yandex Model</name>
  <type>Marketplace::ModelYandexMarket</type>
  <created-at>2025-02-11T00:58:25.877+03:00</created-at>
  <updated-at>2025-02-11T00:58:25.877+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/5.xml</url>
  <collection-ids type="array"/>
  <delivery-price-kind nil="true"/>
  <description-type type="integer">1</description-type>
  <local-delivery-cost nil="true"/>
  <sales-notes nil="true"/>
  <utm-label nil="true"/>
  <vendor-id type="integer">6</vendor-id>
  <page-encoding>windows-1251</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <adult type="boolean">false</adult>
  <delivery type="boolean">false</delivery>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <pickup type="boolean">false</pickup>
  <store type="boolean">false</store>
  <use-sku-as-vendor-code type="boolean">false</use-sku-as-vendor-code>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">false</use-variants>
</hash>

Get marketplaces

Endpoint

GET /admin/marketplaces.xml

Request

Route

GET /admin/marketplaces.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <object>
    <id type="integer">1</id>
    <name>Yandex Model</name>
    <type>Marketplace::LiquidYandexMarket</type>
    <created-at>2025-02-11T00:58:25.591+03:00</created-at>
    <updated-at>2025-02-11T00:58:25.591+03:00</updated-at>
    <url>https://quentin.insales.io:3002/marketplace/1.xml</url>
    <collection-ids type="array"/>
    <local-delivery-cost nil="true"/>
    <vendor-id nil="true"/>
    <offer-liquid>&lt;offer&gt;...&lt;/offer&gt;</offer-liquid>
    <page-encoding>utf-8</page-encoding>
    <shop-company>eBay</shop-company>
    <shop-name>eBay</shop-name>
    <delivery-new-style type="boolean">false</delivery-new-style>
    <use-stock-currency type="boolean">false</use-stock-currency>
    <use-variants type="boolean">false</use-variants>
  </object>
  <object>
    <id type="integer">2</id>
    <name>Google Model</name>
    <type>Marketplace::GoogleMerchant</type>
    <created-at>2025-02-11T00:58:25.619+03:00</created-at>
    <updated-at>2025-02-11T00:58:25.619+03:00</updated-at>
    <url>https://quentin.insales.io:3002/marketplace/2.xml</url>
    <collection-ids type="array"/>
    <description-type nil="true"/>
    <local-delivery-cost nil="true"/>
    <utm-label nil="true"/>
    <adult type="boolean">false</adult>
    <delivery-new-style type="boolean">false</delivery-new-style>
    <use-stock-currency type="boolean">false</use-stock-currency>
    <use-variants type="boolean">false</use-variants>
  </object>
</objects>

Update Google Merchant marketplace

Endpoint

PUT /admin/marketplaces/:gm_marketplace_id.xml

Parameters

Name Description
marketplace[name] Name
marketplace[description_type] 1 fo short description, 2 for full
marketplace[local_delivery_cost] Local delivery cost
marketplace[adult] 1 if products are adult-only, else 0
marketplace[utm_label] UTM label

Request

Route

PUT /admin/marketplaces/13.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<marketplace>
  <name>New GM</name>
  <description-type type="integer">2</description-type>
  <adult type="integer">0</adult>
</marketplace>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">13</id>
  <name>New GM</name>
  <type>Marketplace::GoogleMerchant</type>
  <created-at>2025-02-11T00:58:27.257+03:00</created-at>
  <updated-at>2025-02-11T00:58:27.313+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/13.xml</url>
  <collection-ids type="array"/>
  <description-type type="integer">2</description-type>
  <local-delivery-cost nil="true"/>
  <utm-label nil="true"/>
  <adult type="boolean">false</adult>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">false</use-variants>
</hash>

Update Liquid for Yandex marketplace

Endpoint

PUT /admin/marketplaces/:yl_marketplace_id.xml

Parameters

Name Description
marketplace[name] Name
marketplace[shop_name] Shop name
marketplace[use_variants] Create document for all variants, not aggregated product
marketplace[shop_company] Company name
marketplace[page_encoding] Encoding, windows-1251 or utf-8
marketplace[offer_liquid] Liquid template
marketplace[collection_ids] Collections to load

Request

Route

PUT /admin/marketplaces/17.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<marketplace>
  <name>New LYM</name>
</marketplace>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">17</id>
  <name>New LYM</name>
  <type>Marketplace::LiquidYandexMarket</type>
  <created-at>2025-02-11T00:58:27.787+03:00</created-at>
  <updated-at>2025-02-11T00:58:27.849+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/17.xml</url>
  <collection-ids type="array"/>
  <local-delivery-cost nil="true"/>
  <vendor-id nil="true"/>
  <offer-liquid>&lt;offer&gt;...&lt;/offer&gt;</offer-liquid>
  <page-encoding>utf-8</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">false</use-variants>
</hash>

Update Model for Yandex marketplace

Endpoint

PUT /admin/marketplaces/:ym_marketplace_id.xml

Parameters

Name Description
marketplace[name] Name
marketplace[shop_name] Shop name
marketplace[shop_company] Company name
marketplace[description_type] 1 fo short description, 2 for full
marketplace[vendor_id] id of corresponding property
marketplace[use_sku_as_vendor_code] Use sku as vendor code
marketplace[pickup] Pickup enable
marketplace[store] Offline store exists
marketplace[delivery_style] Delivery pricing type, 0 for old, 1 for new
marketplace[local_delivery_cost] Local delivery cost
marketplace[adult] 1 if products are adult-only, else 0
marketplace[utm_label] UTM label
marketplace[page_encoding] Encoding, windows-1251 or utf-8
marketplace[image_style] Image style: thumb, compact, medium, large or original
marketplace[model_type] Model naming type: name or sku
marketplace[collection_ids] Collections to load

Request

Route

PUT /admin/marketplaces/11.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<marketplace>
  <name>New YM</name>
  <vendor-id type="integer">4</vendor-id>
  <collection-ids type="array">
    <collection-id type="integer">6</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">8</collection-id>
  </collection-ids>
</marketplace>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">11</id>
  <name>New YM</name>
  <type>Marketplace::ModelYandexMarket</type>
  <created-at>2025-02-11T00:58:26.992+03:00</created-at>
  <updated-at>2025-02-11T00:58:27.060+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/11.xml</url>
  <collection-ids type="array">
    <collection-id type="integer">6</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">8</collection-id>
  </collection-ids>
  <delivery-price-kind nil="true"/>
  <description-type type="integer">1</description-type>
  <local-delivery-cost nil="true"/>
  <sales-notes nil="true"/>
  <utm-label nil="true"/>
  <vendor-id type="integer">4</vendor-id>
  <page-encoding>windows-1251</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <adult type="boolean">false</adult>
  <delivery type="boolean">false</delivery>
  <delivery-new-style type="boolean">false</delivery-new-style>
  <pickup type="boolean">false</pickup>
  <store type="boolean">false</store>
  <use-sku-as-vendor-code type="boolean">false</use-sku-as-vendor-code>
  <use-stock-currency type="boolean">false</use-stock-currency>
  <use-variants type="boolean">false</use-variants>
</hash>

OAuthApp

Create o_auth_app

Endpoint

POST /admin/o_auth_apps.xml

Parameters

Name Description
o_auth_app[provider_handle] required provider name
o_auth_app[client_id] required client id
o_auth_app[client_secret] required client_secret
o_auth_app[issuer] required issuer

Request

Route

POST /admin/o_auth_apps.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<o-auth-app>
  <provider-handle>provider name</provider-handle>
  <client-id>10332</client-id>
  <client-secret>NdsaPd</client-secret>
  <issuer>/.well-known/openid-configuration</issuer>
</o-auth-app>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<o-auth-app>
  <id type="integer">6</id>
  <provider>provider name</provider>
  <client-id>10332</client-id>
  <client-secret>NdsaPd</client-secret>
  <issuer>/.well-known/openid-configuration</issuer>
</o-auth-app>

Destroy o_auth_app

Endpoint

DELETE /admin/o_auth_apps/:o_auth_app_id.xml

Request

Route

DELETE /admin/o_auth_apps/11.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get o_auth_app

Endpoint

GET /admin/o_auth_apps/:o_auth_app_id.xml

Request

Route

GET /admin/o_auth_apps/3.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<o-auth-app>
  <id type="integer">3</id>
  <provider>new_provider</provider>
  <client-id>953</client-id>
  <client-secret>NdsaPd</client-secret>
  <issuer>/.well-known/openid-configuration</issuer>
</o-auth-app>

Get o_auth_apps

Endpoint

GET /admin/o_auth_apps.xml

Request

Route

GET /admin/o_auth_apps.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<o-auth-apps type="array">
  <o-auth-app>
    <id type="integer">1</id>
    <provider>new_provider</provider>
    <client-id>953</client-id>
    <client-secret>NdsaPd</client-secret>
    <issuer>/.well-known/openid-configuration</issuer>
  </o-auth-app>
</o-auth-apps>

Update o_auth_app

Endpoint

PUT /admin/o_auth_apps/:o_auth_app_id.xml

Parameters

Name Description
o_auth_app[provider_handle] provider name
o_auth_app[client_id] client id
o_auth_app[client_secret] client secret
o_auth_app[issuer] issuer

Request

Route

PUT /admin/o_auth_apps/9.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<o-auth-app>
  <provider-handle>new name provider</provider-handle>
</o-auth-app>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<o-auth-app>
  <provider>new name provider</provider>
  <id type="integer">9</id>
  <client-id>953</client-id>
  <client-secret>NdsaPd</client-secret>
  <issuer>/.well-known/openid-configuration</issuer>
</o-auth-app>

OptionName

Create option_name

Endpoint

POST /admin/option_names.xml

Parameters

Name Description
option_name[title] required title
option_name[position] position in option names list
option_name[navigational] true by default; show in products filter on category page

Request

Route

POST /admin/option_names.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-name>
  <title>Colour</title>
  <navigational type="boolean">false</navigational>
</option-name>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-name>
  <id type="integer">2517849</id>
  <position type="integer">3</position>
  <navigational type="boolean">false</navigational>
  <title>Colour</title>
</option-name>

Destroy option_name

Endpoint

DELETE /admin/option_names/:option_name_id.xml

Request

Route

DELETE /admin/option_names/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get option_name

Endpoint

GET /admin/option_names/:option_name_id.xml

Request

Route

GET /admin/option_names/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-name>
  <id type="integer">1</id>
  <position type="integer">1</position>
  <navigational type="boolean">true</navigational>
  <title>Вариант</title>
</option-name>

Get option_names

Endpoint

GET /admin/option_names.xml

Request

Route

GET /admin/option_names.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-names type="array">
  <option-name>
    <id type="integer">1</id>
    <position type="integer">1</position>
    <navigational type="boolean">true</navigational>
    <title>Вариант</title>
  </option-name>
  <option-name>
    <id type="integer">3</id>
    <position type="integer">2</position>
    <navigational type="boolean">true</navigational>
    <title>Цвет</title>
  </option-name>
</option-names>

Update option_name

Endpoint

PUT /admin/option_names/:option_name_id.xml

Parameters

Name Description
option_name[title] title
option_name[position] position
option_name[navigational] true by default; show in products filter on category page

Request

Route

PUT /admin/option_names/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-name>
  <title>Type</title>
  <position type="integer">2</position>
  <navigational type="boolean">false</navigational>
</option-name>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-name>
  <id type="integer">1</id>
  <position type="integer">2</position>
  <navigational type="boolean">false</navigational>
  <title>Type</title>
</option-name>

OptionValue

Create option_value

Endpoint

POST /admin/option_names/:option_name_id/option_values.xml

Parameters

Name Description
option_value[title] required title
option_value[position] position in option_values list
option_value[image][filename] image filename, required if attachment present
option_value[image][attachment] base64 encoded image body
option_value[image][src] image url

Request

Route

POST /admin/option_names/1/option_values.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <title>Blue</title>
  <image>
    <filename>image.jpg</filename>
    <attachment>/9j/4AAQSkZJRgABAQEASABIAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4w
ICh1c2luZyBJSkcgSlBFRyB2NjIpLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAG
BAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAs
ICMmJykqKRkfLTAtKDAlKCko/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgo
KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo/8AA
EQgAWQBkAwEiAAIRAQMRAf/EAB0AAAEEAwEBAAAAAAAAAAAAAAgABQYHAQME
Agn/xABEEAABAwMBBAYHBgIHCQAAAAABAgMEAAURBgcSITEIE0FRYYEUIjJx
kbHSIzd1lKGzFRg1QkNSYqLwJSYzY3KCksLT/8QAGQEAAgMBAAAAAAAAAAAA
AAAAAAEDBAUC/8QAIxEAAgICAgIBBQAAAAAAAAAAAAECEQMEEjEhQVEFEyIz
gf/aAAwDAQACEQMRAD8AKmlVT7Q9oF4sGqV223NxFthpC0hxoqUSQSeO8O6o
cvbbd23ktO/w5LiuASWFDP8AmrlzivDY+LqwiaVDwNtl5KlpDUTeQMqHobvA
fGtLm3G9IRvlFvCOPFUZwf8AtS+7D5EEbSoYv5g7qpwIaNqUonAHo7nP/wAq
4pHSQujDq2nFWhLiCUqSqO5kEdntV1YBVUqEtfSXvGfVVZvy7n1VpV0mL7n1
TZfyzn1UwC6pUIKukzqDs/gv5Zz661npM6j7DZfyrn10AGFSoOVdJnU39X+C
/lXPrr2OkjqlxIDD1jW6R/wxDdz8SrFABh0qZ9IXB67aTs1xlhAkS4bL7m4M
J3lIBOB2DJpUAUNt3usew67NzmRm5LLbbSeqcGQSUKA4VV8rag2JoQxY7e2w
ocFdWARU86UPUpvxVKSpbG/F6xCTglPrZwe/FVDb1Q4Vyc9HjIQyyvAku4cc
HHhugjdB8s+NUtnHjk7mrJY5JKPFPwXBZro07aWp98YMVCsKaQ4d31f76u4d
3fXq/SrdfYhTYoMVx5KSClZwV45lIJ9Y+GKi1usV01pdWFMOmW2jGX3DlpA7
CByJ9/Luq2bZpyBpiE21bCHZ6R68pwZDiu0b3+h4VhuEMfn38fBS2c1A26g0
9qELUpNtdbaPFCkxktocHhkAg+BqIXiJJknfeZWiaBhSVJwXMdo7zRoL1XLa
ixw8A2p7rG+rdxlLiBk8+Y4jj41HZ1tsGso5D8CEuafW3mMNqV78cD7+Yra1
c7nSaKq2+PaAxP61gc6tDa7oFenrupyGHHITw6xpxQ9bHahf+NJ4E9owarAg
pUQoYIrQaa7L+PIskeSMGsVk1ikdirts/wDSDfuPyNcVd1m/pFr3K+RoA+ke
zj7vtM/hsb9tNKls4+77TP4ZG/bTSoAHXpTuFGonhkAbkfn7lVS1tdRMkIRI
O6CrOeQzjl8R+tXJ0qsK1M8kkZ6uPgHtOFcKHp9L7LXpLCypkEJWlQzuE8s+
BqOcFIGX7p2/Lstl/h0Wa20pWSpDDZPDwXgDPPlXbaZl1E1wpnOSG1J+xSXd
5RPd61UDA1M5AblJVGYeL7WG1nILTg4BYAOMgZ+NXHscntahtsx6Y71a22/R
9xtPsrUCAodw5ms2enxtmfsY3FOTHDVe0G4yFqhz7UhEtlCmGkqGVNk8CEnx
8fGvOkhchFEiZPhxIyXApS1kNgAcgnHEnPj8a49QliU6lltaRLDhQCsZ3TnB
xnxzjspnf07cusT10z0pCVb286d3cAPYOVa+th4pUis+LjXRONfzEaiaSxAl
FXo32eFew6o4OFA9vcrvobr7C6mW6hbZQQo44csH/XCr2hT4iI4bQ2SFulMh
wD1lgJGefLPLyrfd9A2fVbyZlnddW8GwpUb2G5I5ApdPAODGCOGR7q1J6jyQ
uL8ljTuH4+gZyhQVu4416cZcax1ja0Z5bySM0Tlk0JFtqt17diKTzjxkBCz/
ANTisk+VP0pVsYgLju2mJMiKG643JCnQoeJJ/UcakX0ebjfLyauPG8nQINd1
m4XFr3K+Rp013ZEWPUsyPGSRCU4Vx+OfszxAz4A48qa7QP8AaDXuPyNZE4OE
nGXaOJRcW0z6R7OPu+0z+GRv200qxs3+73TP4ZG/bTSrkQMnS6WU6kfx2Nxj
+iqoazXRCHermgLaWnq3N44C0nsPce0HvAq9el2f955A/wCVG+SqHAAUqsTV
kkn6fUw6gAuuQnfWZkIRkY7j2Z7+NPemrmzoqUtReffYloCHWwNzkchQwSeH
f41Cos6TFQUR5TzSFc0oWQD5V0tyWpI3JjqgvscPH40JemRyg5KpdFkS7/Gv
Oun7rBJXbmGUuvKVkJBCcqwO/IPGsW3XLc5b5fe6tTn9mTugDuHuFQiTcYkG
xuW+3uF56Qft3sYSEZB3R3kkDJ7hTAOfCp1kcOiJa8ZLz/C/bJMt7cZW4hS2
XVgLQlXnnOedTS33q0Wq2b8PcMxSjiO2AXFZ7cJz29tDZbwZMF9pXEhPWDvO
Of6Zp30/f3LddIRjoyktqQnJxneBGM+PCtjX3opRjJUmSY8Siy29Rank3+0u
zmS4xIiK3XUJO6efAntyKY7BPdvS3WH3kNvupIbcUopSF9mTngCe3srk01MQ
9MTujMKYkpIxzJ4EK/xA8KYWUu225vRST1gWUj3d/wAKt5MzXGS66NrBDhT9
GvarGdbbjCc04zNb3UuNuDCknBHH4cxwPMVBbUMTmz4H5GiCv7LGudGyLbIb
37tAiqkQXwPX+zGS0T2pKQQO44qgrYAJbZ/vA4+FYW9+2yvvY3DJb9n0X2b/
AHeaY/DI37aaVY2bfd5pj8Mj/tppVTKZXO1nZReNZarcuMN62iKpltvckqVv
byc8cBJHbUI/l2vh5uWH4r+iiiKgOZFa1Ptp9pYFAAvno6Xw/wBrYB5r+isK
6Od8PJ7T/wDn+iidVPjJ5upFa1XWEkEqkIAHeaABhV0b7+cn0jT481/RVQX6
3x9Napm2y4W9iWuBIUy8G/VQ4U88HAIHlmjan7SdKQypK7s24ocCGULc/UDF
BptHuEe5671BOiq3o8ia442VDBKSeHA8qQmME+5W95SPQrOmGBnO4srKvjyx
VmaJ2IXvV+l4F9t0i0MxZYUptt8rC07qinjhBHNJ7aqXeG9x3fKi02HbR9LW
nZpY7Xc7mmLLYQ4FpW0vdBLqyPWAxyIpgiCJ6OerEexcrInjng66OPf7FeXO
jlq1a983KyFZ5qLzuT57lE9bL/arpFTIt1wjSWFcAtpYUM93vrsEtg8nUHzp
2xgrN9HbWbSipq72hCsYymQ8DjyRWgdGvVSTlM6whQ5EOOf/ADosw82eS0/G
vQWk/wBYUgfkadI2x6zaUs1slKbW/DhtR3FNklJUlABIzxxwpU77w7xSoA5J
DTqgd2mSdbZzgPV/OpNSoArefp29O56v5moxetCajuEKRG31oQ8goKkLIIBG
OBq76VKh2CC5sX2kwlbsGe3KYHshxeFAf9wPzrhlbDNYvhx56A6uUs7yt15r
BPwozKVFCAgOwjXa1bqbKRx9pUlvj5U7RdiG0bqgyyiNDZHAbzyVEfBNGTSp
hQO2z7ZNqjTLMkv3Bch+SpKnDvHdGBwwPPnVhwdN3xvHWOk+dWNSpUOyLw7T
Pbx1i8+dO7ER5A9ZQpxpUxGkNKA5ilW6lQB//9k=
</attachment>
  </image>
</option-value>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <id type="integer">21063163</id>
  <option-name-id type="integer">1</option-name-id>
  <position type="integer">21</position>
  <title>Blue</title>
  <image-url>http://minio.insales.io:9000/insales-test-sber/images/option_values/1/1531/21063163/thumb/image.jpg?1739224680</image-url>
</option-value>

Destroy option_value image

Endpoint

DELETE /admin/option_names/:option_name_id/option_values/:option_value_id/destroy_image.xml

Request

Route

DELETE /admin/option_names/1/option_values/20/destroy_image.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <option-name-id type="integer">1</option-name-id>
  <id type="integer">20</id>
  <position type="integer">20</position>
  <title>Синий-10</title>
  <image-url nil="true"/>
</option-value>

Destroy option_value

Endpoint

DELETE /admin/option_names/:option_name_id/option_values/:option_value_id.xml

Request

Route

DELETE /admin/option_names/1/option_values/20.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <id type="integer">20</id>
  <jid type="integer">149</jid>
</hash>

Get destroy option_value status

Endpoint

GET /admin/option_names/:option_name_id/option_values/:option_value_id/destroy_status.xml

Parameters

Name Description
jid required job id

Request

Route

GET /admin/option_names/1/option_values/20/destroy_status.xml?jid=101

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

jid=101

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <status type="symbol">error</status>
  <error>Not deleted</error>
</hash>

Get option_value

Endpoint

GET /admin/option_names/:option_name_id/option_values/:option_value_id.xml

Request

Route

GET /admin/option_names/1/option_values/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <id type="integer">2</id>
  <option-name-id type="integer">1</option-name-id>
  <position type="integer">2</position>
  <title>Зеленый</title>
  <image-url nil="true"/>
</option-value>

Get option_values for all options

Endpoint

GET /admin/option_values.xml

Request

Route

GET /admin/option_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-values type="array">
  <option-value>
    <id type="integer">1</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">1</position>
    <title>Red</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">2</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">2</position>
    <title>Зеленый</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">3</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">3</position>
    <title>Базовая</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">4</id>
    <option-name-id type="integer">3</option-name-id>
    <position type="integer">1</position>
    <title>Синий</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">20</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">20</position>
    <title>Синий-10</title>
    <image-url nil="true"/>
  </option-value>
</option-values>

Get option_values for specific option

Endpoint

GET /admin/option_names/:option_name_id/option_values.xml

Request

Route

GET /admin/option_names/1/option_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-values type="array">
  <option-value>
    <id type="integer">1</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">1</position>
    <title>Red</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">2</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">2</position>
    <title>Зеленый</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">3</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">3</position>
    <title>Базовая</title>
    <image-url nil="true"/>
  </option-value>
  <option-value>
    <id type="integer">20</id>
    <option-name-id type="integer">1</option-name-id>
    <position type="integer">20</position>
    <title>Синий-10</title>
    <image-url nil="true"/>
  </option-value>
</option-values>

Update option_value

Endpoint

PUT /admin/option_names/:option_name_id/option_values/:option_value_id.xml

Parameters

Name Description
option_value[position] position
option_value[image][filename] image filename, required if attachment present
option_value[image][attachment] base64 encoded image body
option_value[image][src] image url

Request

Route

PUT /admin/option_names/1/option_values/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <position type="integer">3</position>
  <image>
    <src>https://abc.myinsales.ru/images/no_image_compact.jpg</src>
  </image>
</option-value>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <option-name-id type="integer">1</option-name-id>
  <position type="integer">3</position>
  <id type="integer">2</id>
  <title>Зеленый</title>
  <image-url>http://minio.insales.io:9000/insales-test-sber/images/option_values/1/2/2/thumb/no_image_compact.jpg?1739224681</image-url>
</option-value>

Order

Create discount

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[discounts_attributes] required discounts attributes
order[discounts_attributes][][discount] required discount amount
order[discounts_attributes][][type_id] 1 - percent (default), 2 - money
order[discounts_attributes][][description] description text
order[discounts_attributes][][discount_order_lines_ids] ids of affected order lines (all will be affected if not specified)

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <discounts-attributes type="array">
    <discounts-attribute>
      <discount type="integer">100</discount>
      <type-id type="integer">2</type-id>
      <description>-100 (absolute)</description>
    </discounts-attribute>
    <discounts-attribute>
      <discount type="integer">10</discount>
      <description>10% only for first order line</description>
      <discount-order-lines-ids type="array">
        <discount-order-lines-id type="integer">17</discount-order-lines-id>
      </discount-order-lines-ids>
    </discounts-attribute>
  </discounts-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">30.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">70</id>
      <field-id type="integer">245</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:36+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:36+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">69</id>
        <field-id type="integer">244</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:36+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:36+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array">
    <discount>
      <id type="integer">8</id>
      <discount type="decimal">20.0</discount>
      <type-id type="integer">2</type-id>
      <created-at type="timestamp">2025-02-11 00:57:36 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <description>-20 (absolute)</description>
      <reference-id type="integer" nil="true"/>
      <discount-products-ids type="array"/>
      <reference-type nil="true"/>
      <discount-order-lines-ids type="array"/>
      <percent nil="true"/>
      <discount-code-id nil="true"/>
      <amount type="decimal">20.0</amount>
      <full-amount type="decimal">20.0</full-amount>
    </discount>
    <discount>
      <id type="integer">9</id>
      <discount type="decimal">100.0</discount>
      <type-id type="integer">2</type-id>
      <created-at type="timestamp">2025-02-11 00:57:36 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <description>-100 (absolute)</description>
      <reference-id type="integer" nil="true"/>
      <discount-products-ids type="array"/>
      <reference-type nil="true"/>
      <discount-order-lines-ids type="array"/>
      <percent nil="true"/>
      <discount-code-id nil="true"/>
      <amount type="decimal">100.0</amount>
      <full-amount type="decimal">100.0</full-amount>
    </discount>
    <discount>
      <id type="integer">10</id>
      <discount type="decimal">10.0</discount>
      <type-id type="integer">1</type-id>
      <created-at type="timestamp">2025-02-11 00:57:36 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <description>10% only for first order line</description>
      <reference-id type="integer" nil="true"/>
      <discount-products-ids type="array">
        <discount-products-id type="integer">1</discount-products-id>
      </discount-products-ids>
      <reference-type nil="true"/>
      <discount-order-lines-ids type="array">
        <discount-order-lines-id type="integer">17</discount-order-lines-id>
      </discount-order-lines-ids>
      <percent type="decimal">10.0</percent>
      <discount-code-id nil="true"/>
      <amount type="decimal">20.0</amount>
      <full-amount type="decimal">20.0</full-amount>
    </discount>
  </discounts>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">68</id>
        <field-id type="integer">243</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:36+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:36+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">17</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">100.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <sku>423</sku>
      <created-at type="timestamp">2025-02-11 00:57:36 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">88.57</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">55.72</full-sale-price>
      <total-price type="decimal">200.0</total-price>
      <full-total-price type="decimal">111.43</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">18</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">150.0</sale-price>
      <title>shirt (Зеленый / Синий)</title>
      <sku>424</sku>
      <created-at type="timestamp">2025-02-11 00:57:36 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">51.43</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">98.57</full-sale-price>
      <total-price type="decimal">150.0</total-price>
      <full-total-price type="decimal">98.57</full-total-price>
    </order-line>
  </order-lines>
<discount>
  <id type="integer">8</id>
  <discount type="decimal">20.0</discount>
  <type-id type="integer">2</type-id>
  <created-at type="timestamp">2025-02-11 00:57:36 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
  <description>-20 (absolute)</description>
  <reference-id type="integer" nil="true"/>
  <discount-products-ids type="array"/>
  <reference-type nil="true"/>
  <discount-order-lines-ids type="array"/>
  <percent nil="true"/>
  <discount-code-id nil="true"/>
  <amount type="decimal">20.0</amount>
  <full-amount type="decimal">20.0</full-amount>
</discount>
  <items-price type="decimal">210.0</items-price>
  <total-price type="decimal">310.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Create order line by product_id

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][quantity] required quantity
order[order_lines_attributes][][vat] integer, VAT for order line is equal to VAT of its product, by default, products get their value from account by default,if default in account set as 'No VAT', you need to use 'force' to change VAT of order line through API; possible values depend on country, set to -1 if this product is not a subject to VAT
order[order_lines_attributes][][product_id] required product id

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order-lines-attributes type="array">
    <order-lines-attribute>
      <product-id type="integer">1</product-id>
      <quantity type="integer">1</quantity>
      <vat type="integer">18</vat>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">210.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">61</id>
      <field-id type="integer">236</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">60</id>
        <field-id type="integer">235</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">59</id>
        <field-id type="integer">234</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">16</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">300.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <sku>423</sku>
      <created-at type="timestamp">2025-02-11 00:57:35 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">18</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">300.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">300.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">300.0</items-price>
  <total-price type="decimal">400.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Create order line by variant_id

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][quantity] required quantity
order[order_lines_attributes][][vat] integer, VAT for order line is equal to VAT of its product, by default, products get their value from account by default,if default in account set as 'No VAT', you need to use 'force' to change VAT of order line through API; possible values depend on country, set to -1 if this product is not a subject to VAT
order[order_lines_attributes][][variant_id] required variant id

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order-lines-attributes type="array">
    <order-lines-attribute>
      <variant-id type="integer">1</variant-id>
      <quantity type="integer">1</quantity>
      <vat type="integer">-1</vat>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:34 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">210.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">58</id>
      <field-id type="integer">233</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:34+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:34+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">57</id>
        <field-id type="integer">232</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:34+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:34+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:34 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">56</id>
        <field-id type="integer">231</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:34+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:34+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">15</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">300.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <sku>423</sku>
      <created-at type="timestamp">2025-02-11 00:57:34 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:34 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">300.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">300.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">300.0</items-price>
  <total-price type="decimal">400.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Create order with bundle

Endpoint

POST /admin/orders.xml

Parameters

Name Description
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][quantity] required quantity
order[order_lines_attributes][][variant_id] required variant id
order[order_lines_attributes][][vat] do not set vat for bundle, because after order creation bundle will break into bundle components, which have their own VAT rates
order[client] required client info
order[client][name] client name
order[client][email] client email
order[client][phone] required client phone
order[client][consent_to_personal_data] required consent to personal data
order[shipping_address_attributes] required array of shipping address attributes
order[shipping_address_attributes][address] shipping address
order[shipping_address_attributes][full_locality_name] required full locality name
order[delivery_variant_id] required delivery variant id
order[payment_gateway_id] required payment gateway id
order[coupon] discount code

Request

Route

POST /admin/orders.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order-lines-attributes type="array">
    <order-lines-attribute>
      <variant-id type="integer">5</variant-id>
      <quantity type="integer">2</quantity>
    </order-lines-attribute>
  </order-lines-attributes>
  <client>
    <name>Vasya</name>
    <email>vasya@example.com</email>
    <phone>79111112233</phone>
    <consent-to-personal-data type="boolean">true</consent-to-personal-data>
  </client>
  <shipping-address-attributes>
    <address>Moscow, Krasnaya Presna 24</address>
    <full-locality-name>Moscow</full-locality-name>
  </shipping-address-attributes>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <coupon>20% discount</coupon>
</order>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">11</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2025-02-11 00:57:32 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:32 +0300</updated-at>
  <payment-title>Наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз (самовывоз из офиса)</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1006</number>
  <key>317d4ac13c84734a392ec0465ae2c2b3</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>app:digital-goods</referer>
  <current-location nil="true"/>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer nil="true"/>
  <first-current-location nil="true"/>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment nil="true"/>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id nil="true"/>
  <first-source>Прямой трафик</first-source>
  <source>Приложение</source>
  <locale>ru</locale>
  <total-profit type="decimal">1200.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array"/>
  <shipping-address>
    <id type="integer">20</id>
    <name>Vasya</name>
    <phone>79111112233</phone>
    <country nil="true"/>
    <state nil="true"/>
    <city nil="true"/>
    <address>Moscow, Krasnaya Presna 24</address>
    <zip nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name></full-locality-name>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>Moscow, Krasnaya Presna 24</full-delivery-address>
    <full-name>Vasya</full-name>
    <address-for-gis>Moscow, Krasnaya Presna 24</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>7(911)111-22-33</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">false</selected>
      </country-option>
    </country-options>
    <fields-values type="array"/>
<location>
  <kladr-code nil="true"/>
  <zip nil="true"/>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state nil="true"/>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city nil="true"/>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>Moscow, Krasnaya Presna 24</address>
  <street>Moscow</street>
  <street-type nil="true"/>
  <house>Krasnaya Presna 24</house>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array">
    <discount>
      <id type="integer">5</id>
      <discount type="decimal">20.0</discount>
      <type-id type="integer">1</type-id>
      <created-at type="timestamp">2025-02-11 00:57:32 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:32 +0300</updated-at>
      <description>Скидка по купону 20% discount</description>
      <reference-id type="integer">177</reference-id>
      <discount-products-ids type="array"/>
      <reference-type>DiscountCode</reference-type>
      <discount-order-lines-ids type="array"/>
      <percent type="decimal">20.0</percent>
      <discount-code-id type="integer">177</discount-code-id>
      <amount type="decimal">300.0</amount>
      <full-amount type="decimal">300.0</full-amount>
    </discount>
  </discounts>
  <client>
    <id type="integer">24</id>
    <email>vasya@example.com</email>
    <name>Vasya</name>
    <phone>79111112233</phone>
    <created-at type="timestamp">2025-02-11 00:57:32 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:32 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Vasya</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array"/>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">11</id>
      <order-id type="integer">11</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">375.0</sale-price>
      <title>shirt (Зеленый / Синий)</title>
      <sku>424</sku>
      <created-at type="timestamp">2025-02-11 00:57:32 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:32 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer">5</bundle-id>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">375.0</full-sale-price>
      <total-price type="decimal">750.0</total-price>
      <full-total-price type="decimal">750.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">12</id>
      <order-id type="integer">11</order-id>
      <variant-id type="integer">3</variant-id>
      <sale-price type="decimal">375.0</sale-price>
      <title>pants (Базовая)</title>
      <sku>425</sku>
      <created-at type="timestamp">2025-02-11 00:57:32 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:32 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">3</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer">5</bundle-id>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">375.0</full-sale-price>
      <total-price type="decimal">750.0</total-price>
      <full-total-price type="decimal">750.0</full-total-price>
    </order-line>
  </order-lines>
<discount>
  <id type="integer">5</id>
  <discount type="decimal">20.0</discount>
  <type-id type="integer">1</type-id>
  <created-at type="timestamp">2025-02-11 00:57:32 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:32 +0300</updated-at>
  <description>Скидка по купону 20% discount</description>
  <reference-id type="integer">177</reference-id>
  <discount-products-ids type="array"/>
  <reference-type>DiscountCode</reference-type>
  <discount-order-lines-ids type="array"/>
  <percent type="decimal">20.0</percent>
  <discount-code-id type="integer">177</discount-code-id>
  <amount type="decimal">300.0</amount>
  <full-amount type="decimal">300.0</full-amount>
</discount>
  <cookies>
  </cookies>
  <items-price type="decimal">1200.0</items-price>
  <total-price type="decimal">1300.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price type="float">100.0</price>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method type="array"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Create order with product

Endpoint

POST /admin/orders.xml

Parameters

Name Description
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][quantity] required quantity
order[order_lines_attributes][][variant_id] required variant id
order[order_lines_attributes][][vat] integer, VAT for order line is equal to VAT of its product, by default, products get their value from account by default,if default in account set as 'No VAT', you need to use 'force' to change VAT of order line through API; possible values depend on country, set to -1 if this product is not a subject to VAT
order[client] required client info
order[client][name] client name
order[client][email] client email
order[client][phone] required client phone
order[shipping_address_attributes] required array of shipping address attributes
order[shipping_address_attributes][address] shipping address
order[delivery_variant_id] required delivery variant id
order[payment_gateway_id] required payment gateway id
order[coupon] discount code

Request

Route

POST /admin/orders.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order-lines-attributes type="array">
    <order-lines-attribute>
      <variant-id type="integer">3</variant-id>
      <quantity type="integer">2</quantity>
      <vat type="integer">10</vat>
    </order-lines-attribute>
  </order-lines-attributes>
  <client>
    <name>Vasya</name>
    <email>vasya@example.com</email>
    <phone>79111112233</phone>
  </client>
  <shipping-address-attributes>
    <address>Moscow, Krasnaya Presna 24</address>
  </shipping-address-attributes>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <coupon>20% discount</coupon>
</order>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">9</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2025-02-11 00:57:31 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:31 +0300</updated-at>
  <payment-title>Наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз (самовывоз из офиса)</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1006</number>
  <key>8a61edd67bb69c3c403046de1c993203</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>app:digital-goods</referer>
  <current-location nil="true"/>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer nil="true"/>
  <first-current-location nil="true"/>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment nil="true"/>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id nil="true"/>
  <first-source>Прямой трафик</first-source>
  <source>Приложение</source>
  <locale>ru</locale>
  <total-profit type="decimal">960.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array"/>
  <shipping-address>
    <id type="integer">18</id>
    <name>Vasya</name>
    <phone>79111112233</phone>
    <country nil="true"/>
    <state nil="true"/>
    <city nil="true"/>
    <address>Moscow, Krasnaya Presna 24</address>
    <zip nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name></full-locality-name>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>Moscow, Krasnaya Presna 24</full-delivery-address>
    <full-name>Vasya</full-name>
    <address-for-gis>Moscow, Krasnaya Presna 24</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>7(911)111-22-33</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">false</selected>
      </country-option>
    </country-options>
    <fields-values type="array"/>
<location>
  <kladr-code nil="true"/>
  <zip nil="true"/>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state nil="true"/>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city nil="true"/>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>Moscow, Krasnaya Presna 24</address>
  <street>Moscow</street>
  <street-type nil="true"/>
  <house>Krasnaya Presna 24</house>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array">
    <discount>
      <id type="integer">3</id>
      <discount type="decimal">20.0</discount>
      <type-id type="integer">1</type-id>
      <created-at type="timestamp">2025-02-11 00:57:31 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:31 +0300</updated-at>
      <description>Скидка по купону 20% discount</description>
      <reference-id type="integer">175</reference-id>
      <discount-products-ids type="array"/>
      <reference-type>DiscountCode</reference-type>
      <discount-order-lines-ids type="array"/>
      <percent type="decimal">20.0</percent>
      <discount-code-id type="integer">175</discount-code-id>
      <amount type="decimal">240.0</amount>
      <full-amount type="decimal">240.0</full-amount>
    </discount>
  </discounts>
  <client>
    <id type="integer">22</id>
    <email>vasya@example.com</email>
    <name>Vasya</name>
    <phone>79111112233</phone>
    <created-at type="timestamp">2025-02-11 00:57:31 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:31 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Vasya</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array"/>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">9</id>
      <order-id type="integer">9</order-id>
      <variant-id type="integer">3</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>pants (Базовая)</title>
      <sku>425</sku>
      <created-at type="timestamp">2025-02-11 00:57:31 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:31 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">3</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">10</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">600.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1200.0</full-total-price>
    </order-line>
  </order-lines>
<discount>
  <id type="integer">3</id>
  <discount type="decimal">20.0</discount>
  <type-id type="integer">1</type-id>
  <created-at type="timestamp">2025-02-11 00:57:31 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:31 +0300</updated-at>
  <description>Скидка по купону 20% discount</description>
  <reference-id type="integer">175</reference-id>
  <discount-products-ids type="array"/>
  <reference-type>DiscountCode</reference-type>
  <discount-order-lines-ids type="array"/>
  <percent type="decimal">20.0</percent>
  <discount-code-id type="integer">175</discount-code-id>
  <amount type="decimal">240.0</amount>
  <full-amount type="decimal">240.0</full-amount>
</discount>
  <cookies>
  </cookies>
  <items-price type="decimal">960.0</items-price>
  <total-price type="decimal">1060.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price type="float">100.0</price>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method type="array"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Get order

Endpoint

GET /admin/orders/:order_id.xml

Request

Route

GET /admin/orders/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:28 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">1500.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">22</id>
      <field-id type="integer">197</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:28+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:28+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">21</id>
        <field-id type="integer">196</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:28+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:28+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:28 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">20</id>
        <field-id type="integer">195</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:28+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:28+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">300.0</sale-price>
      <title>Cool t-shirt</title>
      <sku>423</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">300.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">300.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>shirt</title>
      <sku>424</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">20</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">600.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1200.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">1500.0</items-price>
  <total-price type="decimal">1600.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Get orders count

Endpoint

GET /admin/orders/count.xml

Parameters

Name Description
fulfillment_status array of statuses
delivery_variant array of delivery variant ids
payment_gateway_id array of payment gateway ids

Request

Route

GET /admin/orders/count.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<orders>
  <count type="integer">6</count>
</orders>

Get orders

Endpoint

GET /admin/orders.xml

Parameters

Name Description
fulfillment_status array of statuses
delivery_variant array of delivery variant ids
payment_gateway_id array of payment gateway ids
updated_since Set datetime to get only data updated after it.
from_id Set id to get only data starting from it.
per_page Quantity of objects per page.

Request

Route

GET /admin/orders.xml?fulfillment_status[]=new&fulfillment_status[]=delivered&delivery_variant[]=1&delivery_variant[]=2&payment_gateway_id[]=1&payment_gateway_id[]=3

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

fulfillment_status=["new", "delivered"]
delivery_variant=["1", "2"]
payment_gateway_id=["1", "3"]

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<orders type="array">
  <order>
    <id type="integer">8</id>
    <account-id type="integer">1</account-id>
    <fulfillment-status>new</fulfillment-status>
    <comment>comment</comment>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <payment-gateway-id type="integer">3</payment-gateway-id>
    <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
    <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
    <payment-title>наличными курьеру</payment-title>
    <payment-description nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-price type="decimal">0.0</delivery-price>
    <number type="integer">1008</number>
    <key nil="true"/>
    <accepted-at type="timestamp" nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
    <current-location nil="true"/>
    <query nil="true"/>
    <source-domain nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <financial-status>paid</financial-status>
    <paid-at type="timestamp" nil="true"/>
    <first-referer nil="true"/>
    <first-current-location nil="true"/>
    <first-query nil="true"/>
    <first-source-domain nil="true"/>
    <delivery-title>самовывоз</delivery-title>
    <margin type="decimal">0.0</margin>
    <archived type="boolean">false</archived>
    <manager-comment nil="true"/>
    <responsible-user-id type="integer" nil="true"/>
    <delivery-from-minutes type="integer" nil="true"/>
    <delivery-to-minutes type="integer" nil="true"/>
    <currency-code>RUR</currency-code>
    <client-transaction-id nil="true"/>
    <first-source></first-source>
    <source></source>
    <locale>ru</locale>
    <total-profit type="decimal">0.0</total-profit>
    <margin-amount type="decimal">0.0</margin-amount>
    <delivery-time></delivery-time>
    <fields-values type="array"/>
    <shipping-address>
      <id type="integer">9</id>
      <name>Name Name</name>
      <phone>+7(495)888-99-06</phone>
      <country>RU</country>
      <state>state</state>
      <city>Manchester</city>
      <address>address</address>
      <zip>567887</zip>
      <surname nil="true"/>
      <middlename nil="true"/>
      <street nil="true"/>
      <house nil="true"/>
      <flat nil="true"/>
      <full-locality-name nil="true"/>
      <doorphone nil="true"/>
      <floor nil="true"/>
      <entrance nil="true"/>
      <full-delivery-address>567887, state, Manchester, address</full-delivery-address>
      <full-name>Name Name</full-name>
      <address-for-gis>567887, state, Manchester, address</address-for-gis>
      <location-valid type="boolean">true</location-valid>
      <kladr-json nil="true"/>
      <no-delivery type="boolean">false</no-delivery>
      <formatted-phone>+7(495)888-99-06</formatted-phone>
      <kladr-autodetected-address></kladr-autodetected-address>
      <country-options type="array">
        <country-option>
          <code>RU</code>
          <title>Россия</title>
          <selected type="boolean">true</selected>
        </country-option>
      </country-options>
      <fields-values type="array"/>
<location>
  <kladr-code nil="true"/>
  <zip>567887</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>Manchester</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
    </shipping-address>
    <discounts type="array"/>
    <client>
      <id type="integer">3</id>
      <email>some-one2@yandex.ru</email>
      <name>Just Man</name>
      <phone>+7(926)111-22-33</phone>
      <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
      <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
      <comment nil="true"/>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <client-group-id type="integer">1</client-group-id>
      <surname nil="true"/>
      <middlename nil="true"/>
      <bonus-points type="integer">0</bonus-points>
      <type>Client::Individual</type>
      <correspondent-account nil="true"/>
      <settlement-account nil="true"/>
      <consent-to-personal-data type="boolean" nil="true"/>
      <o-auth-provider nil="true"/>
      <messenger-subscription type="boolean" nil="true"/>
      <contact-name>Just Man</contact-name>
      <progressive-discount nil="true"/>
      <group-discount type="decimal">25.0</group-discount>
      <ip-addr></ip-addr>
      <fields-values type="array"/>
    </client>
    <order-lines type="array"/>
    <items-price type="decimal">0.0</items-price>
    <total-price type="decimal">0.0</total-price>
    <full-delivery-price type="decimal">0.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
  <order>
    <id type="integer">6</id>
    <account-id type="integer">1</account-id>
    <fulfillment-status>new</fulfillment-status>
    <comment>comment</comment>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <payment-gateway-id type="integer">1</payment-gateway-id>
    <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
    <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
    <payment-title>наличными курьеру</payment-title>
    <payment-description nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-price type="decimal">100.0</delivery-price>
    <number type="integer">10011</number>
    <key>merged_client_order</key>
    <accepted-at type="timestamp" nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
    <current-location>/</current-location>
    <query nil="true"/>
    <source-domain nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <financial-status>pending</financial-status>
    <paid-at type="timestamp" nil="true"/>
    <first-referer>http://google.com?q=my_query</first-referer>
    <first-current-location>/my_query</first-current-location>
    <first-query nil="true"/>
    <first-source-domain nil="true"/>
    <delivery-title>самовывоз</delivery-title>
    <margin type="decimal">0.0</margin>
    <archived type="boolean">false</archived>
    <manager-comment>manager comment1</manager-comment>
    <responsible-user-id type="integer" nil="true"/>
    <delivery-from-minutes type="integer" nil="true"/>
    <delivery-to-minutes type="integer" nil="true"/>
    <currency-code>RUR</currency-code>
    <client-transaction-id nil="true"/>
    <first-source>Google</first-source>
    <source>Прямой трафик</source>
    <locale>ru</locale>
    <total-profit type="decimal">0.0</total-profit>
    <margin-amount type="decimal">0.0</margin-amount>
    <delivery-time></delivery-time>
    <fields-values type="array"/>
    <shipping-address>
      <id type="integer">2</id>
      <name>JD</name>
      <phone>+7(495)111-11-11</phone>
      <country>RU</country>
      <state>Moscow</state>
      <city>Moscow</city>
      <address>address</address>
      <zip>123456</zip>
      <surname nil="true"/>
      <middlename nil="true"/>
      <street nil="true"/>
      <house nil="true"/>
      <flat nil="true"/>
      <full-locality-name nil="true"/>
      <doorphone nil="true"/>
      <floor nil="true"/>
      <entrance nil="true"/>
      <full-delivery-address>123456, Moscow, address</full-delivery-address>
      <full-name>JD</full-name>
      <address-for-gis>123456, Moscow, address</address-for-gis>
      <location-valid type="boolean">true</location-valid>
      <kladr-json nil="true"/>
      <no-delivery type="boolean">false</no-delivery>
      <formatted-phone>+7(495)111-11-11</formatted-phone>
      <kladr-autodetected-address></kladr-autodetected-address>
      <country-options type="array">
        <country-option>
          <code>RU</code>
          <title>Россия</title>
          <selected type="boolean">true</selected>
        </country-option>
      </country-options>
      <fields-values type="array"/>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>Moscow</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>Moscow</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
    </shipping-address>
    <discounts type="array"/>
    <client>
      <id type="integer">7</id>
      <email>john2@doe.com</email>
      <name>John Doe</name>
      <phone>+7(926)111-11-11</phone>
      <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
      <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
      <comment nil="true"/>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <client-group-id type="integer" nil="true"/>
      <surname nil="true"/>
      <middlename nil="true"/>
      <bonus-points type="integer">100</bonus-points>
      <type>Client::Individual</type>
      <correspondent-account nil="true"/>
      <settlement-account nil="true"/>
      <consent-to-personal-data type="boolean" nil="true"/>
      <o-auth-provider nil="true"/>
      <messenger-subscription type="boolean" nil="true"/>
      <contact-name>John Doe</contact-name>
      <progressive-discount nil="true"/>
      <group-discount nil="true"/>
      <ip-addr></ip-addr>
      <fields-values type="array"/>
    </client>
    <order-lines type="array"/>
    <items-price type="decimal">0.0</items-price>
    <total-price type="decimal">100.0</total-price>
    <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
  <order>
    <id type="integer">4</id>
    <account-id type="integer">1</account-id>
    <fulfillment-status>new</fulfillment-status>
    <comment>comment</comment>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <payment-gateway-id type="integer">3</payment-gateway-id>
    <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
    <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
    <payment-title>наличными курьеру</payment-title>
    <payment-description nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-price type="decimal">0.0</delivery-price>
    <number type="integer">1005</number>
    <key nil="true"/>
    <accepted-at type="timestamp" nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
    <current-location nil="true"/>
    <query nil="true"/>
    <source-domain nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <financial-status>paid</financial-status>
    <paid-at type="timestamp" nil="true"/>
    <first-referer nil="true"/>
    <first-current-location nil="true"/>
    <first-query nil="true"/>
    <first-source-domain nil="true"/>
    <delivery-title>самовывоз</delivery-title>
    <margin type="decimal">20.0</margin>
    <archived type="boolean">false</archived>
    <manager-comment nil="true"/>
    <responsible-user-id type="integer" nil="true"/>
    <delivery-from-minutes type="integer" nil="true"/>
    <delivery-to-minutes type="integer" nil="true"/>
    <currency-code>RUR</currency-code>
    <client-transaction-id nil="true"/>
    <first-source></first-source>
    <source></source>
    <locale>ru</locale>
    <total-profit type="decimal">804.0</total-profit>
    <margin-amount type="decimal">134.0</margin-amount>
    <delivery-time></delivery-time>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">1</id>
        <field-id type="integer">174</field-id>
        <value>1234</value>
        <created-at type="dateTime">2025-02-11T00:56:43+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:56:43+03:00</updated-at>
        <type>Текст</type>
        <name>АКС айди отгрузки</name>
        <handle>aks_shipment_id</handle>
      </fields-value>
    </fields-values>
    <discounts type="array">
      <discount>
        <id type="integer">2</id>
        <discount type="decimal">330.0</discount>
        <type-id type="integer">2</type-id>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <description>рублевая скидка</description>
        <reference-id type="integer" nil="true"/>
        <discount-products-ids type="array"/>
        <reference-type nil="true"/>
        <discount-order-lines-ids type="array"/>
        <percent nil="true"/>
        <discount-code-id nil="true"/>
        <amount type="decimal">330.0</amount>
        <full-amount type="decimal">396.0</full-amount>
      </discount>
    </discounts>
    <client>
      <id type="integer">3</id>
      <email>some-one2@yandex.ru</email>
      <name>Just Man</name>
      <phone>+7(926)111-22-33</phone>
      <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
      <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
      <comment nil="true"/>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <client-group-id type="integer">1</client-group-id>
      <surname nil="true"/>
      <middlename nil="true"/>
      <bonus-points type="integer">0</bonus-points>
      <type>Client::Individual</type>
      <correspondent-account nil="true"/>
      <settlement-account nil="true"/>
      <consent-to-personal-data type="boolean" nil="true"/>
      <o-auth-provider nil="true"/>
      <messenger-subscription type="boolean" nil="true"/>
      <contact-name>Just Man</contact-name>
      <progressive-discount nil="true"/>
      <group-discount type="decimal">25.0</group-discount>
      <ip-addr></ip-addr>
      <fields-values type="array"/>
    </client>
    <order-lines type="array">
      <order-line>
        <id type="integer">7</id>
        <order-id type="integer">4</order-id>
        <variant-id type="integer">1</variant-id>
        <sale-price type="decimal">800.0</sale-price>
        <title>Cool t-shirt</title>
        <sku>425</sku>
        <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
        <weight type="decimal" nil="true"/>
        <product-id type="integer" nil="true"/>
        <discounts-amount type="decimal">264.0</discounts-amount>
        <unit>pce</unit>
        <barcode nil="true"/>
        <comment nil="true"/>
        <bundle-id type="integer" nil="true"/>
        <vat type="integer">-1</vat>
        <dimensions nil="true"/>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <requires-marking type="boolean" nil="true"/>
        <external-variant-id nil="true"/>
        <accessory-lines type="array"/>
        <marking-codes type="array">
        </marking-codes>
        <quantity type="integer">1</quantity>
        <reserved-quantity type="integer" nil="true"/>
        <full-sale-price type="decimal">643.2</full-sale-price>
        <total-price type="decimal">800.0</total-price>
        <full-total-price type="decimal">643.2</full-total-price>
      </order-line>
      <order-line>
        <id type="integer">8</id>
        <order-id type="integer">4</order-id>
        <variant-id type="integer">2</variant-id>
        <sale-price type="decimal">100.0</sale-price>
        <title>shirt</title>
        <sku>426</sku>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <weight type="decimal">0.3</weight>
        <product-id type="integer" nil="true"/>
        <discounts-amount type="decimal">66.0</discounts-amount>
        <unit>pce</unit>
        <barcode nil="true"/>
        <comment nil="true"/>
        <bundle-id type="integer" nil="true"/>
        <vat type="integer">-1</vat>
        <dimensions nil="true"/>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <requires-marking type="boolean" nil="true"/>
        <external-variant-id nil="true"/>
        <accessory-lines type="array"/>
        <marking-codes type="array">
        </marking-codes>
        <quantity type="integer">2</quantity>
        <reserved-quantity type="integer" nil="true"/>
        <full-sale-price type="decimal">80.4</full-sale-price>
        <total-price type="decimal">200.0</total-price>
        <full-total-price type="decimal">160.8</full-total-price>
      </order-line>
    </order-lines>
<discount>
  <id type="integer">2</id>
  <discount type="decimal">330.0</discount>
  <type-id type="integer">2</type-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
  <description>рублевая скидка</description>
  <reference-id type="integer" nil="true"/>
  <discount-products-ids type="array"/>
  <reference-type nil="true"/>
  <discount-order-lines-ids type="array"/>
  <percent nil="true"/>
  <discount-code-id nil="true"/>
  <amount type="decimal">330.0</amount>
  <full-amount type="decimal">396.0</full-amount>
</discount>
    <items-price type="decimal">804.0</items-price>
    <total-price type="decimal">804.0</total-price>
    <full-delivery-price type="decimal">0.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
  <order>
    <id type="integer">3</id>
    <account-id type="integer">1</account-id>
    <fulfillment-status>new</fulfillment-status>
    <comment>comment</comment>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <payment-gateway-id type="integer">3</payment-gateway-id>
    <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
    <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
    <payment-title>наличными курьеру</payment-title>
    <payment-description nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-price type="decimal">0.0</delivery-price>
    <number type="integer">1004</number>
    <key nil="true"/>
    <accepted-at type="timestamp" nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
    <current-location nil="true"/>
    <query nil="true"/>
    <source-domain nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <financial-status>paid</financial-status>
    <paid-at type="timestamp" nil="true"/>
    <first-referer nil="true"/>
    <first-current-location nil="true"/>
    <first-query nil="true"/>
    <first-source-domain nil="true"/>
    <delivery-title>самовывоз</delivery-title>
    <margin type="decimal">20.0</margin>
    <archived type="boolean">false</archived>
    <manager-comment nil="true"/>
    <responsible-user-id type="integer" nil="true"/>
    <delivery-from-minutes type="integer" nil="true"/>
    <delivery-to-minutes type="integer" nil="true"/>
    <currency-code>RUR</currency-code>
    <client-transaction-id nil="true"/>
    <first-source></first-source>
    <source></source>
    <locale>ru</locale>
    <total-profit type="decimal">840.0</total-profit>
    <margin-amount type="decimal">140.0</margin-amount>
    <delivery-time></delivery-time>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">2</id>
        <field-id type="integer">174</field-id>
        <value></value>
        <created-at type="dateTime">2025-02-11T00:56:43+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:56:43+03:00</updated-at>
        <type>Текст</type>
        <name>АКС айди отгрузки</name>
        <handle>aks_shipment_id</handle>
      </fields-value>
    </fields-values>
    <discounts type="array">
      <discount>
        <id type="integer">1</id>
        <discount type="decimal">30.0</discount>
        <type-id type="integer">1</type-id>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <description>процентная скидка</description>
        <reference-id type="integer" nil="true"/>
        <discount-products-ids type="array"/>
        <reference-type nil="true"/>
        <discount-order-lines-ids type="array"/>
        <percent type="decimal">30.0</percent>
        <discount-code-id nil="true"/>
        <amount type="decimal">300.0</amount>
        <full-amount type="decimal">360.0</full-amount>
      </discount>
    </discounts>
    <client>
      <id type="integer">3</id>
      <email>some-one2@yandex.ru</email>
      <name>Just Man</name>
      <phone>+7(926)111-22-33</phone>
      <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
      <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
      <comment nil="true"/>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <client-group-id type="integer">1</client-group-id>
      <surname nil="true"/>
      <middlename nil="true"/>
      <bonus-points type="integer">0</bonus-points>
      <type>Client::Individual</type>
      <correspondent-account nil="true"/>
      <settlement-account nil="true"/>
      <consent-to-personal-data type="boolean" nil="true"/>
      <o-auth-provider nil="true"/>
      <messenger-subscription type="boolean" nil="true"/>
      <contact-name>Just Man</contact-name>
      <progressive-discount nil="true"/>
      <group-discount type="decimal">25.0</group-discount>
      <ip-addr></ip-addr>
      <fields-values type="array"/>
    </client>
    <order-lines type="array">
      <order-line>
        <id type="integer">5</id>
        <order-id type="integer">3</order-id>
        <variant-id type="integer">1</variant-id>
        <sale-price type="decimal">800.0</sale-price>
        <title>Cool t-shirt</title>
        <sku>425</sku>
        <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
        <weight type="decimal" nil="true"/>
        <product-id type="integer" nil="true"/>
        <discounts-amount type="decimal">240.0</discounts-amount>
        <unit>pce</unit>
        <barcode nil="true"/>
        <comment nil="true"/>
        <bundle-id type="integer" nil="true"/>
        <vat type="integer">-1</vat>
        <dimensions nil="true"/>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <requires-marking type="boolean" nil="true"/>
        <external-variant-id nil="true"/>
        <accessory-lines type="array"/>
        <marking-codes type="array">
        </marking-codes>
        <quantity type="integer">1</quantity>
        <reserved-quantity type="integer" nil="true"/>
        <full-sale-price type="decimal">672.0</full-sale-price>
        <total-price type="decimal">800.0</total-price>
        <full-total-price type="decimal">672.0</full-total-price>
      </order-line>
      <order-line>
        <id type="integer">6</id>
        <order-id type="integer">3</order-id>
        <variant-id type="integer">2</variant-id>
        <sale-price type="decimal">100.0</sale-price>
        <title>shirt</title>
        <sku>426</sku>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <weight type="decimal">0.3</weight>
        <product-id type="integer" nil="true"/>
        <discounts-amount type="decimal">60.0</discounts-amount>
        <unit>pce</unit>
        <barcode nil="true"/>
        <comment nil="true"/>
        <bundle-id type="integer" nil="true"/>
        <vat type="integer">0</vat>
        <dimensions nil="true"/>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <requires-marking type="boolean" nil="true"/>
        <external-variant-id nil="true"/>
        <accessory-lines type="array"/>
        <marking-codes type="array">
        </marking-codes>
        <quantity type="integer">2</quantity>
        <reserved-quantity type="integer" nil="true"/>
        <full-sale-price type="decimal">84.0</full-sale-price>
        <total-price type="decimal">200.0</total-price>
        <full-total-price type="decimal">168.0</full-total-price>
      </order-line>
    </order-lines>
<discount>
  <id type="integer">1</id>
  <discount type="decimal">30.0</discount>
  <type-id type="integer">1</type-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
  <description>процентная скидка</description>
  <reference-id type="integer" nil="true"/>
  <discount-products-ids type="array"/>
  <reference-type nil="true"/>
  <discount-order-lines-ids type="array"/>
  <percent type="decimal">30.0</percent>
  <discount-code-id nil="true"/>
  <amount type="decimal">300.0</amount>
  <full-amount type="decimal">360.0</full-amount>
</discount>
    <items-price type="decimal">840.0</items-price>
    <total-price type="decimal">840.0</total-price>
    <full-delivery-price type="decimal">0.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
  <order>
    <id type="integer">1</id>
    <account-id type="integer">1</account-id>
    <fulfillment-status>new</fulfillment-status>
    <comment>comment</comment>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <payment-gateway-id type="integer">1</payment-gateway-id>
    <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:30 +0300</updated-at>
    <payment-title>наличными курьеру</payment-title>
    <payment-description nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-price type="decimal">100.0</delivery-price>
    <number type="integer">1001</number>
    <key>teest</key>
    <accepted-at type="timestamp" nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
    <current-location>/</current-location>
    <query nil="true"/>
    <source-domain nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <financial-status>pending</financial-status>
    <paid-at type="timestamp" nil="true"/>
    <first-referer>http://google.com?q=my_query</first-referer>
    <first-current-location>/my_query</first-current-location>
    <first-query nil="true"/>
    <first-source-domain nil="true"/>
    <delivery-title>самовывоз</delivery-title>
    <margin type="decimal">0.0</margin>
    <archived type="boolean">false</archived>
    <manager-comment>manager comment1</manager-comment>
    <responsible-user-id type="integer" nil="true"/>
    <delivery-from-minutes type="integer" nil="true"/>
    <delivery-to-minutes type="integer" nil="true"/>
    <currency-code>RUR</currency-code>
    <client-transaction-id type="integer">1</client-transaction-id>
    <first-source>Google</first-source>
    <source>Прямой трафик</source>
    <locale>ru</locale>
    <total-profit type="decimal">1500.0</total-profit>
    <margin-amount type="decimal">0.0</margin-amount>
    <delivery-time></delivery-time>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">31</id>
        <field-id type="integer">206</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:30+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:30+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle>my_awesome_field</handle>
      </fields-value>
    </fields-values>
    <shipping-address>
      <id type="integer">1</id>
      <name>Tom Dellay</name>
      <phone>+7(495)212-85-06</phone>
      <country>RU</country>
      <state>state</state>
      <city>London</city>
      <address>address</address>
      <zip>123456</zip>
      <surname nil="true"/>
      <middlename nil="true"/>
      <street nil="true"/>
      <house nil="true"/>
      <flat nil="true"/>
      <full-locality-name nil="true"/>
      <doorphone nil="true"/>
      <floor nil="true"/>
      <entrance nil="true"/>
      <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
      <full-name>Tom Dellay</full-name>
      <address-for-gis>123456, state, London, address</address-for-gis>
      <location-valid type="boolean">true</location-valid>
      <kladr-json nil="true"/>
      <no-delivery type="boolean">false</no-delivery>
      <formatted-phone>+7(495)212-85-06</formatted-phone>
      <kladr-autodetected-address></kladr-autodetected-address>
      <country-options type="array">
        <country-option>
          <code>RU</code>
          <title>Россия</title>
          <selected type="boolean">true</selected>
        </country-option>
      </country-options>
      <fields-values type="array">
        <fields-value type="FieldValue">
          <id type="integer">30</id>
          <field-id type="integer">205</field-id>
          <value>old value</value>
          <created-at type="dateTime">2025-02-11T00:57:30+03:00</created-at>
          <updated-at type="dateTime">2025-02-11T00:57:30+03:00</updated-at>
          <type>Текст</type>
          <name>special</name>
          <handle nil="true"/>
        </fields-value>
      </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
    </shipping-address>
    <discounts type="array"/>
    <client>
      <id type="integer">2</id>
      <email>some-one@yandex.ru</email>
      <name>Mortimer Hant</name>
      <phone>+79162128506</phone>
      <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:30 +0300</updated-at>
      <comment nil="true"/>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <client-group-id type="integer" nil="true"/>
      <surname nil="true"/>
      <middlename nil="true"/>
      <bonus-points type="integer">0</bonus-points>
      <type>Client::Individual</type>
      <correspondent-account nil="true"/>
      <settlement-account nil="true"/>
      <consent-to-personal-data type="boolean" nil="true"/>
      <o-auth-provider nil="true"/>
      <messenger-subscription type="boolean" nil="true"/>
      <contact-name>Mortimer Hant</contact-name>
      <progressive-discount nil="true"/>
      <group-discount nil="true"/>
      <ip-addr></ip-addr>
      <fields-values type="array">
        <fields-value type="FieldValue">
          <id type="integer">29</id>
          <field-id type="integer">204</field-id>
          <value>old value</value>
          <created-at type="dateTime">2025-02-11T00:57:30+03:00</created-at>
          <updated-at type="dateTime">2025-02-11T00:57:30+03:00</updated-at>
          <type>Текст</type>
          <name>special</name>
          <handle nil="true"/>
        </fields-value>
      </fields-values>
    </client>
    <order-lines type="array">
      <order-line>
        <id type="integer">1</id>
        <order-id type="integer">1</order-id>
        <variant-id type="integer">1</variant-id>
        <sale-price type="decimal">300.0</sale-price>
        <title>Cool t-shirt</title>
        <sku>423</sku>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <weight type="decimal" nil="true"/>
        <product-id type="integer">1</product-id>
        <discounts-amount type="decimal">0.0</discounts-amount>
        <unit>pce</unit>
        <barcode nil="true"/>
        <comment nil="true"/>
        <bundle-id type="integer" nil="true"/>
        <vat type="integer">-1</vat>
        <dimensions nil="true"/>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <requires-marking type="boolean" nil="true"/>
        <external-variant-id nil="true"/>
        <accessory-lines type="array"/>
        <marking-codes type="array">
        </marking-codes>
        <quantity type="integer">1</quantity>
        <reserved-quantity type="integer" nil="true"/>
        <full-sale-price type="decimal">300.0</full-sale-price>
        <total-price type="decimal">300.0</total-price>
        <full-total-price type="decimal">300.0</full-total-price>
      </order-line>
      <order-line>
        <id type="integer">2</id>
        <order-id type="integer">1</order-id>
        <variant-id type="integer">2</variant-id>
        <sale-price type="decimal">600.0</sale-price>
        <title>shirt</title>
        <sku>424</sku>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <weight type="decimal">0.3</weight>
        <product-id type="integer">2</product-id>
        <discounts-amount type="decimal">0.0</discounts-amount>
        <unit>pce</unit>
        <barcode nil="true"/>
        <comment nil="true"/>
        <bundle-id type="integer" nil="true"/>
        <vat type="integer">20</vat>
        <dimensions nil="true"/>
        <fiscal-product-type type="integer">1</fiscal-product-type>
        <requires-marking type="boolean" nil="true"/>
        <external-variant-id nil="true"/>
        <accessory-lines type="array"/>
        <marking-codes type="array">
        </marking-codes>
        <quantity type="integer">2</quantity>
        <reserved-quantity type="integer" nil="true"/>
        <full-sale-price type="decimal">600.0</full-sale-price>
        <total-price type="decimal">1200.0</total-price>
        <full-total-price type="decimal">1200.0</full-total-price>
      </order-line>
    </order-lines>
    <items-price type="decimal">1500.0</items-price>
    <total-price type="decimal">1600.0</total-price>
    <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
</orders>

Remove discount

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[discounts_attributes] required discounts attributes
order[discounts_attributes][][id] required discount id
order[discounts_attributes][][_destroy] required destroy marker (1 or true)

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <discounts-attributes type="array">
    <discounts-attribute>
      <id type="integer">11</id>
      <_destroy type="boolean">true</_destroy>
    </discounts-attribute>
  </discounts-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:37 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">170.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">73</id>
      <field-id type="integer">248</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:37+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:37+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">72</id>
        <field-id type="integer">247</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:37+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:37+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:37 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">71</id>
        <field-id type="integer">246</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:37+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:37+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">19</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">100.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <sku>423</sku>
      <created-at type="timestamp">2025-02-11 00:57:37 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:37 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">100.0</full-sale-price>
      <total-price type="decimal">200.0</total-price>
      <full-total-price type="decimal">200.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">20</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">150.0</sale-price>
      <title>shirt (Зеленый / Синий)</title>
      <sku>424</sku>
      <created-at type="timestamp">2025-02-11 00:57:37 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:37 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">150.0</full-sale-price>
      <total-price type="decimal">150.0</total-price>
      <full-total-price type="decimal">150.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">350.0</items-price>
  <total-price type="decimal">450.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Remove order line

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][id] required order line id
order[order_lines_attributes][][_destroy] required destroy marker (1 or true)

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order-lines-attributes type="array">
    <order-lines-attribute>
      <id type="integer">1</id>
      <_destroy type="boolean">true</_destroy>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">1200.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">64</id>
      <field-id type="integer">239</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">63</id>
        <field-id type="integer">238</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">62</id>
        <field-id type="integer">237</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>shirt</title>
      <sku>424</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">20</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">600.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1200.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">1200.0</items-price>
  <total-price type="decimal">1300.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Update custom status

This query updates custom status. Despite the fact that “order[fulfillment_status]” parameter is permitted, using both of the parameters is strongly discouraged. Please, keep in mind that if both parameters are transfered they MUST be compatible. Please, notice that you CAN’T update custom status using order[custom_status][permalink] parameter.

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[custom_status_permalink] required custom status
order[fulfillment_status] fulfillment status

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <custom-status-permalink>v-obrabotke</custom-status-permalink>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>accepted</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:34 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp">2025-02-11 00:57:34 +0300</accepted-at>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">1500.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">55</id>
      <field-id type="integer">230</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:34+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:34+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">54</id>
        <field-id type="integer">229</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:34+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:34+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:34 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">53</id>
        <field-id type="integer">228</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:34+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:34+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">300.0</sale-price>
      <title>Cool t-shirt</title>
      <sku>423</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">300.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">300.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>shirt</title>
      <sku>424</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">20</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">600.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1200.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">1500.0</items-price>
  <total-price type="decimal">1600.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>accepted</permalink>
  <title>В обработке</title>
</custom-status>
</order>

Update discount

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[discounts_attributes] required discounts attributes
order[discounts_attributes][][id] required discount id
order[discounts_attributes][][discount] discount amount
order[discounts_attributes][][type_id] 1 - percent (default), 2 - money
order[discounts_attributes][][description] description text
order[discounts_attributes][][discount_order_lines_ids] ids of affected order lines (all will be affected if not specified)

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <discounts-attributes type="array">
    <discounts-attribute>
      <id type="integer">12</id>
      <discount-order-lines-ids type="array">
        <discount-order-lines-id type="integer">21</discount-order-lines-id>
      </discount-order-lines-ids>
    </discounts-attribute>
  </discounts-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">150.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">76</id>
      <field-id type="integer">251</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:37+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:37+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">75</id>
        <field-id type="integer">250</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:37+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:37+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array">
    <discount>
      <id type="integer">12</id>
      <discount type="decimal">20.0</discount>
      <type-id type="integer">2</type-id>
      <created-at type="timestamp">2025-02-11 00:57:38 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
      <description>-20 (absolute)</description>
      <reference-id type="integer" nil="true"/>
      <discount-products-ids type="array">
        <discount-products-id type="integer">1</discount-products-id>
      </discount-products-ids>
      <reference-type nil="true"/>
      <discount-order-lines-ids type="array">
        <discount-order-lines-id type="integer">21</discount-order-lines-id>
      </discount-order-lines-ids>
      <percent nil="true"/>
      <discount-code-id nil="true"/>
      <amount type="decimal">20.0</amount>
      <full-amount type="decimal">20.0</full-amount>
    </discount>
  </discounts>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:37 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">74</id>
        <field-id type="integer">249</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:37+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:37+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">21</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">100.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <sku>423</sku>
      <created-at type="timestamp">2025-02-11 00:57:37 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">20.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions>10x20x30</dimensions>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">90.0</full-sale-price>
      <total-price type="decimal">200.0</total-price>
      <full-total-price type="decimal">180.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">22</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">150.0</sale-price>
      <title>shirt (Зеленый / Синий)</title>
      <sku>424</sku>
      <created-at type="timestamp">2025-02-11 00:57:37 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">150.0</full-sale-price>
      <total-price type="decimal">150.0</total-price>
      <full-total-price type="decimal">150.0</full-total-price>
    </order-line>
  </order-lines>
<discount>
  <id type="integer">12</id>
  <discount type="decimal">20.0</discount>
  <type-id type="integer">2</type-id>
  <created-at type="timestamp">2025-02-11 00:57:38 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
  <description>-20 (absolute)</description>
  <reference-id type="integer" nil="true"/>
  <discount-products-ids type="array">
    <discount-products-id type="integer">1</discount-products-id>
  </discount-products-ids>
  <reference-type nil="true"/>
  <discount-order-lines-ids type="array">
    <discount-order-lines-id type="integer">21</discount-order-lines-id>
  </discount-order-lines-ids>
  <percent nil="true"/>
  <discount-code-id nil="true"/>
  <amount type="decimal">20.0</amount>
  <full-amount type="decimal">20.0</full-amount>
</discount>
  <items-price type="decimal">330.0</items-price>
  <total-price type="decimal">430.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Update order line

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description Type
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][id] required order line id
order[order_lines_attributes][][sale_price] order line sale price
order[order_lines_attributes][][quantity] order line quantity
order[order_lines_attributes][][comment] order line comment
order[order_lines_attributes][][vat] integer, VAT for order line is equal to VAT of its product, by default, products get their value from account by default,if default in account set as 'No VAT', you need to use 'force' to change VAT of order line through API; possible values depend on country, set to -1 if this product is not a subject to VAT
order[order_lines_attributes][][marking_codes] array of marking codes array

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order-lines-attributes type="array">
    <order-lines-attribute>
      <id type="integer">1</id>
      <sale-price type="integer">100</sale-price>
      <quantity type="integer">2</quantity>
      <comment>New comment</comment>
      <vat type="integer">0</vat>
      <marking-codes type="array">
        <marking-code>543b23a48972fb231fa1</marking-code>
        <marking-code>1f99edbdcbd2dea52b89</marking-code>
      </marking-codes>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">1400.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">67</id>
      <field-id type="integer">242</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name nil="true"/>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">66</id>
        <field-id type="integer">241</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:35 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">65</id>
        <field-id type="integer">240</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:35+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:35+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">100.0</sale-price>
      <title>Cool t-shirt</title>
      <sku>423</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment>New comment</comment>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">0</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean">true</requires-marking>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
        <marking-code type="base64Binary">NTQzYjIzYTQ4OTcyZmIyMzFmYTE=</marking-code>
        <marking-code type="base64Binary">MWY5OWVkYmRjYmQyZGVhNTJiODk=</marking-code>
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">100.0</full-sale-price>
      <total-price type="decimal">200.0</total-price>
      <full-total-price type="decimal">200.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>shirt</title>
      <sku>424</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:36 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">20</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">600.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1200.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">1400.0</items-price>
  <total-price type="decimal">1500.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Update order

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[client_attributes] client info
order[client_attributes][name] client name
order[client_attributes][email] client email
order[client_attributes][phone] client phone
order[delivery_variant_id] delivery variant id
order[payment_gateway_id] payment gateway id
order[coupon] discount code
order[comment] client comment to order
order[manager_comment] manager comment to order
order[financial_status] pending or paid
order[fields_values_attributes] fields values array
order[shipping_address_attributes] array of shipping address attributes
order[discounts_attributes] array of discounts attributes
order[warehouse_id] id of a warehouse to reserve products on

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <client-attributes>
    <id type="integer">2</id>
    <name>Ivan</name>
    <email>ivan@example.com</email>
    <phone>79111113344</phone>
    <fields-values-attributes type="array">
      <fields-values-attribute>
        <field-id type="integer">225</field-id>
        <value>new!</value>
      </fields-values-attribute>
    </fields-values-attributes>
  </client-attributes>
  <delivery-variant-id type="integer">3</delivery-variant-id>
  <payment-gateway-id type="integer">4</payment-gateway-id>
  <coupon>20% discount</coupon>
  <comment>Please call from 9 to 18</comment>
  <manager-comment>New client</manager-comment>
  <financial-status>paid</financial-status>
  <fields-values-attributes type="array">
    <fields-values-attribute>
      <handle>my_awesome_field</handle>
      <value>new value</value>
    </fields-values-attribute>
  </fields-values-attributes>
  <shipping-address-attributes>
    <fields-values-attributes type="array">
      <fields-values-attribute>
        <field-id type="integer">226</field-id>
        <value>new value!</value>
      </fields-values-attribute>
    </fields-values-attributes>
  </shipping-address-attributes>
  <warehouse-id type="integer">22</warehouse-id>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <payment-gateway-id type="integer">4</payment-gateway-id>
  <margin type="decimal">0.0</margin>
  <payment-title>Выставление счета для юр. лиц 2.</payment-title>
  <payment-description nil="true"/>
  <delivery-variant-id type="integer">3</delivery-variant-id>
  <delivery-price type="decimal">0.0</delivery-price>
  <delivery-description>Внешний (Внешний способ)</delivery-description>
  <delivery-title>Внешний</delivery-title>
  <comment>Please call from 9 to 18</comment>
  <paid-at type="timestamp">2025-02-11 00:57:33 +0300</paid-at>
  <financial-status>paid</financial-status>
  <manager-comment>New client</manager-comment>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:33 +0300</updated-at>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <archived type="boolean">false</archived>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">1200.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <field-id type="integer">227</field-id>
      <id type="integer">52</id>
      <value>new value</value>
      <created-at type="dateTime">2025-02-11T00:57:33+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:33+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+74952128506</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>address</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name></full-locality-name>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, address, new value!</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, address</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <field-id type="integer">226</field-id>
        <id type="integer">51</id>
        <value>new value!</value>
        <created-at type="dateTime">2025-02-11T00:57:33+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:33+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>address</address>
  <street>address</street>
  <street-type nil="true"/>
  <house nil="true"/>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array">
    <discount>
      <id type="integer">7</id>
      <discount type="decimal">20.0</discount>
      <type-id type="integer">1</type-id>
      <created-at type="timestamp">2025-02-11 00:57:33 +0300</created-at>
      <updated-at type="timestamp">2025-02-11 00:57:33 +0300</updated-at>
      <description>Скидка по купону 20% discount</description>
      <reference-id type="integer">179</reference-id>
      <discount-products-ids type="array"/>
      <reference-type>DiscountCode</reference-type>
      <discount-order-lines-ids type="array"/>
      <percent type="decimal">20.0</percent>
      <discount-code-id type="integer">179</discount-code-id>
      <amount type="decimal">300.0</amount>
      <full-amount type="decimal">300.0</full-amount>
    </discount>
  </discounts>
  <client>
    <name>Ivan</name>
    <phone>79111113344</phone>
    <email>ivan@example.com</email>
    <id type="integer">2</id>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:33 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Ivan</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <field-id type="integer">225</field-id>
        <id type="integer">50</id>
        <value>new!</value>
        <created-at type="dateTime">2025-02-11T00:57:33+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:33+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">300.0</sale-price>
      <title>Cool t-shirt</title>
      <sku>423</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">60.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">240.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">240.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>shirt</title>
      <sku>424</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">240.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">20</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">480.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">960.0</full-total-price>
    </order-line>
  </order-lines>
<discount>
  <id type="integer">7</id>
  <discount type="decimal">20.0</discount>
  <type-id type="integer">1</type-id>
  <created-at type="timestamp">2025-02-11 00:57:33 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:33 +0300</updated-at>
  <description>Скидка по купону 20% discount</description>
  <reference-id type="integer">179</reference-id>
  <discount-products-ids type="array"/>
  <reference-type>DiscountCode</reference-type>
  <discount-order-lines-ids type="array"/>
  <percent type="decimal">20.0</percent>
  <discount-code-id type="integer">179</discount-code-id>
  <amount type="decimal">300.0</amount>
  <full-amount type="decimal">300.0</full-amount>
</discount>
  <items-price type="decimal">1200.0</items-price>
  <total-price type="decimal">1200.0</total-price>
  <full-delivery-price type="decimal">0.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id type="integer">3</delivery-variant-id>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price type="integer">0</price>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array">
    <error>Невозможно рассчитать стоимость доставки. Не указан url для пересчета стоимости доставки</error>
  </errors>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method type="array"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Update shipping address

Endpoint

PUT /admin/orders/:order_id.xml

Parameters

Name Description
order[shipping_address_attributes] required array of shipping address attributes
order[shipping_address_attributes][address] required shipping address

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <shipping-address-attributes>
    <address>Moscow, Znamenka 12</address>
  </shipping-address-attributes>
</order>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <id type="integer">1</id>
  <account-id type="integer">1</account-id>
  <fulfillment-status>new</fulfillment-status>
  <comment>comment</comment>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
  <payment-title>наличными курьеру</payment-title>
  <payment-description nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-price type="decimal">100.0</delivery-price>
  <number type="integer">1001</number>
  <key>teest</key>
  <accepted-at type="timestamp" nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <referer>http://yandex.ru/yandsearch?text=%D1%81%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BC%D0%B5%D1%88%D0%BA%D0%B8&amp;stpar2=%2Fh1%2Ftm7%2Fs1&amp;stpar4=%2Fs1&amp;stpar1=%2Fu1&amp;stpar3=%2Fm3%2Ftc14%2Fnc1</referer>
  <current-location>/</current-location>
  <query nil="true"/>
  <source-domain nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <financial-status>pending</financial-status>
  <paid-at type="timestamp" nil="true"/>
  <first-referer>http://google.com?q=my_query</first-referer>
  <first-current-location>/my_query</first-current-location>
  <first-query nil="true"/>
  <first-source-domain nil="true"/>
  <delivery-title>самовывоз</delivery-title>
  <margin type="decimal">0.0</margin>
  <archived type="boolean">false</archived>
  <manager-comment>manager comment1</manager-comment>
  <responsible-user-id type="integer" nil="true"/>
  <delivery-from-minutes type="integer" nil="true"/>
  <delivery-to-minutes type="integer" nil="true"/>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <first-source>Google</first-source>
  <source>Прямой трафик</source>
  <locale>ru</locale>
  <total-profit type="decimal">1500.0</total-profit>
  <margin-amount type="decimal">0.0</margin-amount>
  <delivery-time></delivery-time>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <id type="integer">79</id>
      <field-id type="integer">254</field-id>
      <value>old value</value>
      <created-at type="dateTime">2025-02-11T00:57:38+03:00</created-at>
      <updated-at type="dateTime">2025-02-11T00:57:38+03:00</updated-at>
      <type>Текст</type>
      <name>special</name>
      <handle>my_awesome_field</handle>
    </fields-value>
  </fields-values>
  <shipping-address>
    <id type="integer">1</id>
    <name>Tom Dellay</name>
    <phone>+74952128506</phone>
    <country>RU</country>
    <state>state</state>
    <city>London</city>
    <address>Moscow, Znamenka 12</address>
    <zip>123456</zip>
    <surname nil="true"/>
    <middlename nil="true"/>
    <street nil="true"/>
    <house nil="true"/>
    <flat nil="true"/>
    <full-locality-name></full-locality-name>
    <doorphone nil="true"/>
    <floor nil="true"/>
    <entrance nil="true"/>
    <full-delivery-address>123456, state, London, Moscow, Znamenka 12, old value</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <address-for-gis>123456, state, London, Moscow, Znamenka 12</address-for-gis>
    <location-valid type="boolean">true</location-valid>
    <kladr-json nil="true"/>
    <no-delivery type="boolean">false</no-delivery>
    <formatted-phone>+7(495)212-85-06</formatted-phone>
    <kladr-autodetected-address></kladr-autodetected-address>
    <country-options type="array">
      <country-option>
        <code>RU</code>
        <title>Россия</title>
        <selected type="boolean">true</selected>
      </country-option>
    </country-options>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">78</id>
        <field-id type="integer">253</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:38+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:38+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
<location>
  <kladr-code nil="true"/>
  <zip>123456</zip>
  <kladr-zip nil="true"/>
  <region-zip nil="true"/>
  <country>RU</country>
  <state>state</state>
  <state-type nil="true"/>
  <area nil="true"/>
  <area-type nil="true"/>
  <city>London</city>
  <city-type nil="true"/>
  <settlement nil="true"/>
  <settlement-type nil="true"/>
  <address>Moscow, Znamenka 12</address>
  <street>Moscow</street>
  <street-type nil="true"/>
  <house>Znamenka 12</house>
  <flat nil="true"/>
  <is-kladr type="boolean">false</is-kladr>
  <latitude nil="true"/>
  <longitude nil="true"/>
  <autodetected nil="true"/>
</location>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <id type="integer">2</id>
    <email>some-one@yandex.ru</email>
    <name>Mortimer Hant</name>
    <phone>+79162128506</phone>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <updated-at type="timestamp">2025-02-11 00:57:38 +0300</updated-at>
    <comment nil="true"/>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <client-group-id type="integer" nil="true"/>
    <surname nil="true"/>
    <middlename nil="true"/>
    <bonus-points type="integer">0</bonus-points>
    <type>Client::Individual</type>
    <correspondent-account nil="true"/>
    <settlement-account nil="true"/>
    <consent-to-personal-data type="boolean" nil="true"/>
    <o-auth-provider nil="true"/>
    <messenger-subscription type="boolean" nil="true"/>
    <contact-name>Mortimer Hant</contact-name>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <ip-addr></ip-addr>
    <fields-values type="array">
      <fields-value type="FieldValue">
        <id type="integer">77</id>
        <field-id type="integer">252</field-id>
        <value>old value</value>
        <created-at type="dateTime">2025-02-11T00:57:38+03:00</created-at>
        <updated-at type="dateTime">2025-02-11T00:57:38+03:00</updated-at>
        <type>Текст</type>
        <name>special</name>
        <handle nil="true"/>
      </fields-value>
    </fields-values>
  </client>
  <order-lines type="array">
    <order-line>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">1</variant-id>
      <sale-price type="decimal">300.0</sale-price>
      <title>Cool t-shirt</title>
      <sku>423</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">-1</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">300.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">300.0</full-total-price>
    </order-line>
    <order-line>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <variant-id type="integer">2</variant-id>
      <sale-price type="decimal">600.0</sale-price>
      <title>shirt</title>
      <sku>424</sku>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <weight type="decimal">0.3</weight>
      <product-id type="integer">2</product-id>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <unit>pce</unit>
      <barcode nil="true"/>
      <comment nil="true"/>
      <bundle-id type="integer" nil="true"/>
      <vat type="integer">20</vat>
      <dimensions nil="true"/>
      <fiscal-product-type type="integer">1</fiscal-product-type>
      <requires-marking type="boolean" nil="true"/>
      <external-variant-id nil="true"/>
      <accessory-lines type="array"/>
      <marking-codes type="array">
      </marking-codes>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">600.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1200.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">1500.0</items-price>
  <total-price type="decimal">1600.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<nil-classes type="array"/>
<delivery-info>
  <delivery-variant-id nil="true"/>
  <tariff-id nil="true"/>
  <title nil="true"/>
  <description nil="true"/>
  <price nil="true"/>
  <shipping-company nil="true"/>
  <shipping-company-handle nil="true"/>
  <delivery-interval>
    <min-days nil="true"/>
    <max-days nil="true"/>
    <description></description>
  </delivery-interval>
  <errors type="array"/>
  <warnings type="array"/>
  <outlet>
    <id nil="true"/>
    <external-id nil="true"/>
    <latitude nil="true"/>
    <longitude nil="true"/>
    <title nil="true"/>
    <description nil="true"/>
    <address nil="true"/>
    <payment-method nil="true"/>
    <source-id nil="true"/>
  </outlet>
  <not-available nil="true"/>
</delivery-info>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Outlet

Create outlet

Endpoint

POST /admin/outlets.xml

Parameters

Name Description
outlet[title] required title
outlet[description] description
outlet[address] required address in text way
outlet[price] required delivery price
outlet[latitude] required point latitude
outlet[longitude] required point longitude

Request

Route

POST /admin/outlets.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<outlet>
  <title>Point 2</title>
  <description>Point description</description>
  <address>some address</address>
  <price type="integer">300</price>
  <latitude type="float">55.7558</latitude>
  <longitude type="float">37.6173</longitude>
</outlet>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<outlet>
  <id type="integer">6</id>
  <account-id type="integer">1</account-id>
  <delivery-variant-id type="integer">34</delivery-variant-id>
  <price type="decimal">300.0</price>
  <title-translations type="array">
    <title-translation>Point 2</title-translation>
  </title-translations>
  <description-translations type="array">
    <description-translation>Point description</description-translation>
  </description-translations>
  <address>some address</address>
  <latitude type="decimal">55.7558</latitude>
  <longitude type="decimal">37.6173</longitude>
  <created-at type="dateTime">2025-02-11T00:57:19+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:19+03:00</updated-at>
  <title>Point 2</title>
  <description>Point description</description>
</outlet>

Destroy outlet

Endpoint

DELETE /admin/outlets/:outlet_id.xml

Request

Route

DELETE /admin/outlets/11.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get outlet

Endpoint

GET /admin/outlets/:outlet_id.xml

Request

Route

GET /admin/outlets/3.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<outlet>
  <id type="integer">3</id>
  <account-id type="integer">1</account-id>
  <delivery-variant-id type="integer">32</delivery-variant-id>
  <price type="decimal">100.0</price>
  <title-translations type="array">
    <title-translation>Самовывоз от метро</title-translation>
  </title-translations>
  <description-translations type="array">
    <description-translation>Вход через арку во двор</description-translation>
  </description-translations>
  <address>ул Хмурого д1</address>
  <latitude type="decimal">55.7558</latitude>
  <longitude type="decimal">37.6173</longitude>
  <created-at type="dateTime">2025-02-11T00:57:19+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:19+03:00</updated-at>
  <title>Самовывоз от метро</title>
  <description>Вход через арку во двор</description>
</outlet>

Get outlets

Endpoint

GET /admin/outlets.xml

Request

Route

GET /admin/outlets.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<outlets type="array">
  <outlet>
    <id type="integer">1</id>
    <account-id type="integer">1</account-id>
    <delivery-variant-id type="integer">30</delivery-variant-id>
    <price type="decimal">100.0</price>
    <title-translations type="array">
      <title-translation>Самовывоз от метро</title-translation>
    </title-translations>
    <description-translations type="array">
      <description-translation>Вход через арку во двор</description-translation>
    </description-translations>
    <address>ул Хмурого д1</address>
    <latitude type="decimal">55.7558</latitude>
    <longitude type="decimal">37.6173</longitude>
    <created-at type="dateTime">2025-02-11T00:57:18+03:00</created-at>
    <updated-at type="dateTime">2025-02-11T00:57:18+03:00</updated-at>
    <title>Самовывоз от метро</title>
    <description>Вход через арку во двор</description>
  </outlet>
</outlets>

Update outlet

Endpoint

PUT /admin/outlets/:outlet_id.xml

Parameters

Name Description
outlet[title] required title
outlet[description] description
outlet[address] required address in text way
outlet[price] required delivery price
outlet[latitude] required point latitude
outlet[longitude] required point longitude

Request

Route

PUT /admin/outlets/9.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<outlet>
  <title>New point title</title>
  <description>New point description</description>
  <address>some new address</address>
  <price type="integer">300</price>
  <latitude type="float">55.7558</latitude>
  <longitude type="float">37.6173</longitude>
</outlet>

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<outlet>
  <delivery-variant-id type="integer">36</delivery-variant-id>
  <title>New point title</title>
  <description>New point description</description>
  <address>some new address</address>
  <price type="decimal">300.0</price>
  <latitude type="decimal">55.7558</latitude>
  <longitude type="decimal">37.6173</longitude>
  <title-translations type="array">
    <title-translation>New point title</title-translation>
  </title-translations>
  <description-translations type="array">
    <description-translation>New point description</description-translation>
  </description-translations>
  <id type="integer">9</id>
  <account-id type="integer">1</account-id>
  <created-at type="dateTime">2025-02-11T00:57:19+03:00</created-at>
  <updated-at type="dateTime">2025-02-11T00:57:19+03:00</updated-at>
</outlet>

Page

Create page

Endpoint

POST /admin/pages.xml

Parameters

Name Description
page[title] required page title
page[content] required page content
page[permalink] permalink on /page/*
page[html_title] html title tag content
page[meta_keywords] html meta words on page
page[meta_description] html meta description
page[created_at] publication date

Request

Route

POST /admin/pages.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <title>new page</title>
  <content>&lt;p&gt;content of my page&lt;p&gt;</content>
  <permalink>first_page</permalink>
  <html-title>HTML TAG TITLE</html-title>
  <meta-keywords>new cool products</meta-keywords>
  <meta-description>It's a page about our new products</meta-description>
  <created-at>2014-09-09</created-at>
</page>

Response

Simulated Response

Status

201

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <id type="integer">19</id>
  <created-at type="timestamp">2014-09-09 00:00:00 +0400</created-at>
  <updated-at type="timestamp">2025-02-11 00:58:40 +0300</updated-at>
  <custom-template nil="true"/>
  <title>new page</title>
  <permalink>first_page</permalink>
  <html-title>HTML TAG TITLE</html-title>
  <meta-keywords>new cool products</meta-keywords>
  <is-main type="boolean">false</is-main>
  <meta-description>It's a page about our new products</meta-description>
  <content>&lt;p&gt;content of my page&lt;p&gt;</content>
</page>

Delete page

Endpoint

DELETE /admin/pages/:page_id.xml

Request

Route

DELETE /admin/pages/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==
Content-Type: application/x-www-form-urlencoded

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml

Get page

Endpoint

GET /admin/pages/:page_id.xml

Request

Route

GET /admin/pages/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <id type="integer">1</id>
  <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
  <updated-at type="timestamp">2009-03-18 10:55:15 +0300</updated-at>
  <custom-template nil="true"/>
  <title>any_url</title>
  <permalink>страница</permalink>
  <html-title>html title</html-title>
  <meta-keywords>meta keywords</meta-keywords>
  <is-main type="boolean">true</is-main>
  <meta-description>meta description</meta-description>
  <content>abc</content>
</page>

Get pages list

Endpoint

GET /admin/pages.xml

Request

Route

GET /admin/pages.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Response

Simulated Response

Status

200

Headers

API-Usage-Limit: 1/500
Content-Type: application/xml; charset=utf-8

Body

<?xml version="1.0" encoding="UTF-8"?>
<pages type="array">
  <page>
    <id type="integer">1</id>
    <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
    <updated-at type="timestamp">2009-03-18 10:55:15 +0300</updated-at>
    <custom-template nil="true"/>
    <title>any_url</title>
    <permalink>страница</permalink>
    <html-title>html title</html-title>
    <meta-keywords>meta keywords</meta-keywords>
    <is-main type="boolean">true</is-main>
    <meta-description>meta description</meta-description>
    <content>abc</content>
  </page>
  <page>
    <id type="integer">3</id>
    <created-at type="timestamp">2025-02-11 00:56:44 +0300</created-at>
    <updated-at type="timestamp">2009-03-17 10:55:15 +0300</updated-at>
    <custom-template nil="true"/>
    <title>bany_url</title>
    <permalink>страница2</permalink>
    <html-title>html title</html-title>
    <meta-keywords>meta keywords</meta-keywords>
    <is-main type="boolean">false</is-main>
    <meta-description>meta description</meta-description>
    <content>abc</content>
  </page>
</pages>

Update page

Endpoint

PUT /admin/pages/:page_id.xml

Parameters

Name Description
page[title] page title
page[content] page content
page[permalink] permalink on blog/*
page[html_title] html title tag content
page[meta_keywords] html meta words on page
page[meta_description]