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">6</max-count>
  <min-count type="integer">4</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">4</min-count>
  <max-count type="integer">6</max-count>
  <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:46+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">6</min-count>
  <max-count type="integer">8</max-count>
  <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:47+03:00</updated-at>
  <back-office-name>Грубый Стальной Ремень</back-office-name>
  <permalink>sed_mollitia</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">4</min-count>
    <max-count type="integer">9</max-count>
    <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
    <back-office-name>Аэродинамический Медный Берет</back-office-name>
    <permalink>dolores_quis</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">2</min-count>
    <max-count type="integer">3</max-count>
    <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
    <back-office-name>Удовлетворительный Медный Скамья</back-office-name>
    <permalink>quis_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">4</min-count>
    <max-count type="integer">4</max-count>
    <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
    <back-office-name>Лоснящийся Хлопковый Ремень</back-office-name>
    <permalink>delectus_minus</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">3</min-count>
    <max-count type="integer">3</max-count>
    <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
    <back-office-name>Невероятный Хлопковый Ботинок</back-office-name>
    <permalink>quibusdam_rerum</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">3</min-count>
    <max-count type="integer">4</max-count>
    <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
    <back-office-name>Синергетический Алюминиевый Ботинок</back-office-name>
    <permalink>non_et</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">4</min-count>
    <max-count type="integer">5</max-count>
    <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
    <back-office-name>Синергетический Железный Нож</back-office-name>
    <permalink>fugit_sapiente</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">5</min-count>
  <max-count type="integer">10</max-count>
  <created-at type="dateTime">2024-11-21T00:56:46+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:46+03:00</updated-at>
  <back-office-name>Аэродинамический Бронзовый Бумажник</back-office-name>
  <permalink>cum_quo</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">4</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">4</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">2024-11-21T00:56:46+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:46+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">2024-11-21T00:56:47+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56: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">3.38</price>
  <accounting-variant-id type="integer" nil="true"/>
  <created-at type="dateTime">2024-11-21T00:56:48+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:48+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">3.7</price>
  <accounting-variant-id type="integer" nil="true"/>
  <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:47+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.24</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">2.47</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">7.73</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">5.68</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">7.35</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">8.52</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">4.49</price>
    <accounting-variant-id type="integer" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:56:47+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:47+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">2024-11-21T00:56:47+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56: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">2024-11-16 00:56:13 +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">2024-11-21T00:56:15+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:15+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">2024-11-21T00:56:15+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:15+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">2024-11-21T00:56:15+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:15+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">2024-11-21T00:56:14+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:14+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">2024-11-21T00:56:16+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">2024-11-21T00:56:16+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">2024-11-21T00:56:16+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">2024-11-21T00:56:16+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[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>
  <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">2024-11-21 00:57:19 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:19 +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">2024-11-21 00:57:19 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/articles/1/2/2/no_image_compact.jpg?1732139839</original-url>
  </image>
  <tags type="array">
    <tag>
      <title>test3</title>
    </tag>
    <tag>
      <title>test4</title>
    </tag>
  </tags>
  <related-products type="array"/>
  <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">2024-11-21 00:55:56 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:18 +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">2024-11-21 00:55:56 +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">2024-11-21 00:55:57 +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-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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:57:18 +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">2024-11-21 00:55:56 +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">2024-11-21 00:55:57 +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-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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:20 +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">2024-11-21 00:57:20 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/articles/1/4/4/no_image_compact.jpg?1732139840</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">2024-11-21 00:55:57 +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-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">2024-11-21T00:56:29+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:29+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">2024-11-21T00:56:28+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:28+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">2024-11-21T00:56:28+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:28+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">2024-11-21T00:56:29+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:29+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">2024-11-21T00:56:29+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:29+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">2024-11-21T00:56:29+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:29+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">2024-11-21 00:56:51 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:51 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:55:56 +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">2024-11-21 00:55:56 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:51 +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">2024-11-21 00:56:30 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:30 +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">2024-11-21T00:56:30+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:30+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">2024-11-21 00:56:31 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:31 +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">2024-11-21T00:56:31+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:31+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">2024-11-21 00:56:30 +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">2024-11-21T00:56:30+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:30+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">2024-11-21 00:56:30 +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">2024-11-21T00:56:30+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:30+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">2024-11-21 00:56:31 +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">2024-11-21T00:56:31+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:31+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">2024-11-21T00:56:29+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:29+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-08-13T00:55:55+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:55:56+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-08-13T00:55:55+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:55:56+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">2024-11-21 00:56:54 +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">2024-11-21 00:56:50 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56: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">2024-11-21 00:56:50 +0300</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/collections/1/1/1/image.jpg?1732139809</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-08-13 00:55:55 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:55:57 +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-08-13 00:55:55 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56: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">2024-11-21T00:56:32+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:32+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">2024-11-21T00:56:31+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:31+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">2024-11-21 00:56:22 +0300</updated-at>
  <created-at type="timestamp">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +0300</updated-at>
  <created-at type="timestamp">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +0300</updated-at>
  <created-at type="timestamp">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:22 +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">2024-11-21 00:56:23 +0300</updated-at>
  <created-at type="timestamp">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21T00:56:23+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:23+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">2024-11-21T00:56:23+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">2024-11-21 00:56:23 +0300</updated-at>
  <created-at type="timestamp">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-21 00:55:57 +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">2024-11-21 00:55:57 +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">2024-11-21 00:55:57 +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">2024-11-21 00:56:23 +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">2024-11-21 00:56:23 +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">2024-11-28</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">2024-11-28</expired-at>
  <type-id type="integer">1</type-id>
  <discount type="decimal">10.0</discount>
  <description>Birthday discount</description>
  <created-at type="dateTime">2024-11-21T00:56:32+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:32+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">2024-11-21 00:56:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:24 +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">2024-11-21 00:56:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:24 +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">2024-11-21 00:56:24 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:56:24 +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">2024-11-21 00:56:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:24 +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">2024-11-21 00:56:33 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:33 +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">2024-11-21 00:56:33 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:33 +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">2024-11-21 00:56:33 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:56:33 +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">2024-11-21 00:56:33 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:33 +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">2024-11-21T00:56:25+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:25+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">2024-11-21T00:56:26+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:26+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">2024-11-21T00:55:57+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:55:57+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">2024-11-21T00:55:57+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:55:57+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">2024-11-21T00:56:25+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">2024-11-21T00:56:26+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">2024-11-21T00:57:23+03:00</created-at>
  <absolute-url>http://minio.insales.io:9000/insales-test-sber/files/1/4/4/original/some_file.?1732139843</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">2024-11-21T00:57:23+03:00</created-at>
  <absolute-url>http://minio.insales.io:9000/insales-test-sber/files/1/2/2/original/no_image_compact.jpg?1732139843</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">2024-11-21 00:56:55 +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">2024-11-21 00:56:55 +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">2024-11-21 00:56:55 +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">2024-11-21 00:56:55 +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">2024-11-21 00:57:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:24 +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">2024-11-21 00:57:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:24 +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">2024-11-21 00:57:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:24 +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">2024-11-21 00:57:24 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:57:24 +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">2024-11-21 00:57:24 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:24 +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>2024-11-21T00:57:17.247+03:00</created-at>
  <updated-at>2024-11-21T00:57:17.247+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>2024-11-21T00:57:17.807+03:00</created-at>
  <updated-at>2024-11-21T00:57:17.807+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/15.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>
  <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>2024-11-21T00:57:17.044+03:00</created-at>
  <updated-at>2024-11-21T00:57:17.044+03:00</updated-at>
  <url>https://quentin.insales.io:3002/marketplace/7.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">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>2024-11-21T00:57:16.383+03:00</created-at>
  <updated-at>2024-11-21T00:57:16.383+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>2024-11-21T00:57:16.163+03:00</created-at>
    <updated-at>2024-11-21T00:57:16.163+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>2024-11-21T00:57:16.187+03:00</created-at>
    <updated-at>2024-11-21T00:57:16.187+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>
  <name>New GM</name>
  <id type="integer">13</id>
  <type>Marketplace::GoogleMerchant</type>
  <created-at>2024-11-21T00:57:17.572+03:00</created-at>
  <updated-at>2024-11-21T00:57:17.618+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>
  <name>New LYM</name>
  <id type="integer">17</id>
  <type>Marketplace::LiquidYandexMarket</type>
  <created-at>2024-11-21T00:57:17.983+03:00</created-at>
  <updated-at>2024-11-21T00:57:18.038+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>
  <name>New YM</name>
  <id type="integer">11</id>
  <type>Marketplace::ModelYandexMarket</type>
  <created-at>2024-11-21T00:57:17.360+03:00</created-at>
  <updated-at>2024-11-21T00:57:17.432+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?1732139817</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

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">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">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>

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?1732139817</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">2024-11-21 00:56:40 +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">2024-11-21T00:56:39+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21T00:56:39+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21 00:56:40 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:40 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:40 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:39 +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">2024-11-21T00:56:39+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21 00:56:39 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:39 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:40 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:39 +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">2024-11-21T00:56:38+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56: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>+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">2024-11-21T00:56:38+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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>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">2024-11-21 00:56: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">59</id>
        <field-id type="integer">234</field-id>
        <value>old value</value>
        <created-at type="dateTime">2024-11-21T00:56:38+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">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">2024-11-21 00:56:39 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:39 +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">2024-11-21 00:56: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">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">2024-11-21T00:56:38+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56: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>+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">2024-11-21T00:56:38+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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>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">2024-11-21 00:56: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">56</id>
        <field-id type="integer">231</field-id>
        <value>old value</value>
        <created-at type="dateTime">2024-11-21T00:56:38+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">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">2024-11-21 00:56:38 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:38 +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">2024-11-21 00:56:36 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56: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">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">2024-11-21 00:56:36 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:36 +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">2024-11-21 00:56:36 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:56: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>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">2024-11-21 00:56:36 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56: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">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">2024-11-21 00:56:36 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:36 +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">2024-11-21 00:56:36 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:36 +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">2024-11-21 00:56:36 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56: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">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">2024-11-21 00:56:36 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:36 +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">2024-11-21 00:56:36 +0300</created-at>
    <updated-at type="timestamp">2024-11-21 00:56: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>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">2024-11-21 00:56:36 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:36 +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">2024-11-21 00:56:36 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:36 +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">2024-11-21 00:56:33 +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">2024-11-21T00:56:33+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56: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>+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">2024-11-21T00:56:33+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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"/>
  <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">2024-11-21 00:56: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>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">2024-11-21T00:56:33+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">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">2024-11-21T00:55:57+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:55:57+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">2024-11-21T00:55:57+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:55:57+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">2024-11-21 00:56: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">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">2024-11-21T00:56:34+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">30</id>
          <field-id type="integer">205</field-id>
          <value>old value</value>
          <created-at type="dateTime">2024-11-21T00:56:34+03:00</created-at>
          <updated-at type="dateTime">2024-11-21T00:56: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">2024-11-21 00:56: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">29</id>
          <field-id type="integer">204</field-id>
          <value>old value</value>
          <created-at type="dateTime">2024-11-21T00:56:34+03:00</created-at>
          <updated-at type="dateTime">2024-11-21T00:56: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>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">2024-11-21 00:56:40 +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">2024-11-21T00:56:40+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:40+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">2024-11-21T00:56:40+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:40+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">2024-11-21 00:56:40 +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">2024-11-21T00:56:40+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:40+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">2024-11-21 00:56:40 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:40 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:40 +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">2024-11-21 00:56:39 +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">2024-11-21T00:56:39+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21T00:56:39+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21 00:56:39 +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">2024-11-21T00:56:39+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21 00:56:39 +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">2024-11-21 00:56: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">2024-11-21 00:56:38 +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">2024-11-21T00:56:37+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56: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">54</id>
        <field-id type="integer">229</field-id>
        <value>old value</value>
        <created-at type="dateTime">2024-11-21T00:56:37+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">2024-11-21 00:56: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">53</id>
        <field-id type="integer">228</field-id>
        <value>old value</value>
        <created-at type="dateTime">2024-11-21T00:56:37+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">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">2024-11-21 00:56:41 +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">2024-11-21T00:56:40+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:40+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">2024-11-21T00:56:40+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:40+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">2024-11-21 00:56:41 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:41 +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">2024-11-21 00:56:40 +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">2024-11-21T00:56:40+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:40+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">2024-11-21 00:56:41 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:41 +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">2024-11-21 00:56:41 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:41 +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">2024-11-21 00:56:41 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:41 +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>4e815111063fc613fe57</marking-code>
        <marking-code>f29410f30f260b195c74</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">2024-11-21 00:56:39 +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">2024-11-21T00:56:39+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21T00:56:39+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21 00:56:39 +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">2024-11-21T00:56:39+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:39+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">2024-11-21 00:56:39 +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">NGU4MTUxMTEwNjNmYzYxM2ZlNTc=</marking-code>
        <marking-code type="base64Binary">ZjI5NDEwZjMwZjI2MGIxOTVjNzQ=</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">2024-11-21 00:56:39 +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">2024-11-21 00:56:37 +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">2024-11-21 00:56:37 +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">1500.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">2024-11-21T00:56:37+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56: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>+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">2024-11-21T00:56:37+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">7</id>
      <discount type="decimal">20.0</discount>
      <type-id type="integer">1</type-id>
      <created-at type="timestamp">2024-11-21 00:56:37 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:56:37 +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">2024-11-21 00:56: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>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">2024-11-21T00:56:37+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56: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">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">2024-11-21 00:56:37 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:37 +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">1500.0</items-price>
  <total-price type="decimal">1500.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">2024-11-21 00:56:41 +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">2024-11-21T00:56:41+03:00</created-at>
      <updated-at type="dateTime">2024-11-21T00:56:41+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">2024-11-21T00:56:41+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:41+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">2024-11-21 00:56:41 +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">2024-11-21T00:56:41+03:00</created-at>
        <updated-at type="dateTime">2024-11-21T00:56:41+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">2024-11-21T00:56:26+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:26+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">2024-11-21T00:56:26+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:26+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">2024-11-21T00:56:26+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:56:26+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">2024-11-21T00:56:26+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:26+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">2024-11-21 00:57:26 +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">2024-11-21 00:55:57 +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">2024-11-21 00:55:57 +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">2024-11-21 00:55:57 +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] html meta description
page[created_at] publication date

Request

Route

PUT /admin/pages/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <title>new title</title>
</page>

Response

Simulated Response

Status

200

Headers

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

PaymentGateway

Create Cod or Custom payment_gateway

Endpoint

POST /admin/payment_gateways.xml

Parameters

Name Description
payment_gateway[title] required title
payment_gateway[margin] margin measured in percentage and applied to order price with current payment method; it should fall in the range from -100 to 1000
payment_gateway[position] position in payment gateways list
payment_gateway[type] required available types: PaymentGateway::Cod, PaymentGateway::Custom
payment_gateway[description] description
payment_gateway[payment_delivery_variants_attributes] array of available delivery variants for this payment gateway; payment gateway is unavailable if list is empty
payment_gateway[payment_delivery_variants_attributes][delivery_variant_id] id of delivery variant
payment_gateway[add_delivery_variants] set all delivery variants available for this payment gateway

Request

Route

POST /admin/payment_gateways.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<payment-gateway>
  <title>cash on delivery</title>
  <margin type="integer">10</margin>
  <type>PaymentGateway::Cod</type>
  <description>text</description>
  <payment-delivery-variants-attributes type="array">
    <payment-delivery-variants-attribute>
      <delivery-variant-id type="integer">1</delivery-variant-id>
    </payment-delivery-variants-attribute>
  </payment-delivery-variants-attributes>
</payment-gateway>

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"?>
<cod>
  <id type="integer">34</id>
  <position type="integer">4</position>
  <type>PaymentGateway::Cod</type>
  <created-at type="timestamp">2024-11-21 00:56:27 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:27 +0300</updated-at>
  <margin type="decimal">10.0</margin>
  <available-for-individual-clients type="boolean">true</available-for-individual-clients>
  <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
  <title>cash on delivery</title>
  <description>text</description>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">57</id>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <created-at type="timestamp">2024-11-21 00:56:27 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
</cod>

Create External payment_gateway

Endpoint

POST /admin/payment_gateways.xml

Parameters

Name Description
payment_gateway[title] required title
payment_gateway[margin] margin measured in percentage and added to order price with current payment method; it should fall in the range from -100 to 1000
payment_gateway[position] position in payment gateways list
payment_gateway[type] required PaymentGateway::External
payment_gateway[description] description
payment_gateway[payment_delivery_variants_attributes] array of available delivery variants for this payment gateway; payment gateway is unavailable if list is empty
payment_gateway[payment_delivery_variants_attributes][delivery_variant_id] id of delivery variant
payment_gateway[url] required url of external payment gateway
payment_gateway[shop_id] required shop id - store identificator for external systems
payment_gateway[send_order] set true to send order_lines information to the "url"; parameter name - "order_json"; do not forget add "order_json" to signature validation to the end of the string.
payment_gateway[add_delivery_variants] set all delivery variants available for this payment gateway
payment_gateway[redirect_to_payment] true by default; if true automatically redirect to payment after successful order creation;
payment_gateway[convert_currency] iso code, if you would like to convert order amount from site currency to another currency

Request

Route

POST /admin/payment_gateways.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<payment-gateway>
  <title>external payment gateway</title>
  <margin type="integer">10</margin>
  <type>PaymentGateway::External</type>
  <description>text</description>
  <payment-delivery-variants-attributes type="array">
    <payment-delivery-variants-attribute>
      <delivery-variant-id type="integer">1</delivery-variant-id>
    </payment-delivery-variants-attribute>
  </payment-delivery-variants-attributes>
  <url>payment-gateway.ru/transactions/create</url>
  <shop-id>123</shop-id>
  <redirect-to-payment type="boolean">false</redirect-to-payment>
  <convert-currency>LVL</convert-currency>
</payment-gateway>

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">36</id>
  <position type="integer">4</position>
  <type>PaymentGateway::External</type>
  <created-at type="timestamp">2024-11-21 00:56:27 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:27 +0300</updated-at>
  <margin type="decimal">10.0</margin>
  <available-for-individual-clients type="boolean">true</available-for-individual-clients>
  <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
  <title>external payment gateway</title>
  <description>text</description>
  <password>2c5cf39a53c07dde</password>
  <url>payment-gateway.ru/transactions/create</url>
  <shop-id>123</shop-id>
  <send-order nil="true"/>
  <convert-currency>LVL</convert-currency>
  <widget-mode nil="true"/>
  <window-mode nil="true"/>
  <widget-html-code nil="true"/>
  <success-url>http://quentin.insales.io:3002/payments/external/36/success</success-url>
  <fail-url>http://quentin.insales.io:3002/payments/external/36/fail</fail-url>
  <server-url>http://quentin.insales.io:3002/payments/external/36/server</server-url>
  <redirect-to-payment type="boolean">false</redirect-to-payment>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">59</id>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <created-at type="timestamp">2024-11-21 00:56:27 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
</external>

Destroy payment_gateway

Endpoint

DELETE /admin/payment_gateways/:payment_gateway_id_1.xml

Request

Route

DELETE /admin/payment_gateways/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 payment_gateway

Endpoint

GET /admin/payment_gateways/:payment_gateway_id_1.xml

Request

Route

GET /admin/payment_gateways/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"?>
<cod>
  <id type="integer">1</id>
  <position type="integer">1</position>
  <type>PaymentGateway::Cod</type>
  <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>
  <margin type="decimal">0.0</margin>
  <available-for-individual-clients type="boolean">true</available-for-individual-clients>
  <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
  <title>Наличными курьеру</title>
  <description></description>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">1</id>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">2</id>
      <delivery-variant-id type="integer">2</delivery-variant-id>
      <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
</cod>

Get payment_gateways

Endpoint

GET /admin/payment_gateways.xml

Request

Route

GET /admin/payment_gateways.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>
    <position type="integer">1</position>
    <type>PaymentGateway::Cod</type>
    <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>
    <margin type="decimal">0.0</margin>
    <available-for-individual-clients type="boolean">true</available-for-individual-clients>
    <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
    <title>Наличными курьеру</title>
    <description></description>
    <payment-delivery-variants type="array">
      <payment-delivery-variant>
        <id type="integer">1</id>
        <delivery-variant-id type="integer">1</delivery-variant-id>
        <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
      </payment-delivery-variant>
      <payment-delivery-variant>
        <id type="integer">2</id>
        <delivery-variant-id type="integer">2</delivery-variant-id>
        <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
      </payment-delivery-variant>
    </payment-delivery-variants>
  </object>
  <object>
    <id type="integer">3</id>
    <position type="integer">2</position>
    <type>PaymentGateway::JuridicalPersonBill</type>
    <created-at type="timestamp">2009-03-17 10:55:14 +0300</created-at>
    <updated-at type="timestamp">2009-03-17 10:55:15 +0300</updated-at>
    <margin type="decimal">20.0</margin>
    <available-for-individual-clients type="boolean">true</available-for-individual-clients>
    <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
    <title>Выставление счета для юр. лиц.</title>
    <description></description>
    <redirect-to-payment type="boolean">true</redirect-to-payment>
    <payment-delivery-variants type="array"/>
  </object>
  <object>
    <id type="integer">4</id>
    <position type="integer">3</position>
    <type>PaymentGateway::JuridicalPersonBill</type>
    <created-at type="timestamp">2009-03-17 10:55:14 +0300</created-at>
    <updated-at type="timestamp">2009-03-17 10:55:15 +0300</updated-at>
    <margin type="decimal">0.0</margin>
    <available-for-individual-clients type="boolean">true</available-for-individual-clients>
    <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
    <title>Выставление счета для юр. лиц 2.</title>
    <description></description>
    <redirect-to-payment type="boolean">true</redirect-to-payment>
    <payment-delivery-variants type="array"/>
  </object>
</objects>

Update payment_gateway

Endpoint

PUT /admin/payment_gateways/:payment_gateway_id_1.xml

Parameters

Name Description
payment_gateway[title] title
payment_gateway[margin] margin measured in percentage and added to order price with current payment method; it should fall in the range from -100 to 1000
payment_gateway[position] position in payment gateways list
payment_gateway[description] description
payment_gateway[payment_delivery_variants_attributes] array of available delivery variants for this payment gateway. payment gateway is unavailable if list is empty
payment_gateway[payment_delivery_variants_attributes][_destroy] set it 1 to delete delivery variant for this payment gateway
delivery_variant[payment_delivery_variants_attributes][id] only for removal: specify id of payment gateway and delivery variant binding you want to delete
delivery_variant[payment_delivery_variants_attributes][delivery_variant_id] for creation: specify id of delivery variant you want to bind with this payment gateway

Request

Route

PUT /admin/payment_gateways/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<payment-gateway>
  <title>cash</title>
  <margin type="integer">10</margin>
  <description>description</description>
  <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>
      <delivery-variant-id type="integer">2</delivery-variant-id>
    </payment-delivery-variants-attribute>
  </payment-delivery-variants-attributes>
</payment-gateway>

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"?>
<cod>
  <margin type="decimal">10.0</margin>
  <id type="integer">1</id>
  <position type="integer">1</position>
  <type>PaymentGateway::Cod</type>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <updated-at type="timestamp">2024-11-21 00:56:27 +0300</updated-at>
  <available-for-individual-clients type="boolean">true</available-for-individual-clients>
  <available-for-juridical-clients type="boolean">true</available-for-juridical-clients>
  <title>cash</title>
  <description>description</description>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <id type="integer">1</id>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <id type="integer">2</id>
      <delivery-variant-id type="integer">2</delivery-variant-id>
      <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    </payment-delivery-variant>
  </payment-delivery-variants>
</cod>

PriceKind

Create price kind

Endpoint

POST /admin/price_kinds.xml

Parameters

Name Description
price_kind[title] required title
price_kind[show_in_lists] show price in products list in back-office

Request

Route

POST /admin/price_kinds.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-kind>
  <title>large quantity price</title>
</price-kind>

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-kind>
  <id type="integer">174</id>
  <price-index type="integer">2</price-index>
  <title>large quantity price</title>
  <show-in-lists type="boolean">true</show-in-lists>
  <variant-price-method-name>price3</variant-price-method-name>
</price-kind>

Destroy price kind

Endpoint

DELETE /admin/price_kinds/:price_kind_id.xml

Request

Route

DELETE /admin/price_kinds/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 price kind

Endpoint

GET /admin/price_kinds/:price_kind_id.xml

Request

Route

GET /admin/price_kinds/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"?>
<price-kind>
  <id type="integer">1</id>
  <price-index type="integer">1</price-index>
  <title>от 100</title>
  <show-in-lists type="boolean">true</show-in-lists>
  <variant-price-method-name>price2</variant-price-method-name>
</price-kind>

Get price kinds

Endpoint

GET /admin/price_kinds.xml

Request

Route

GET /admin/price_kinds.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-kinds type="array">
  <price-kind>
    <id type="integer">1</id>
    <price-index type="integer">1</price-index>
    <title>от 100</title>
    <show-in-lists type="boolean">true</show-in-lists>
    <variant-price-method-name>price2</variant-price-method-name>
  </price-kind>
</price-kinds>

Update price kind

Endpoint

PUT /admin/price_kinds/:price_kind_id.xml

Parameters

Name Description
price_kind[title] required title
price_kind[show_in_lists] show price in products list in back-office

Request

Route

PUT /admin/price_kinds/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-kind>
  <title>price for 10+ quantity</title>
</price-kind>

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-kind>
  <title>price for 10+ quantity</title>
  <id type="integer">1</id>
  <price-index type="integer">1</price-index>
  <show-in-lists type="boolean">true</show-in-lists>
  <variant-price-method-name>price2</variant-price-method-name>
</price-kind>

Product

Create bundle

Endpoint

POST /admin/products.xml

Parameters

Name Description
product[category_id] required category id
product[title] required title
product[description] description
product[short_description] short description
product[sort_weight] sort weight
product[bundle] required bundle
product[variants_attributes] required variants attributes
product[vat] do not set VAT for bundle because order lines will be created with its components, which have their own VAT
product[product_bundle_components_attributes] required product bundle components attributes

Request

Route

POST /admin/products.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <category-id type="integer">1</category-id>
  <title>Van Gogh Ruled Peach Notebook</title>
  <bundle type="boolean">true</bundle>
  <variants-attributes type="array">
    <variants-attribute>
      <price type="integer">100</price>
    </variants-attribute>
  </variants-attributes>
  <product-bundle-components-attributes type="array">
    <product-bundle-components-attribute>
      <variant-id type="integer">1</variant-id>
      <quantity type="integer">2</quantity>
      <free type="boolean">false</free>
    </product-bundle-components-attribute>
  </product-bundle-components-attributes>
</product>

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"?>
<product>
  <id type="integer">293977290</id>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2024-11-21 00:57:03 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:03 +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" nil="true"/>
  <custom-template nil="true"/>
  <unit>pce</unit>
  <sort-weight type="float" nil="true"/>
  <bundle type="boolean">true</bundle>
  <ignore-discounts type="boolean" nil="true"/>
  <vat type="integer">10</vat>
  <dimensions nil="true"/>
  <fiscal-product-type type="integer">1</fiscal-product-type>
  <title>Van Gogh Ruled Peach Notebook</title>
  <short-description nil="true"/>
  <permalink>van-gogh-ruled-peach-notebook</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <currency-code>LVL</currency-code>
  <collections-ids type="array"/>
  <sales-channels-id nil="true"/>
  <images type="array"/>
  <video-links type="array"/>
  <option-names type="array"/>
  <properties type="array"/>
  <characteristics type="array"/>
  <product-field-values type="array"/>
  <variants type="array">
    <variant>
      <variant-field-values type="array"/>
      <option-values type="array"/>
      <id type="integer">509944658</id>
      <title></title>
      <product-id type="integer">293977290</product-id>
      <sku nil="true"/>
      <barcode nil="true"/>
      <dimensions nil="true"/>
      <available type="boolean">false</available>
      <image-ids type="array"/>
      <image-id type="integer" nil="true"/>
      <weight type="decimal" nil="true"/>
      <created-at type="timestamp">2024-11-21 00:57:03 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:57:03 +0300</updated-at>
      <quantity type="integer">0</quantity>
      <cost-price type="decimal" nil="true"/>
      <cost-price-in-site-currency type="decimal" nil="true"/>
      <price-in-site-currency type="decimal">3000.0</price-in-site-currency>
      <base-price type="decimal">100.0</base-price>
      <old-price type="decimal" nil="true"/>
      <price2 type="decimal" nil="true"/>
      <price type="decimal">100.0</price>
      <base-price-in-site-currency type="decimal">3000.0</base-price-in-site-currency>
      <old-price-in-site-currency type="decimal" nil="true"/>
      <price2-in-site-currency type="decimal" nil="true"/>
      <prices type="array"/>
      <prices-in-site-currency type="array"/>
    </variant>
  </variants>
  <product-bundle-components type="array">
    <product-bundle-component>
      <id type="integer">1058167307</id>
      <variant-id type="integer">1</variant-id>
      <free type="boolean">false</free>
      <quantity type="decimal">2.0</quantity>
      <discount-amount type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discount-type type="integer">0</discount-type>
    </product-bundle-component>
  </product-bundle-components>
  <description nil="true"/>
</product>

Create product

Endpoint

POST /admin/products.xml

Parameters

Name Description
product[category_id] required category id
product[title] required title
product[description] description
product[short_description] short description
product[variants_attributes] required variants attributes
product[sort_weight] sort weight
product[ignore_discounts] set to 1 to make this product ignore discounts
product[vat] integer, default value is set in account settings, if default in account set as 'No VAT' you cannot change VAT of products through API; possible values depend on country, set to -1 if this product is not a subject to VAT
product[product_field_values_attributes] product field values attributes

Request

Route

POST /admin/products.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <category-id type="integer">1</category-id>
  <title>Van Gogh Ruled Peach Notebook</title>
  <variants-attributes type="array">
    <variants-attribute>
      <sku>QP021MVEN-r</sku>
      <quantity type="integer">1</quantity>
      <price type="integer">740</price>
    </variants-attribute>
  </variants-attributes>
  <ignore-discounts type="integer">1</ignore-discounts>
  <vat type="integer">-1</vat>
  <product-field-values-attributes type="array">
    <product-field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </product-field-values-attribute>
  </product-field-values-attributes>
</product>

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"?>
<product>
  <id type="integer">293977288</id>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2024-11-21 00:57:03 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:03 +0300</updated-at>
  <is-hidden type="boolean">false</is-hidden>
  <available type="boolean">true</available>
  <archived type="boolean">false</archived>
  <canonical-url-collection-id type="integer" nil="true"/>
  <custom-template nil="true"/>
  <unit>pce</unit>
  <sort-weight type="float" nil="true"/>
  <bundle type="boolean" nil="true"/>
  <ignore-discounts type="boolean">true</ignore-discounts>
  <vat type="integer">-1</vat>
  <dimensions nil="true"/>
  <fiscal-product-type type="integer">1</fiscal-product-type>
  <title>Van Gogh Ruled Peach Notebook</title>
  <short-description nil="true"/>
  <permalink>van-gogh-ruled-peach-notebook</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <currency-code>LVL</currency-code>
  <collections-ids type="array"/>
  <sales-channels-id nil="true"/>
  <images type="array"/>
  <video-links type="array"/>
  <option-names type="array"/>
  <properties type="array"/>
  <characteristics type="array"/>
  <product-field-values type="array">
    <product-field-value>
      <id type="integer">8</id>
      <product-field-id type="integer">1</product-field-id>
      <value>12345</value>
    </product-field-value>
  </product-field-values>
  <variants type="array">
    <variant>
      <variant-field-values type="array"/>
      <option-values type="array"/>
      <id type="integer">509944656</id>
      <title></title>
      <product-id type="integer">293977288</product-id>
      <sku>QP021MVEN-r</sku>
      <barcode nil="true"/>
      <dimensions nil="true"/>
      <available type="boolean">true</available>
      <image-ids type="array"/>
      <image-id type="integer" nil="true"/>
      <weight type="decimal" nil="true"/>
      <created-at type="timestamp">2024-11-21 00:57:03 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:57:03 +0300</updated-at>
      <quantity type="integer">1</quantity>
      <cost-price type="decimal" nil="true"/>
      <cost-price-in-site-currency type="decimal" nil="true"/>
      <price-in-site-currency type="decimal">22200.0</price-in-site-currency>
      <base-price type="decimal">740.0</base-price>
      <old-price type="decimal" nil="true"/>
      <price2 type="decimal" nil="true"/>
      <price type="decimal">740.0</price>
      <base-price-in-site-currency type="decimal">22200.0</base-price-in-site-currency>
      <old-price-in-site-currency type="decimal" nil="true"/>
      <price2-in-site-currency type="decimal" nil="true"/>
      <prices type="array"/>
      <prices-in-site-currency type="array"/>
    </variant>
  </variants>
  <product-bundle-components type="array"/>
  <description nil="true"/>
</product>

Destroy product

Endpoint

DELETE /admin/products/:product_id.xml

Request

Route

DELETE /admin/products/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 product

Endpoint

GET /admin/products/:product_id.xml

Request

Route

GET /admin/products/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"?>
<product>
  <id type="integer">1</id>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2024-11-21 00:55:57 +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-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>
</product>

Get products count

Endpoint

GET /admin/products/count.xml

Request

Route

GET /admin/products/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"?>
<hash>
  <count type="integer">5</count>
</hash>

Get products

Endpoint

GET /admin/products.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.
with_deleted Set to true to get also deleted products.
deleted Set to true to get only deleted products.
variant_fields List of required fields separated with `,`. Possible values are: id,title,product_id,sku,barcode,dimensions,available.

Request

Route

GET /admin/products.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"?>
<products type="array">
  <product>
    <id type="integer">5</id>
    <category-id type="integer">3</category-id>
    <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    <updated-at type="timestamp">2015-07-26 23:59:59 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <available type="boolean">true</available>
    <archived type="boolean">false</archived>
    <canonical-url-collection-id type="integer" nil="true"/>
    <custom-template nil="true"/>
    <unit>pce</unit>
    <sort-weight type="float" nil="true"/>
    <bundle type="boolean">true</bundle>
    <ignore-discounts type="boolean" nil="true"/>
    <vat type="integer">20</vat>
    <dimensions nil="true"/>
    <fiscal-product-type type="integer">1</fiscal-product-type>
    <title>shirt &amp; pants</title>
    <short-description nil="true"/>
    <permalink>shirt_and_pants</permalink>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <currency-code>LVL</currency-code>
    <collections-ids type="array"/>
    <sales-channels-id nil="true"/>
    <images type="array"/>
    <video-links type="array"/>
    <option-names type="array"/>
    <properties type="array"/>
    <characteristics type="array"/>
    <product-field-values type="array"/>
    <variants type="array">
      <variant>
        <variant-field-values type="array"/>
        <option-values type="array"/>
        <id type="integer">5</id>
        <title></title>
        <product-id type="integer">5</product-id>
        <sku>427</sku>
        <barcode nil="true"/>
        <dimensions nil="true"/>
        <available type="boolean">true</available>
        <image-ids type="array"/>
        <image-id type="integer" nil="true"/>
        <weight type="decimal">0.3</weight>
        <created-at type="timestamp">2009-03-18 12:58:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 13:53:14 +0300</updated-at>
        <quantity type="integer" nil="true"/>
        <cost-price type="decimal" nil="true"/>
        <cost-price-in-site-currency type="decimal" nil="true"/>
        <price-in-site-currency type="decimal">750.0</price-in-site-currency>
        <base-price type="decimal">25.0</base-price>
        <old-price type="decimal" nil="true"/>
        <price2 type="decimal" nil="true"/>
        <price type="decimal">25.0</price>
        <base-price-in-site-currency type="decimal">750.0</base-price-in-site-currency>
        <old-price-in-site-currency type="decimal" nil="true"/>
        <price2-in-site-currency type="decimal" nil="true"/>
        <prices type="array"/>
        <prices-in-site-currency type="array"/>
      </variant>
    </variants>
    <product-bundle-components type="array">
      <product-bundle-component>
        <id type="integer">361433619</id>
        <variant-id type="integer">2</variant-id>
        <free type="boolean">false</free>
        <quantity type="decimal">1.0</quantity>
        <discount-amount type="decimal" nil="true"/>
        <product-id type="integer">2</product-id>
        <discount-type type="integer" nil="true"/>
      </product-bundle-component>
      <product-bundle-component>
        <id type="integer">620730336</id>
        <variant-id type="integer">3</variant-id>
        <free type="boolean">false</free>
        <quantity type="decimal">1.0</quantity>
        <discount-amount type="decimal" nil="true"/>
        <product-id type="integer">3</product-id>
        <discount-type type="integer" nil="true"/>
      </product-bundle-component>
    </product-bundle-components>
    <description nil="true"/>
  </product>
  <product>
    <id type="integer">2</id>
    <category-id type="integer">1</category-id>
    <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    <updated-at type="timestamp">2015-07-27 00:00:00 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <available type="boolean">true</available>
    <archived type="boolean">false</archived>
    <canonical-url-collection-id type="integer" nil="true"/>
    <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 nil="true"/>
    <fiscal-product-type type="integer">1</fiscal-product-type>
    <title>shirt</title>
    <short-description nil="true"/>
    <permalink>shirt</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">8</collections-id>
    </collections-ids>
    <sales-channels-id nil="true"/>
    <images type="array">
      <image>
        <id type="integer">1</id>
        <product-id type="integer">2</product-id>
        <position type="integer">1</position>
        <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
        <image-processing type="boolean" nil="true"/>
        <external-id nil="true"/>
        <title nil="true"/>
        <url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/thumb_image_1.jpg</url>
        <original-url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/image_1.jpg</original-url>
        <medium-url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/medium_image_1.jpg</medium-url>
        <small-url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/micro_image_1.jpg</small-url>
        <thumb-url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/thumb_image_1.jpg</thumb-url>
        <compact-url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/compact_image_1.jpg</compact-url>
        <large-url>http://minio.insales.io:9000/insales-test-sber/images/products/1/1/1/large_image_1.jpg</large-url>
        <filename>image_1.jpg</filename>
        <image-content-type>image/jpeg</image-content-type>
      </image>
    </images>
    <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-name>
        <id type="integer">3</id>
        <position type="integer">2</position>
        <navigational type="boolean">true</navigational>
        <title>Цвет</title>
      </option-name>
    </option-names>
    <properties type="array">
      <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>
    </properties>
    <characteristics type="array">
      <characteristic>
        <id type="integer">10</id>
        <property-id type="integer">4</property-id>
        <position type="integer">2</position>
        <title>New</title>
        <permalink>new</permalink>
      </characteristic>
    </characteristics>
    <product-field-values type="array"/>
    <variants type="array">
      <variant>
        <variant-field-values type="array"/>
        <option-values type="array">
          <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">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-values>
        <id type="integer">2</id>
        <title>Зеленый / Синий</title>
        <product-id type="integer">2</product-id>
        <sku>424</sku>
        <barcode nil="true"/>
        <dimensions nil="true"/>
        <available type="boolean">true</available>
        <image-ids type="array"/>
        <image-id type="integer" nil="true"/>
        <weight type="decimal">0.3</weight>
        <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">1</quantity>
        <cost-price type="decimal" nil="true"/>
        <cost-price-in-site-currency type="decimal" nil="true"/>
        <price-in-site-currency type="decimal">600.0</price-in-site-currency>
        <base-price type="decimal">20.0</base-price>
        <old-price type="decimal" nil="true"/>
        <price2 type="decimal" nil="true"/>
        <price type="decimal">20.0</price>
        <base-price-in-site-currency type="decimal">600.0</base-price-in-site-currency>
        <old-price-in-site-currency type="decimal" nil="true"/>
        <price2-in-site-currency type="decimal" nil="true"/>
        <prices type="array"/>
        <prices-in-site-currency type="array"/>
      </variant>
    </variants>
    <product-bundle-components type="array"/>
    <description nil="true"/>
  </product>
  <product>
    <id type="integer">1</id>
    <category-id type="integer">1</category-id>
    <created-at type="timestamp">2024-11-21 00:55:57 +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-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>
  </product>
  <product>
    <id type="integer">3</id>
    <category-id type="integer">6</category-id>
    <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    <updated-at type="timestamp">2015-07-28 23:59:59 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <available type="boolean">true</available>
    <archived type="boolean">false</archived>
    <canonical-url-collection-id type="integer" nil="true"/>
    <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 nil="true"/>
    <fiscal-product-type type="integer">1</fiscal-product-type>
    <title>pants</title>
    <short-description nil="true"/>
    <permalink>pants</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">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"/>
    <characteristics type="array"/>
    <product-field-values type="array"/>
    <variants type="array">
      <variant>
        <variant-field-values type="array"/>
        <option-values type="array">
          <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-values>
        <id type="integer">3</id>
        <title>Базовая</title>
        <product-id type="integer">3</product-id>
        <sku>425</sku>
        <barcode nil="true"/>
        <dimensions nil="true"/>
        <available type="boolean">true</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" nil="true"/>
        <cost-price type="decimal" nil="true"/>
        <cost-price-in-site-currency type="decimal" nil="true"/>
        <price-in-site-currency type="decimal">600.0</price-in-site-currency>
        <base-price type="decimal">20.0</base-price>
        <old-price type="decimal" nil="true"/>
        <price2 type="decimal" nil="true"/>
        <price type="decimal">20.0</price>
        <base-price-in-site-currency type="decimal">600.0</base-price-in-site-currency>
        <old-price-in-site-currency type="decimal" nil="true"/>
        <price2-in-site-currency type="decimal" nil="true"/>
        <prices type="array"/>
        <prices-in-site-currency type="array"/>
      </variant>
    </variants>
    <product-bundle-components type="array"/>
    <description nil="true"/>
  </product>
  <product>
    <id type="integer">4</id>
    <category-id type="integer">3</category-id>
    <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
    <updated-at type="timestamp">2015-07-29 00:00:00 +0300</updated-at>
    <is-hidden type="boolean">false</is-hidden>
    <available type="boolean">true</available>
    <archived type="boolean">false</archived>
    <canonical-url-collection-id type="integer" nil="true"/>
    <custom-template nil="true"/>
    <unit>pce</unit>
    <sort-weight type="float" nil="true"/>
    <bundle type="boolean">true</bundle>
    <ignore-discounts type="boolean" nil="true"/>
    <vat type="integer">10</vat>
    <dimensions nil="true"/>
    <fiscal-product-type type="integer">1</fiscal-product-type>
    <title>shirt &amp; t-short</title>
    <short-description nil="true"/>
    <permalink>shirt_and_tshort</permalink>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <currency-code>LVL</currency-code>
    <collections-ids type="array"/>
    <sales-channels-id nil="true"/>
    <images type="array"/>
    <video-links type="array"/>
    <option-names type="array"/>
    <properties type="array"/>
    <characteristics type="array"/>
    <product-field-values type="array"/>
    <variants type="array">
      <variant>
        <variant-field-values type="array"/>
        <option-values type="array"/>
        <id type="integer">4</id>
        <title></title>
        <product-id type="integer">4</product-id>
        <sku>426</sku>
        <barcode nil="true"/>
        <dimensions nil="true"/>
        <available type="boolean">true</available>
        <image-ids type="array"/>
        <image-id type="integer" nil="true"/>
        <weight type="decimal">0.3</weight>
        <created-at type="timestamp">2009-03-18 12:53:14 +0300</created-at>
        <updated-at type="timestamp">2009-03-18 11:53:14 +0300</updated-at>
        <quantity type="integer" nil="true"/>
        <cost-price type="decimal" nil="true"/>
        <cost-price-in-site-currency type="decimal" nil="true"/>
        <price-in-site-currency type="decimal">600.0</price-in-site-currency>
        <base-price type="decimal">20.0</base-price>
        <old-price type="decimal" nil="true"/>
        <price2 type="decimal" nil="true"/>
        <price type="decimal">20.0</price>
        <base-price-in-site-currency type="decimal">600.0</base-price-in-site-currency>
        <old-price-in-site-currency type="decimal" nil="true"/>
        <price2-in-site-currency type="decimal" nil="true"/>
        <prices type="array"/>
        <prices-in-site-currency type="array"/>
      </variant>
    </variants>
    <product-bundle-components type="array">
      <product-bundle-component>
        <id type="integer">989437296</id>
        <variant-id type="integer">2</variant-id>
        <free type="boolean">true</free>
        <quantity type="decimal">1.0</quantity>
        <discount-amount type="decimal" nil="true"/>
        <product-id type="integer">2</product-id>
        <discount-type type="integer" nil="true"/>
      </product-bundle-component>
      <product-bundle-component>
        <id type="integer">579560919</id>
        <variant-id type="integer">1</variant-id>
        <free type="boolean">false</free>
        <quantity type="decimal">1.0</quantity>
        <discount-amount type="decimal" nil="true"/>
        <product-id type="integer">1</product-id>
        <discount-type type="integer" nil="true"/>
      </product-bundle-component>
    </product-bundle-components>
    <description nil="true"/>
  </product>
</products>

Update bundle

Endpoint

PUT /admin/products/4.xml

Parameters

Name Description
product[title] title
product[ignore_discounts] set to 1 to make this product ignore discounts
product[vat] do not set VAT for bundle because order lines will be created with its components, which have their own VAT
product[product_bundle_components_attributes] component without the specified identifier (id) will be created (variant_id is required); component with id will be updated (variant_id is optional); component with id and (_destroy: true) attribute will be destroyed;

Request

Route

PUT /admin/products/4.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <product-bundle-components-attributes type="array">
    <product-bundle-components-attribute>
      <variant-id type="integer">3</variant-id>
      <quantity type="integer">2</quantity>
      <free type="boolean">false</free>
    </product-bundle-components-attribute>
    <product-bundle-components-attribute>
      <id type="integer">1</id>
      <quantity type="integer">4</quantity>
    </product-bundle-components-attribute>
    <product-bundle-components-attribute>
      <id type="integer">2</id>
      <_destroy type="boolean">true</_destroy>
    </product-bundle-components-attribute>
  </product-bundle-components-attributes>
</product>

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"?>
<product>
  <id type="integer">4</id>
  <category-id type="integer">3</category-id>
  <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:04 +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" nil="true"/>
  <custom-template nil="true"/>
  <unit>pce</unit>
  <sort-weight type="float" nil="true"/>
  <bundle type="boolean">true</bundle>
  <ignore-discounts type="boolean" nil="true"/>
  <vat type="integer">10</vat>
  <dimensions nil="true"/>
  <fiscal-product-type type="integer">1</fiscal-product-type>
  <title>shirt &amp; t-short</title>
  <short-description nil="true"/>
  <permalink>shirt_and_tshort</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <currency-code>LVL</currency-code>
  <collections-ids type="array"/>
  <sales-channels-id nil="true"/>
  <images type="array"/>
  <video-links type="array"/>
  <option-names type="array"/>
  <properties type="array"/>
  <characteristics type="array"/>
  <product-field-values type="array"/>
  <variants type="array">
    <variant>
      <variant-field-values type="array"/>
      <option-values type="array"/>
      <id type="integer">4</id>
      <title></title>
      <product-id type="integer">4</product-id>
      <sku>426</sku>
      <barcode nil="true"/>
      <dimensions nil="true"/>
      <available type="boolean">false</available>
      <image-ids type="array"/>
      <image-id type="integer" nil="true"/>
      <weight type="decimal">0.3</weight>
      <created-at type="timestamp">2009-03-18 12:53:14 +0300</created-at>
      <updated-at type="timestamp">2024-11-21 00:57:04 +0300</updated-at>
      <quantity type="integer">0</quantity>
      <cost-price type="decimal" nil="true"/>
      <cost-price-in-site-currency type="decimal" nil="true"/>
      <price-in-site-currency type="decimal">600.0</price-in-site-currency>
      <base-price type="decimal">20.0</base-price>
      <old-price type="decimal" nil="true"/>
      <price2 type="decimal" nil="true"/>
      <price type="decimal">20.0</price>
      <base-price-in-site-currency type="decimal">600.0</base-price-in-site-currency>
      <old-price-in-site-currency type="decimal" nil="true"/>
      <price2-in-site-currency type="decimal" nil="true"/>
      <prices type="array"/>
      <prices-in-site-currency type="array"/>
    </variant>
  </variants>
  <product-bundle-components type="array">
    <product-bundle-component>
      <id type="integer">989437296</id>
      <variant-id type="integer">2</variant-id>
      <free type="boolean">true</free>
      <quantity type="decimal">1.0</quantity>
      <discount-amount type="decimal" nil="true"/>
      <product-id type="integer">2</product-id>
      <discount-type type="integer">0</discount-type>
    </product-bundle-component>
    <product-bundle-component>
      <id type="integer">579560919</id>
      <variant-id type="integer">1</variant-id>
      <free type="boolean">false</free>
      <quantity type="decimal">1.0</quantity>
      <discount-amount type="decimal" nil="true"/>
      <product-id type="integer">1</product-id>
      <discount-type type="integer">0</discount-type>
    </product-bundle-component>
    <product-bundle-component>
      <id type="integer">1058167309</id>
      <variant-id type="integer">3</variant-id>
      <free type="boolean">false</free>
      <quantity type="decimal">2.0</quantity>
      <discount-amount type="decimal" nil="true"/>
      <product-id type="integer">3</product-id>
      <discount-type type="integer">0</discount-type>
    </product-bundle-component>
  </product-bundle-components>
  <description nil="true"/>
</product>

Update product

Endpoint

PUT /admin/products/:product_id.xml

Parameters

Name Description
product[title] title
product[ignore_discounts] set to 1 to make this product ignore discounts
product[vat] integer, default value is set in account settings, if default in account set as 'No VAT' you cannot change VAT of products through API; possible values depend on country, set to -1 if this product is not a subject to VAT
product[product_field_values_attributes] product field values attributes

Request

Route

PUT /admin/products/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <title>Van Gogh Notebook</title>
  <ignore-discounts type="integer">1</ignore-discounts>
  <vat type="integer">10</vat>
  <product-field-values-attributes type="array">
    <product-field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </product-field-values-attribute>
  </product-field-values-attributes>
</product>

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"?>
<product>
  <id type="integer">1</id>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2024-11-21 00:55:57 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:04 +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">true</ignore-discounts>
  <vat type="integer">10</vat>
  <dimensions>10x20x30</dimensions>
  <fiscal-product-type type="integer">1</fiscal-product-type>
  <title>Van Gogh Notebook</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-field-values type="array">
    <product-field-value>
      <id type="integer">1</id>
      <product-field-id type="integer">1</product-field-id>
      <value>12345</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>
</product>

ProductField

Create product_field

Endpoint

POST /admin/product_fields.xml

Parameters

Name Description
product_field[title] required title
product_field[handle] required handle used in liquid
product_field[type] required ProductField::TextArea - textarea, ProductField::TextField - textfield
product_field[position] position in product_fields list
product_field[is_hidden] boolean
product_field[is_indexed] boolean

Request

Route

POST /admin/product_fields.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field>
  <title>Size</title>
  <handle>size</handle>
  <type>ProductField::TextArea</type>
</product-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"?>
<product-field>
  <id type="integer">7</id>
  <handle>size</handle>
  <type>ProductField::TextArea</type>
  <application-id type="integer">1</application-id>
  <position type="integer">3</position>
  <is-hidden type="boolean" nil="true"/>
  <is-indexed type="boolean" nil="true"/>
  <title>Size</title>
</product-field>

Destroy product_field by handle

Endpoint

DELETE /admin/product_fields/:product_field_handle.xml

Request

Route

DELETE /admin/product_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 product_field

Endpoint

DELETE /admin/product_fields/:product_field_id.xml

Request

Route

DELETE /admin/product_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 product_field by handle

Endpoint

GET /admin/product_fields/:product_field_handle.xml

Request

Route

GET /admin/product_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"?>
<product-field>
  <id type="integer">2</id>
  <handle>handle2</handle>
  <type>ProductField::TextArea</type>
  <application-id type="integer">1</application-id>
  <position type="integer">2</position>
  <is-hidden type="boolean" nil="true"/>
  <is-indexed type="boolean" nil="true"/>
  <title>title2</title>
</product-field>

Get product_field

Endpoint

GET /admin/product_fields/:product_field_id.xml

Request

Route

GET /admin/product_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"?>
<product-field>
  <id type="integer">2</id>
  <handle>handle2</handle>
  <type>ProductField::TextArea</type>
  <application-id type="integer">1</application-id>
  <position type="integer">2</position>
  <is-hidden type="boolean" nil="true"/>
  <is-indexed type="boolean" nil="true"/>
  <title>title2</title>
</product-field>

Get product_fields

Endpoint

GET /admin/product_fields.xml

Request

Route

GET /admin/product_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"?>
<objects type="array">
  <product-field>
    <id type="integer">1</id>
    <handle>handle</handle>
    <type>ProductField::TextField</type>
    <application-id type="integer" nil="true"/>
    <position type="integer">1</position>
    <is-hidden type="boolean" nil="true"/>
    <is-indexed type="boolean" nil="true"/>
    <title>title</title>
  </product-field>
  <product-field>
    <id type="integer">4</id>
    <handle>yml_import</handle>
    <type>ProductField::YmlImportField</type>
    <application-id type="integer" nil="true"/>
    <position type="integer">1</position>
    <is-hidden type="boolean" nil="true"/>
    <is-indexed type="boolean" nil="true"/>
    <title>import field</title>
  </product-field>
  <product-field>
    <id type="integer">2</id>
    <handle>handle2</handle>
    <type>ProductField::TextArea</type>
    <application-id type="integer">1</application-id>
    <position type="integer">2</position>
    <is-hidden type="boolean" nil="true"/>
    <is-indexed type="boolean" nil="true"/>
    <title>title2</title>
  </product-field>
</objects>

Update product_field by handle

Endpoint

PUT /admin/product_fields/:product_field_handle.xml

Parameters

Name Description Method
product_field[title] title
product_field[handle] handle used in liquid new_handle
product_field[position] position in product_fields list
product_field[is_hidden] boolean
product_field[is_indexed] boolean

Request

Route

PUT /admin/product_fields/handle2.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field>
  <title>Volume</title>
  <position type="integer">2</position>
</product-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"?>
<product-field>
  <position type="integer">2</position>
  <id type="integer">2</id>
  <handle>handle2</handle>
  <type>ProductField::TextArea</type>
  <application-id type="integer">1</application-id>
  <is-hidden type="boolean" nil="true"/>
  <is-indexed type="boolean" nil="true"/>
  <title>Volume</title>
</product-field>

Update product_field

Endpoint

PUT /admin/product_fields/:product_field_id.xml

Parameters

Name Description
product_field[title] title
product_field[handle] handle used in liquid
product_field[position] position in product_fields list
product_field[is_hidden] boolean
product_field[is_indexed] boolean

Request

Route

PUT /admin/product_fields/2.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field>
  <title>Volume</title>
  <handle>volume</handle>
  <position type="integer">2</position>
</product-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"?>
<product-field>
  <handle>volume</handle>
  <position type="integer">2</position>
  <id type="integer">2</id>
  <type>ProductField::TextArea</type>
  <application-id type="integer">1</application-id>
  <is-hidden type="boolean" nil="true"/>
  <is-indexed type="boolean" nil="true"/>
  <title>Volume</title>
</product-field>

ProductFieldValue

Create product_field_value by handle

Endpoint

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

Parameters

Name Description
product_field_value[product_field_handle] required product field handle
product_field_value[value] product field value

Request

Route

POST /admin/products/1/product_field_values.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field-value>
  <product-field-handle>handle2</product-field-handle>
  <value>test value</value>
</product-field-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"?>
<product-field-value>
  <id type="integer">6</id>
  <product-field-id type="integer">2</product-field-id>
  <value>test value</value>
</product-field-value>

Create product_field_value

Endpoint

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

Parameters

Name Description
product_field_value[product_field_id] required product field id
product_field_value[value] product field value

Request

Route

POST /admin/products/1/product_field_values.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field-value>
  <product-field-id type="integer">2</product-field-id>
  <value>test value</value>
</product-field-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"?>
<product-field-value>
  <id type="integer">4</id>
  <product-field-id type="integer">2</product-field-id>
  <value>test value</value>
</product-field-value>

Destroy product_field_value by handle

Endpoint

DELETE /admin/products/:product_id/product_field_values/:product_field_handle.xml

Request

Route

DELETE /admin/products/1/product_field_values/handle.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 product_field_value

Endpoint

DELETE /admin/products/:product_id/product_field_values/:product_field_value_id.xml

Request

Route

DELETE /admin/products/1/product_field_values/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 product_field_value by handle

Endpoint

GET /admin/products/:product_id/product_field_values/:product_field_handle.xml

Request

Route

GET /admin/products/1/product_field_values/handle.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"?>
<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>

Get product_field_value

Endpoint

GET /admin/products/:product_id/product_field_values/:product_field_value_id.xml

Request

Route

GET /admin/products/1/product_field_values/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"?>
<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>

Get product_field_values

Endpoint

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

Request

Route

GET /admin/products/1/product_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"?>
<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>

Update product_field_value by handle

Endpoint

PUT /admin/products/:product_id/product_field_values/:product_field_handle.xml

Parameters

Name Description
product_field_value[value] product field value

Request

Route

PUT /admin/products/1/product_field_values/handle.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field-value>
  <value>new value</value>
</product-field-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"?>
<product-field-value>
  <id type="integer">1</id>
  <product-field-id type="integer">1</product-field-id>
  <value>new value</value>
</product-field-value>

Update product_field_value

Endpoint

PUT /admin/products/:product_id/product_field_values/:product_field_value_id.xml

Parameters

Name Description
product_field_value[value] product field value

Request

Route

PUT /admin/products/1/product_field_values/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field-value>
  <value>new value</value>
</product-field-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"?>
<product-field-value>
  <id type="integer">1</id>
  <product-field-id type="integer">1</product-field-id>
  <value>new value</value>
</product-field-value>

Property

Create property

Endpoint

POST /admin/properties.xml

Parameters

Name Description
property[title] required title
property[permalink] permalink
property[position] position in property list
property[backoffice] show in backoffice
property[is_hidden] hide in product page on site
property[is_navigational] show in products filter on category page

Request

Route

POST /admin/properties.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<property>
  <title>Country</title>
  <permalink>country</permalink>
  <backoffice type="boolean">true</backoffice>
  <is-navigational type="boolean">true</is-navigational>
</property>

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"?>
<property>
  <id type="integer">35187303</id>
  <position type="integer">13</position>
  <is-hidden type="boolean">false</is-hidden>
  <is-navigational type="boolean">true</is-navigational>
  <backoffice type="boolean">true</backoffice>
  <permalink>country</permalink>
  <title>Country</title>
</property>

Destroy property

Endpoint

DELETE /admin/properties/:property_id.xml

Request

Route

DELETE /admin/properties/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 properties

Endpoint

GET /admin/properties.xml

Request

Route

GET /admin/properties.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"?>
<properties type="array">
  <property>
    <id type="integer">-1</id>
    <position type="integer">1</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>kategoriya-yandeks-marketa</permalink>
    <title>Категория Яндекс Маркета</title>
  </property>
  <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">-5</id>
    <position type="integer">1</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>kategoriya-tovara-v-wildberries</permalink>
    <title>Категория товара в Wildberries</title>
  </property>
  <property>
    <id type="integer">7</id>
    <position type="integer">2</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>visible</permalink>
    <title>visible</title>
  </property>
  <property>
    <id type="integer">9</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>numeric</permalink>
    <title>numeric</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">5</id>
    <position type="integer">4</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>параметр</permalink>
    <title>параметр</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>
  <property>
    <id type="integer">2</id>
    <position type="integer">7</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>importer</permalink>
    <title>Importer</title>
  </property>
  <property>
    <id type="integer">1</id>
    <position type="integer">8</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>producer</permalink>
    <title>Producer</title>
  </property>
  <property>
    <id type="integer">14</id>
    <position type="integer">11</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>age</permalink>
    <title>Age</title>
  </property>
  <property>
    <id type="integer">15</id>
    <position type="integer">12</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>age_unit</permalink>
    <title>Age Unit</title>
  </property>
  <property>
    <id type="integer">-7</id>
    <position type="integer">10000</position>
    <is-hidden type="boolean">true</is-hidden>
    <is-navigational type="boolean">false</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>new-ketagoriya-tovara-v-ozon</permalink>
    <title>Новая категория товара в OZON</title>
  </property>
  <property>
    <id type="integer">-6</id>
    <position type="integer">10001</position>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <backoffice type="boolean">false</backoffice>
    <permalink>kategoriya-tovara-v-vk</permalink>
    <title>Категория товара в VK</title>
  </property>
</properties>

Get property

Endpoint

GET /admin/properties/:property_id.xml

Request

Route

GET /admin/properties/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"?>
<property>
  <id type="integer">1</id>
  <position type="integer">8</position>
  <is-hidden type="boolean">false</is-hidden>
  <is-navigational type="boolean">true</is-navigational>
  <backoffice type="boolean">false</backoffice>
  <permalink>producer</permalink>
  <title>Producer</title>
</property>

Update property

Endpoint

PUT /admin/properties/:property_id.xml

Parameters

Name Description
property[title] title

Request

Route

PUT /admin/properties/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<property>
  <title>Brand country</title>
</property>

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"?>
<property>
  <id type="integer">1</id>
  <position type="integer">8</position>
  <is-hidden type="boolean">false</is-hidden>
  <is-navigational type="boolean">true</is-navigational>
  <backoffice type="boolean">false</backoffice>
  <permalink>producer</permalink>
  <title>Brand country</title>
</property>

ProviderToken

Create or refresh messengers custom provider token

Endpoint

POST /admin/dialogs/provider_tokens.xml

Parameters

Name Description Enum
messenger_type required Messenger type ["whats_app", "telegram", "viber", "sms", "email", "vk", "instagram"]

Request

Route

POST /admin/dialogs/provider_tokens.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <messenger-type>sms</messenger-type>
</hash>

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>
  <api-token>SOME_API_TOKEN</api-token>
  <webhook-token>SOME_WEBHOOK_TOKEN</webhook-token>
</hash>

RecurringApplicationCharge

Create recurring_application_charge

Application can have only one recurring charge at any given time.

Endpoint

POST /admin/recurring_application_charge.xml

Parameters

Name Description
recurring_application_charge[monthly] required amount of monthly payment
recurring_application_charge[trial_expired_at] trial period ending date, by default it uses trial period from application

Request

Route

POST /admin/recurring_application_charge.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<recurring-application-charge>
  <monthly type="integer">200</monthly>
  <trial-expired-at>2017-02-03</trial-expired-at>
</recurring-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"?>
<recurring-application-charge>
  <monthly type="decimal">200.0</monthly>
  <trial-expired-at type="date">2017-02-03</trial-expired-at>
  <created-at type="dateTime">2024-11-21T00:56:18+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:18+03:00</updated-at>
  <paid-till type="date">2017-02-03</paid-till>
  <blocked type="boolean">false</blocked>
</recurring-application-charge>

Destroy recurring_application_charge

Endpoint

DELETE /admin/recurring_application_charge.xml

Request

Route

DELETE /admin/recurring_application_charge.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 recurring_application_charge

Endpoint

GET /admin/recurring_application_charge.xml

Request

Route

GET /admin/recurring_application_charge.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"?>
<recurring-application-charge>
  <monthly type="decimal">1190.0</monthly>
  <trial-expired-at type="date">2024-11-28</trial-expired-at>
  <created-at type="dateTime">2024-11-21T00:56:18+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:18+03:00</updated-at>
  <paid-till type="date">2024-11-28</paid-till>
  <blocked type="boolean">false</blocked>
</recurring-application-charge>

Update recurring_application_charge

Endpoint

PUT /admin/recurring_application_charge.xml

Parameters

Name Description
recurring_application_charge[monthly] amount of monthly payment

Request

Route

PUT /admin/recurring_application_charge.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<recurring-application-charge>
  <monthly type="integer">300</monthly>
</recurring-application-charge>

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"?>
<recurring-application-charge>
  <monthly type="decimal">300.0</monthly>
  <trial-expired-at type="date">2024-11-28</trial-expired-at>
  <created-at type="dateTime">2024-11-21T00:56:18+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:18+03:00</updated-at>
  <paid-till type="date">2024-11-28</paid-till>
  <blocked type="boolean">false</blocked>
</recurring-application-charge>

add free days to recurring_application_charge

Endpoint

PATCH /admin/recurring_application_charge/add_free_days.xml

Parameters

Name Description
recurring_application_charge[days_count] how many free days you want to add, it is possible that paid_till attribute would change but trial_expired_at would not, it is normal

Request

Route

PATCH /admin/recurring_application_charge/add_free_days.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<recurring-application-charge>
  <days-count type="integer">21</days-count>
</recurring-application-charge>

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"?>
<recurring-application-charge>
  <monthly type="decimal">400.0</monthly>
  <trial-expired-at type="date">2024-12-20</trial-expired-at>
  <created-at type="dateTime">2024-11-21T00:56:19+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:56:19+03:00</updated-at>
  <paid-till type="date">2024-12-20</paid-till>
  <blocked type="boolean">false</blocked>
</recurring-application-charge>

Redirect

Create redirect with removing redirect chains

Endpoint

POST /admin/redirects.xml

Parameters

Name Description
redirect[old_url] required old url
redirect[new_url] required new url
redirect[remove_redirect_chains] if set to 1 and given a redirect A=>B when creating a new redirect B=>C, it will destroy old redirect (A=>B) and create new one (A=>C)

Request

Route

POST /admin/redirects.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<redirect>
  <old-url>/like_new_url</old-url>
  <new-url>/so_new_url</new-url>
  <remove-redirect-chains type="integer">1</remove-redirect-chains>
</redirect>

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"?>
<redirect>
  <id type="integer">10</id>
  <old-url>/like_new_url</old-url>
  <new-url>/so_new_url</new-url>
  <created-at type="dateTime">2024-11-21T00:57:27+03:00</created-at>
</redirect>

Create redirect

Endpoint

POST /admin/redirects.xml

Parameters

Name Description
redirect[old_url] required old url
redirect[new_url] required new url

Request

Route

POST /admin/redirects.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<redirect>
  <old-url>/old_url</old-url>
  <new-url>/new_url</new-url>
</redirect>

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"?>
<redirect>
  <id type="integer">6</id>
  <old-url>/old_url</old-url>
  <new-url>/new_url</new-url>
  <created-at type="dateTime">2024-11-21T00:57:27+03:00</created-at>
</redirect>

Destroy redirect

Endpoint

DELETE /admin/redirects/:redirect_id.xml

Request

Route

DELETE /admin/redirects/13.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 redirect

Endpoint

GET /admin/redirects/:redirect_id.xml

Request

Route

GET /admin/redirects/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"?>
<redirect>
  <id type="integer">3</id>
  <old-url>/so_old_url</old-url>
  <new-url>/like_new_url</new-url>
  <created-at type="dateTime">2024-11-21T00:57:27+03:00</created-at>
</redirect>

Get redirects

Endpoint

GET /admin/redirects.xml

Request

Route

GET /admin/redirects.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"?>
<redirects type="array">
  <redirect>
    <id type="integer">1</id>
    <old-url>/so_old_url</old-url>
    <new-url>/like_new_url</new-url>
    <created-at type="dateTime">2024-11-21T00:57:27+03:00</created-at>
  </redirect>
</redirects>

Review

Create review

Endpoint

POST /admin/reviews.xml

Parameters

Name Description
review[product_id] required product id
review[author] required author
review[content] content
review[email] email
review[published] should be published?
review[rating] product rating (1-10)

Request

Route

POST /admin/reviews.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<review>
  <product-id type="integer">1</product-id>
  <author>Bob</author>
  <content>Nice product! I'd like to buy it!</content>
  <email>bob@gmail.com</email>
  <published type="boolean">true</published>
  <rating type="integer">7</rating>
</review>

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"?>
<review>
  <id type="integer">11</id>
  <product-id type="integer">1</product-id>
  <author>Bob</author>
  <content>Nice product! I'd like to buy it!</content>
  <email>bob@gmail.com</email>
  <rating type="integer">7</rating>
  <published type="boolean">true</published>
  <created-at type="timestamp">2024-11-21 00:57:05 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:05 +0300</updated-at>
  <spam type="boolean">false</spam>
  <manager-reply nil="true"/>
  <manager-name nil="true"/>
  <replied-at type="dateTime" nil="true"/>
  <published-at type="dateTime" nil="true"/>
  <replied-q type="boolean">false</replied-q>
  <title>Cool t-shirt</title>
  <url>/product/футболка</url>
</review>

Destroy review

Endpoint

DELETE /admin/reviews/:review_id.xml

Request

Route

DELETE /admin/reviews/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 review

Endpoint

GET /admin/reviews/:review_id.xml

Request

Route

GET /admin/reviews/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"?>
<review>
  <id type="integer">1</id>
  <product-id type="integer">1</product-id>
  <author>Автор 1</author>
  <content>Отличный продукт!</content>
  <email>email1@example.com</email>
  <rating type="integer">5</rating>
  <published type="boolean">true</published>
  <created-at type="timestamp">2023-09-01 13:00:00 +0300</created-at>
  <updated-at type="timestamp">2023-09-01 13:00:00 +0300</updated-at>
  <spam type="boolean">false</spam>
  <manager-reply>nil</manager-reply>
  <manager-name nil="true"/>
  <replied-at type="dateTime" nil="true"/>
  <published-at type="dateTime" nil="true"/>
  <replied-q type="boolean">false</replied-q>
  <title>Cool t-shirt</title>
  <url>/product/футболка</url>
  <image>
    <id type="integer">1</id>
    <created-at type="dateTime">2023-09-01T13:00:00+03:00</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/image_1.jpg</original-url>
    <medium-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/medium_image_1.jpg</medium-url>
    <small-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/micro_image_1.jpg</small-url>
    <thumb-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/thumb_image_1.jpg</thumb-url>
    <compact-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/compact_image_1.jpg</compact-url>
    <large-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/large_image_1.jpg</large-url>
    <image-content-type>image/jpeg</image-content-type>
  </image>
</review>

Get reviews

Endpoint

GET /admin/reviews.xml

Request

Route

GET /admin/reviews.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"?>
<reviews type="array">
  <review>
    <id type="integer">10</id>
    <product-id type="integer">2</product-id>
    <author>Автор 10</author>
    <content>Быстрая доставка, хороший сервис.</content>
    <email>email10@example.com</email>
    <rating type="integer">3</rating>
    <published type="boolean">false</published>
    <created-at type="timestamp">2023-09-10 18:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-10 18:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>nil</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>shirt</title>
    <url>/product/shirt</url>
  </review>
  <review>
    <id type="integer">9</id>
    <product-id type="integer">1</product-id>
    <author>Автор 9</author>
    <content>Отличный продукт, рекомендую!</content>
    <email>email9@example.com</email>
    <rating type="integer">5</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-09 12:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-09 12:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>Спасибо за ваш отзыв!</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>Cool t-shirt</title>
    <url>/product/футболка</url>
  </review>
  <review>
    <id type="integer">7</id>
    <product-id type="integer">7</product-id>
    <author>Автор 7</author>
    <content>Понравился, всё работает.</content>
    <email>email7@example.com</email>
    <rating type="integer">5</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-07 13:30:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-07 13:30:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>Спасибо за ваш отзыв!</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>fb_product</title>
    <url>/product/fb_product</url>
  </review>
  <review>
    <id type="integer">6</id>
    <product-id type="integer">6</product-id>
    <author>Автор 6</author>
    <content>Средний продукт, есть лучше.</content>
    <email>email6@example.com</email>
    <rating type="integer">3</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-06 11:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-06 11:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>Спасибо за ваш отзыв.</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>pants</title>
    <url>/product/pants</url>
  </review>
  <review>
    <id type="integer">5</id>
    <product-id type="integer">5</product-id>
    <author>Автор 5</author>
    <content>Отличная цена-качество!</content>
    <email>email5@example.com</email>
    <rating type="integer">5</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-05 17:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-05 17:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>Рады, что вам понравилось!</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>shirt &amp; pants</title>
    <url>/product/shirt_and_pants</url>
  </review>
  <review>
    <id type="integer">4</id>
    <product-id type="integer">4</product-id>
    <author>Автор 4</author>
    <content>Продукт нормальный, но требует доработки.</content>
    <email>email4@example.com</email>
    <rating type="integer">4</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-04 12:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-04 12:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>Спасибо за ваш отзыв. Мы работаем над улучшениями.</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>shirt &amp; t-short</title>
    <url>/product/shirt_and_tshort</url>
  </review>
  <review>
    <id type="integer">2</id>
    <product-id type="integer">2</product-id>
    <author>Автор 2</author>
    <content>Хороший, но есть недостатки.</content>
    <email>email2@example.com</email>
    <rating type="integer">3</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-02 14:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-02 14:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>Мы учтем ваши замечания и постараемся улучшить продукт.</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>shirt</title>
    <url>/product/shirt</url>
    <image>
      <id type="integer">2</id>
      <created-at type="dateTime">2023-09-02T14:00:00+03:00</created-at>
      <original-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/2/2/image_2.jpg</original-url>
      <medium-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/2/2/medium_image_2.jpg</medium-url>
      <small-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/2/2/micro_image_2.jpg</small-url>
      <thumb-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/2/2/thumb_image_2.jpg</thumb-url>
      <compact-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/2/2/compact_image_2.jpg</compact-url>
      <large-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/2/2/large_image_2.jpg</large-url>
      <image-content-type>image/jpeg</image-content-type>
    </image>
  </review>
  <review>
    <id type="integer">1</id>
    <product-id type="integer">1</product-id>
    <author>Автор 1</author>
    <content>Отличный продукт!</content>
    <email>email1@example.com</email>
    <rating type="integer">5</rating>
    <published type="boolean">true</published>
    <created-at type="timestamp">2023-09-01 13:00:00 +0300</created-at>
    <updated-at type="timestamp">2023-09-01 13:00:00 +0300</updated-at>
    <spam type="boolean">false</spam>
    <manager-reply>nil</manager-reply>
    <manager-name nil="true"/>
    <replied-at type="dateTime" nil="true"/>
    <published-at type="dateTime" nil="true"/>
    <replied-q type="boolean">false</replied-q>
    <title>Cool t-shirt</title>
    <url>/product/футболка</url>
    <image>
      <id type="integer">1</id>
      <created-at type="dateTime">2023-09-01T13:00:00+03:00</created-at>
      <original-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/image_1.jpg</original-url>
      <medium-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/medium_image_1.jpg</medium-url>
      <small-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/micro_image_1.jpg</small-url>
      <thumb-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/thumb_image_1.jpg</thumb-url>
      <compact-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/compact_image_1.jpg</compact-url>
      <large-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/large_image_1.jpg</large-url>
      <image-content-type>image/jpeg</image-content-type>
    </image>
  </review>
</reviews>

Update review

Endpoint

PUT /admin/reviews/:review_id.xml

Parameters

Name Description
review[content] content

Request

Route

PUT /admin/reviews/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<review>
  <content>Sweet product!</content>
</review>

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"?>
<review>
  <content>Sweet product!</content>
  <id type="integer">1</id>
  <product-id type="integer">1</product-id>
  <author>Автор 1</author>
  <email>email1@example.com</email>
  <rating type="integer">5</rating>
  <published type="boolean">true</published>
  <created-at type="timestamp">2023-09-01 13:00:00 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:06 +0300</updated-at>
  <spam type="boolean">false</spam>
  <manager-reply>nil</manager-reply>
  <manager-name nil="true"/>
  <replied-at type="dateTime" nil="true"/>
  <published-at type="dateTime" nil="true"/>
  <replied-q type="boolean">false</replied-q>
  <title>Cool t-shirt</title>
  <url>/product/футболка</url>
  <image>
    <id type="integer">1</id>
    <created-at type="dateTime">2023-09-01T13:00:00+03:00</created-at>
    <original-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/image_1.jpg</original-url>
    <medium-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/medium_image_1.jpg</medium-url>
    <small-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/micro_image_1.jpg</small-url>
    <thumb-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/thumb_image_1.jpg</thumb-url>
    <compact-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/compact_image_1.jpg</compact-url>
    <large-url>http://minio.insales.io:9000/insales-test-sber/images/reviews/1/1/1/large_image_1.jpg</large-url>
    <image-content-type>image/jpeg</image-content-type>
  </image>
</review>

SalesChannel

Create sales channel

Endpoint

POST /admin/sales_channels.xml

Parameters

Name Description
sales_channel[title] required sales channel title

Request

Route

POST /admin/sales_channels.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<sales-channel>
  <title>sales channel title</title>
</sales-channel>

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"?>
<sales-channel>
  <id type="integer">9</id>
  <title>sales channel title</title>
  <state nil="true"/>
  <messages type="array"/>
  <account-id type="integer">1</account-id>
  <goods-setting-type nil="true"/>
  <goods-setting-id type="integer" nil="true"/>
  <created-at type="dateTime">2024-11-21T00:57:06+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:06+03:00</updated-at>
  <application-id type="integer">1</application-id>
  <last-rating-import-started-at type="timestamp" nil="true"/>
  <last-feedbacks-import-started-at type="timestamp" nil="true"/>
</sales-channel>

Destroy sales channel

Endpoint

DELETE /admin/sales_channels/:sales_channel_id.xml

Request

Route

DELETE /admin/sales_channels/3.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 sales channel

Endpoint

GET /admin/sales_channels/:sales_channel_id.xml

Request

Route

GET /admin/sales_channels/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"?>
<sales-channel>
  <id type="integer">3</id>
  <title>test title</title>
  <state nil="true"/>
  <messages type="array"/>
  <account-id type="integer">1</account-id>
  <goods-setting-type nil="true"/>
  <goods-setting-id type="integer" nil="true"/>
  <created-at type="dateTime">2009-03-18T10:53:14+03:00</created-at>
  <updated-at type="dateTime">2009-03-18T10:53:14+03:00</updated-at>
  <application-id type="integer">1</application-id>
  <last-rating-import-started-at type="timestamp" nil="true"/>
  <last-feedbacks-import-started-at type="timestamp" nil="true"/>
</sales-channel>

Get sales channels

Endpoint

GET /admin/sales_channels.xml

Request

Route

GET /admin/sales_channels.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"?>
<sales-channels type="array">
  <sales-channel>
    <id type="integer">3</id>
    <title>test title</title>
    <state nil="true"/>
    <messages type="array"/>
    <account-id type="integer">1</account-id>
    <goods-setting-type nil="true"/>
    <goods-setting-id type="integer" nil="true"/>
    <created-at type="dateTime">2009-03-18T10:53:14+03:00</created-at>
    <updated-at type="dateTime">2009-03-18T10:53:14+03:00</updated-at>
    <application-id type="integer">1</application-id>
    <last-rating-import-started-at type="timestamp" nil="true"/>
    <last-feedbacks-import-started-at type="timestamp" nil="true"/>
  </sales-channel>
</sales-channels>

Similar

Create similar

Endpoint

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

Parameters

Name Description
similar_ids required similar ids array

Request

Route

POST /admin/products/1/similars.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<similar-ids type="array">
  <similar-id type="integer">2</similar-id>
</similar-ids>

Response

Simulated Response

Status

200

Headers

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

Destroy similar

Endpoint

DELETE /admin/products/:product_id/similars/:similar_id.xml

Request

Route

DELETE /admin/products/1/similars/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 similars

Endpoint

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

Request

Route

GET /admin/products/1/similars.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"?>
<products type="array">
  <product>
    <id type="integer">3</id>
  </product>
</products>

Stock Currency

Create stock_currency

Maximal quantity of currencies per account is 5.

Endpoint

POST /admin/stock_currencies.xml

Parameters

Name Description
stock_currency[code] required Available codes:LVL, BYN, USD, EUR, EEK, LTL, AMD, KGS, MDL, EGP, CAD, JPY, TNB, TRY, AZN, PLN, ILS, CNY, BGN, GBP, RUR, UAH, AUD, GEL, AED, CHF, KZT, UZS, TJS, VND, TMT, MXN
stock_currency[is_default] false by default, set it true to make this currency default for account
stock_currency[exchange_rate_use_cb] true by default, set it false to use manual exchange rate
stock_currency[exchange_rate_manual] manual exchange rate
stock_currency[exchange_rate_percent] 0 by default, deviation as a percentage from defined exchange rate

Request

Route

POST /admin/stock_currencies.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<stock-currency>
  <code>KZT</code>
  <exchange-rate-percent type="integer">10</exchange-rate-percent>
</stock-currency>

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"?>
<stock-currency>
  <id type="integer">92</id>
  <is-default type="boolean">false</is-default>
  <exchange-rate-use-cb type="boolean">true</exchange-rate-use-cb>
  <exchange-rate-manual type="decimal" nil="true"/>
  <exchange-rate-percent type="decimal">10.0</exchange-rate-percent>
  <exchange-rate-round type="boolean">true</exchange-rate-round>
  <code>KZT</code>
  <title>Казахский тенге</title>
  <cb-rate type="decimal">0.21</cb-rate>
  <unit>тг.</unit>
  <exchange-rate type="decimal">0.231</exchange-rate>
</stock-currency>

Get stock currencies

Endpoint

GET /admin/stock_currencies.xml

Request

Route

GET /admin/stock_currencies.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"?>
<stock-currencies type="array">
  <stock-currency>
    <id type="integer">1</id>
    <is-default type="boolean">true</is-default>
    <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
    <exchange-rate-manual type="decimal">30.0</exchange-rate-manual>
    <exchange-rate-percent type="decimal">0.0</exchange-rate-percent>
    <exchange-rate-round type="boolean">true</exchange-rate-round>
    <code>LVL</code>
    <title>Латвийский лат</title>
    <cb-rate type="decimal">30.0</cb-rate>
    <unit>Ls</unit>
    <exchange-rate type="decimal">30.0</exchange-rate>
  </stock-currency>
</stock-currencies>

Get stock currency

Endpoint

GET /admin/stock_currencies/:stock_currency_id.xml

Request

Route

GET /admin/stock_currencies/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"?>
<stock-currency>
  <id type="integer">1</id>
  <is-default type="boolean">true</is-default>
  <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
  <exchange-rate-manual type="decimal">30.0</exchange-rate-manual>
  <exchange-rate-percent type="decimal">0.0</exchange-rate-percent>
  <exchange-rate-round type="boolean">true</exchange-rate-round>
  <code>LVL</code>
  <title>Латвийский лат</title>
  <cb-rate type="decimal">30.0</cb-rate>
  <unit>Ls</unit>
  <exchange-rate type="decimal">30.0</exchange-rate>
</stock-currency>

Update stock_currency

Endpoint

PUT /admin/stock_currencies/:stock_currency_id.xml

Parameters

Name Description
stock_currency[code] Available codes:LVL, BYN, USD, EUR, EEK, LTL, AMD, KGS, MDL, EGP, CAD, JPY, TNB, TRY, AZN, PLN, ILS, CNY, BGN, GBP, RUR, UAH, AUD, GEL, AED, CHF, KZT, UZS, TJS, VND, TMT, MXN
stock_currency[is_default] false by default, set it true to make this currency default for account
stock_currency[exchange_rate_use_cb] true by default, set it false to use manual exchange rate
stock_currency[exchange_rate_manual] manual exchange rate
stock_currency[exchange_rate_percent] 0 by default, deviation as a percentage from defined exchange rate

Request

Route

PUT /admin/stock_currencies/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<stock-currency>
  <code>UAH</code>
  <is-default type="boolean">true</is-default>
  <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
  <exchange-rate-manual type="integer">40</exchange-rate-manual>
  <exchange-rate-percent type="integer">0</exchange-rate-percent>
</stock-currency>

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"?>
<stock-currency>
  <is-default type="boolean">true</is-default>
  <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
  <exchange-rate-manual type="decimal">40.0</exchange-rate-manual>
  <exchange-rate-percent type="decimal">0.0</exchange-rate-percent>
  <id type="integer">1</id>
  <exchange-rate-round type="boolean">true</exchange-rate-round>
  <code>UAH</code>
  <title>Украинская гривна</title>
  <cb-rate type="decimal">5.0</cb-rate>
  <unit>грн.</unit>
  <exchange-rate type="decimal">40.0</exchange-rate>
</stock-currency>

Supplementary

Create supplementary

Endpoint

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

Parameters

Name Description
supplementary_ids required supplementary ids array

Request

Route

POST /admin/products/1/supplementaries.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<supplementary-ids type="array">
  <supplementary-id type="integer">2</supplementary-id>
  <supplementary-id type="integer">3</supplementary-id>
</supplementary-ids>

Response

Simulated Response

Status

200

Headers

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

Destroy supplementary

Endpoint

DELETE /admin/products/:product_id/supplementaries/:supplementary_id.xml

Request

Route

DELETE /admin/products/1/supplementaries/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 supplementaries

Endpoint

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

Request

Route

GET /admin/products/1/supplementaries.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"?>
<products type="array">
  <product>
    <id type="integer">3</id>
  </product>
</products>

Unit

Get units

Endpoint

GET admin/units.xml?lang=ru

Request

Route

GET admin/units.xml?lang=ru

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3MA==

Query Parameters

lang=ru

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>
  <mmt>мм</mmt>
  <cmt>см</cmt>
  <dmt>дм</dmt>
  <mtr>м</mtr>
  <kmt>км</kmt>
  <inh>дюйм</inh>
  <fot>фут</fot>
  <yrd>ярд</yrd>
  <mtk>м2</mtk>
  <dmk>дм2</dmk>
  <mlt>мл</mlt>
  <cmq>см3</cmq>
  <ltr>л</ltr>
  <dmq>дм3</dmq>
  <mtq>м3</mtq>
  <mgm>мг</mgm>
  <grm>г</grm>
  <kgm>кг</kgm>
  <tne>т</tne>
  <hur>ч</hur>
  <nbb>боб</nbb>
  <lef>л.</lef>
  <set>набор</set>
  <npr>пар</npr>
  <npl>рул</npl>
  <nmp>упак</nmp>
  <dzp>дюжина упак</dzp>
  <cnp>100 упак</cnp>
  <pce>шт</pce>
  <cen>100 шт</cen>
  <mil>тыс. шт</mil>
  <box>ящ</box>
  <sct>секц</sct>
  <btl>флак</btl>
  <lmt>пог. м</lmt>
  <com>компл</com>
  <pct>кор</pct>
  <day>сут</day>
  <mth>мес</mth>
</hash>

UserTask

Create user task

Endpoint

POST /admin/user_tasks.xml

Parameters

Name Description
user_task[title] required user task title
user_task[description] required user task description
user_task[assignee_id] required user id
user_task[deadline_at] deadline
user_task[complete] is task completed?
user_task[order_id] order id

Request

Route

POST /admin/user_tasks.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<user-task>
  <title>dispatch order N2</title>
  <description>You should dispatch the order N2</description>
  <assignee-id type="integer">1</assignee-id>
  <deadline-at type="date">2021-01-01</deadline-at>
  <order-id type="integer">1</order-id>
</user-task>

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"?>
<user-task>
  <id type="integer">6</id>
  <title>dispatch order N2</title>
  <description>You should dispatch the order N2</description>
  <assignee-id type="integer">1</assignee-id>
  <order-id type="integer">1</order-id>
  <deadline-at type="dateTime">2021-01-01T00:00:00+03:00</deadline-at>
  <complete type="boolean" nil="true"/>
  <created-at type="dateTime">2024-11-21T00:57:28+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:28+03:00</updated-at>
</user-task>

Delete user task

Endpoint

DELETE /admin/user_tasks/:user_task_id.xml

Request

Route

DELETE /admin/user_tasks/11.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 user task

Endpoint

GET /admin/user_tasks/:user_task_id.xml

Request

Route

GET /admin/user_tasks/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"?>
<user-task>
  <id type="integer">3</id>
  <title>dispatch order N1</title>
  <description>You should dispatch the order N1 till noon</description>
  <assignee-id type="integer">1</assignee-id>
  <order-id type="integer" nil="true"/>
  <deadline-at type="dateTime">2021-01-01T00:00:00+03:00</deadline-at>
  <complete type="boolean" nil="true"/>
  <created-at type="dateTime">2024-11-21T00:57:28+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:28+03:00</updated-at>
</user-task>

Get user tasks list

Endpoint

GET /admin/user_tasks.xml

Request

Route

GET /admin/user_tasks.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"?>
<user-tasks type="array">
  <user-task>
    <id type="integer">1</id>
    <title>dispatch order N1</title>
    <description>You should dispatch the order N1 till noon</description>
    <assignee-id type="integer">1</assignee-id>
    <order-id type="integer" nil="true"/>
    <deadline-at type="dateTime">2021-01-01T00:00:00+03:00</deadline-at>
    <complete type="boolean" nil="true"/>
    <created-at type="dateTime">2024-11-21T00:57:28+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:57:28+03:00</updated-at>
  </user-task>
</user-tasks>

Update user task

Endpoint

PUT /admin/user_tasks/:user_task_id.xml

Parameters

Name Description
user_task[title] user task title
user_task[description] user task position
user_task[complete] is user task completed?

Request

Route

PUT /admin/user_tasks/9.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<user-task>
  <title>new title</title>
  <description>new description</description>
  <complete type="boolean">true</complete>
</user-task>

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"?>
<user-task>
  <title>new title</title>
  <description>new description</description>
  <complete type="boolean">true</complete>
  <id type="integer">9</id>
  <assignee-id type="integer">1</assignee-id>
  <order-id type="integer" nil="true"/>
  <deadline-at type="dateTime">2021-01-01T00:00:00+03:00</deadline-at>
  <created-at type="dateTime">2024-11-21T00:57:28+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:28+03:00</updated-at>
</user-task>

Variant

Create variant

Endpoint

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

Parameters

Name Description
variant[price] required price
variant[quantity] required quantity
variant[options] options
variant[image_ids] image_ids
variant[variant_field_values_attributes] variant field values attributes

Request

Route

POST /admin/products/1/variants.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant>
  <price type="integer">100</price>
  <quantity type="integer">1</quantity>
  <options type="array">
    <option>
      <option-name-id type="integer">1</option-name-id>
      <value>Black</value>
    </option>
  </options>
  <image-ids type="array">
    <image-id type="integer">1</image-id>
    <image-id type="integer">2</image-id>
    <image-id type="integer">3</image-id>
  </image-ids>
  <variant-field-values-attributes type="array">
    <variant-field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </variant-field-values-attribute>
  </variant-field-values-attributes>
</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"?>
<variant>
  <variant-field-values type="array">
    <variant-field-value>
      <id type="integer">6</id>
      <variant-field-id type="integer">1</variant-field-id>
      <value>12345</value>
    </variant-field-value>
  </variant-field-values>
  <option-values type="array">
    <option-value>
      <id type="integer">21063165</id>
      <option-name-id type="integer">1</option-name-id>
      <position type="integer">21</position>
      <title>Black</title>
      <image-url nil="true"/>
    </option-value>
  </option-values>
  <id type="integer">509944660</id>
  <title>Black</title>
  <product-id type="integer">1</product-id>
  <sku nil="true"/>
  <barcode nil="true"/>
  <dimensions>10x20x30</dimensions>
  <available type="boolean">true</available>
  <image-ids type="array"/>
  <image-id type="integer">1</image-id>
  <weight type="decimal" nil="true"/>
  <created-at type="timestamp">2024-11-21 00:57:11 +0300</created-at>
  <updated-at type="timestamp">2024-11-21 00:57:11 +0300</updated-at>
  <quantity type="integer">1</quantity>
  <quantity-at-warehouse0>1.0</quantity-at-warehouse0>
  <cost-price type="decimal" nil="true"/>
  <cost-price-in-site-currency type="decimal" nil="true"/>
  <price-in-site-currency type="decimal">3000.0</price-in-site-currency>
  <base-price type="decimal">100.0</base-price>
  <old-price type="decimal" nil="true"/>
  <price2 type="decimal" nil="true"/>
  <price type="decimal">100.0</price>
  <base-price-in-site-currency type="decimal">3000.0</base-price-in-site-currency>
  <old-price-in-site-currency type="decimal" nil="true"/>
  <price2-in-site-currency type="decimal" nil="true"/>
  <prices type="array"/>
  <prices-in-site-currency type="array"/>
</variant>

Destroy variant

Endpoint

DELETE /admin/products/:product_id/variants/:variant_success_id.xml

Request

Route

DELETE /admin/products/1/variants/509944662.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 variant

Endpoint

GET /admin/products/:product_id/variants/:variant_id.xml

Request

Route

GET /admin/products/1/variants/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"?>
<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>
  <quantity-at-warehouse0>0.0</quantity-at-warehouse0>
  <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>

Get variants

Endpoint

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

Request

Route

GET /admin/products/1/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"?>
<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>
    <quantity-at-warehouse0>0.0</quantity-at-warehouse0>
    <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>

Update group of variants (multi warehouses case)

Endpoint

PUT /admin/products/variants_group_update.xml

Parameters

Name Description Type Items
variants Array with parameters for each variant array
variants[][id] required Id of a variant integer
variants[][quantity] Variant quantity float
variants[][cost_price] Cost price of the variant float
variants[][old_price] Old price of the variant float
variants[][cost_price] Cost price of the variant float
variants[][price] First price of the price kinds of the variant (if price kinds are enabled) float
variants[][price2] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price3] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price4] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price5] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price6] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price7] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price8] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price9] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price10] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price11] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price12] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price13] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price14] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price15] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price16] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price17] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price18] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price19] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price20] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][quantity_at_warehouses] Array of quantity at each of the warehouses. Could be replaced with quantity_at_warehousesN fields, which have higher priority array {"type"=>"float"}
variants[][quantity_at_warehouse0] Quantity at n-th warehouse float
variants[][quantity_at_warehouse1] Quantity at n-th warehouse float
variants[][quantity_at_warehouse2] Quantity at n-th warehouse float
variants[][quantity_at_warehouse3] Quantity at n-th warehouse float
variants[][quantity_at_warehouse4] Quantity at n-th warehouse float
variants[][quantity_at_warehouse5] Quantity at n-th warehouse float
variants[][quantity_at_warehouse6] Quantity at n-th warehouse float
variants[][quantity_at_warehouse7] Quantity at n-th warehouse float
variants[][quantity_at_warehouse8] Quantity at n-th warehouse float
variants[][quantity_at_warehouse9] Quantity at n-th warehouse float
variants[][quantity_at_warehouse10] Quantity at n-th warehouse float
variants[][quantity_at_warehouse11] Quantity at n-th warehouse float

Request

Route

PUT /admin/products/variants_group_update.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variants type="array">
  <variant>
    <id type="integer">1</id>
    <price type="integer">100</price>
    <quantity-at-warehouse0 type="integer">3</quantity-at-warehouse0>
    <quantity-at-warehouses type="array">
      <quantity-at-warehouse type="integer">5</quantity-at-warehouse>
      <quantity-at-warehouse type="integer">2</quantity-at-warehouse>
    </quantity-at-warehouses>
  </variant>
</variants>

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 group of variants

It’s possible to update at most 100 variants per request.

Endpoint

PUT /admin/products/variants_group_update.xml

Parameters

Name Description Type
variants Array with parameters for each variant array
variants[][id] required Id of a variant integer
variants[][quantity] Variant quantity float
variants[][cost_price] Cost price of the variant float
variants[][old_price] Old price of the variant float
variants[][cost_price] Cost price of the variant float
variants[][price] First price of the price kinds of the variant (if price kinds are enabled) float
variants[][price2] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price3] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price4] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price5] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price6] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price7] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price8] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price9] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price10] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price11] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price12] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price13] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price14] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price15] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price16] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price17] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price18] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price19] n-th price of the price kinds of the variant (if price kinds are enabled) float
variants[][price20] n-th price of the price kinds of the variant (if price kinds are enabled) float

Request

Route

PUT /admin/products/variants_group_update.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variants type="array">
  <variant>
    <id type="integer">1</id>
    <price type="integer">100</price>
    <quantity type="integer">3</quantity>
  </variant>
</variants>

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 variant

Endpoint

PUT /admin/products/:product_id/variants/:variant_id.xml

Parameters

Name Description
variant[dimensions] Length x Width x Height (Ш x Г x В)
variant[price] price
variant[quantity_at_warehouse0] quantity at warehouse with array index 0 (require multiwarehouses enabled)
variant[variant_field_values_attributes] variant field values attributes

Request

Route

PUT /admin/products/1/variants/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant>
  <price type="integer">150</price>
  <quantity-at-warehouse0 type="integer">50</quantity-at-warehouse0>
  <variant-field-values-attributes type="array">
    <variant-field-values-attribute>
      <handle>handle</handle>
      <value type="integer">12345</value>
    </variant-field-values-attribute>
  </variant-field-values-attributes>
</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"?>
<variant>
  <variant-field-values type="array">
    <variant-field-value>
      <id type="integer">1</id>
      <variant-field-id type="integer">1</variant-field-id>
      <value>12345</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">true</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">2024-11-21 00:57:12 +0300</updated-at>
  <quantity type="integer">50</quantity>
  <quantity-at-warehouse0>50.0</quantity-at-warehouse0>
  <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">4500.0</price-in-site-currency>
  <base-price type="decimal">150.0</base-price>
  <old-price type="decimal" nil="true"/>
  <price2 type="decimal">12.0</price2>
  <price type="decimal">150.0</price>
  <base-price-in-site-currency type="decimal">4500.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>

VariantField

Create variant_field

Endpoint

POST /admin/variant_fields.xml

Parameters

Name Description
variant_field[title] required title
variant_field[handle] required handle used in liquid
variant_field[type] required VariantField::TextArea - textarea, VariantField::TextField - textfield
variant_field[position] position in variant_fields list
variant_field[is_hidden] boolean

Request

Route

POST /admin/variant_fields.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field>
  <title>Size</title>
  <handle>size</handle>
  <type>VariantField::TextArea</type>
</variant-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"?>
<variant-field>
  <id type="integer">4</id>
  <application-id type="integer">1</application-id>
  <type>VariantField::TextArea</type>
  <handle>size</handle>
  <position type="integer">3</position>
  <is-hidden type="boolean" nil="true"/>
  <title>Size</title>
</variant-field>

Destroy variant_field by handle

Endpoint

DELETE /admin/variant_fields/:variant_field_handle.xml

Request

Route

DELETE /admin/variant_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 variant_field

Endpoint

DELETE /admin/variant_fields/:variant_field_id.xml

Request

Route

DELETE /admin/variant_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 variant_field by handle

Endpoint

GET /admin/variant_fields/:variant_field_handle.xml

Request

Route

GET /admin/variant_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"?>
<variant-field>
  <id type="integer">2</id>
  <application-id type="integer">1</application-id>
  <type>VariantField::TextArea</type>
  <handle>handle2</handle>
  <position type="integer">2</position>
  <is-hidden type="boolean" nil="true"/>
  <title>title2</title>
</variant-field>

Get variant_field

Endpoint

GET /admin/variant_fields/:variant_field_id.xml

Request

Route

GET /admin/variant_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"?>
<variant-field>
  <id type="integer">2</id>
  <application-id type="integer">1</application-id>
  <type>VariantField::TextArea</type>
  <handle>handle2</handle>
  <position type="integer">2</position>
  <is-hidden type="boolean" nil="true"/>
  <title>title2</title>
</variant-field>

Get variant_fields

Endpoint

GET /admin/variant_fields.xml

Request

Route

GET /admin/variant_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"?>
<objects type="array">
  <variant-field>
    <id type="integer">1</id>
    <application-id type="integer" nil="true"/>
    <type>VariantField::TextField</type>
    <handle>handle</handle>
    <position type="integer">1</position>
    <is-hidden type="boolean" nil="true"/>
    <title>title</title>
  </variant-field>
  <variant-field>
    <id type="integer">2</id>
    <application-id type="integer">1</application-id>
    <type>VariantField::TextArea</type>
    <handle>handle2</handle>
    <position type="integer">2</position>
    <is-hidden type="boolean" nil="true"/>
    <title>title2</title>
  </variant-field>
</objects>

Update variant_field by handle

Endpoint

PUT /admin/variant_fields/:variant_field_handle.xml

Parameters

Name Description Method
variant_field[title] title
variant_field[handle] handle used in liquid new_handle
variant_field[position] position in variant_fields list
variant_field[is_hidden] boolean

Request

Route

PUT /admin/variant_fields/handle2.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field>
  <title>Volume</title>
  <position type="integer">2</position>
</variant-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"?>
<variant-field>
  <position type="integer">2</position>
  <id type="integer">2</id>
  <application-id type="integer">1</application-id>
  <type>VariantField::TextArea</type>
  <handle>handle2</handle>
  <is-hidden type="boolean" nil="true"/>
  <title>Volume</title>
</variant-field>

Update variant_field

Endpoint

PUT /admin/variant_fields/:variant_field_id.xml

Parameters

Name Description
variant_field[title] title
variant_field[handle] handle used in liquid
variant_field[position] position in variant_fields list
variant_field[is_hidden] boolean

Request

Route

PUT /admin/variant_fields/2.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field>
  <title>Volume</title>
  <handle>volume</handle>
  <position type="integer">2</position>
</variant-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"?>
<variant-field>
  <handle>volume</handle>
  <position type="integer">2</position>
  <id type="integer">2</id>
  <application-id type="integer">1</application-id>
  <type>VariantField::TextArea</type>
  <is-hidden type="boolean" nil="true"/>
  <title>Volume</title>
</variant-field>

VariantFieldValue

Create variant_field_value by handle

Endpoint

POST /admin/variants/:variant_id/variant_field_values.xml

Parameters

Name Description
variant_field_value[variant_field_handle] required variant field handle
variant_field_value[value] variant field value

Request

Route

POST /admin/variants/1/variant_field_values.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field-value>
  <variant-field-handle>handle2</variant-field-handle>
  <value>test value</value>
</variant-field-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"?>
<variant-field-value>
  <id type="integer">4</id>
  <variant-field-id type="integer">2</variant-field-id>
  <value>test value</value>
</variant-field-value>

Create variant_field_value

Endpoint

POST /admin/variants/:variant_id/variant_field_values.xml

Parameters

Name Description
variant_field_value[variant_field_id] required variant field id
variant_field_value[value] variant field value

Request

Route

POST /admin/variants/1/variant_field_values.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field-value>
  <variant-field-id type="integer">2</variant-field-id>
  <value>test value</value>
</variant-field-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"?>
<variant-field-value>
  <id type="integer">2</id>
  <variant-field-id type="integer">2</variant-field-id>
  <value>test value</value>
</variant-field-value>

Destroy variant_field_value by handle

Endpoint

DELETE /admin/variants/:variant_id/variant_field_values/:variant_field_handle.xml

Request

Route

DELETE /admin/variants/1/variant_field_values/handle.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 variant_field_value

Endpoint

DELETE /admin/variants/:variant_id/variant_field_values/:variant_field_value_id.xml

Request

Route

DELETE /admin/variants/1/variant_field_values/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 variant_field_value by handle

Endpoint

GET /admin/variants/:variant_id/variant_field_values/:variant_field_handle.xml

Request

Route

GET /admin/variants/1/variant_field_values/handle.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"?>
<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>

Get variant_field_value

Endpoint

GET /admin/variants/:variant_id/variant_field_values/:variant_field_value_id.xml

Request

Route

GET /admin/variants/1/variant_field_values/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"?>
<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>

Get variant_field_values

Endpoint

GET /admin/variants/:variant_id/variant_field_values.xml

Request

Route

GET /admin/variants/1/variant_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"?>
<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>

Update variant_field_value by handle

Endpoint

PUT /admin/variants/:variant_id/variant_field_values/:variant_field_handle.xml

Parameters

Name Description
variant_field_value[value] variant field value

Request

Route

PUT /admin/variants/1/variant_field_values/handle.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field-value>
  <value>new value</value>
</variant-field-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"?>
<variant-field-value>
  <id type="integer">1</id>
  <variant-field-id type="integer">1</variant-field-id>
  <value>new value</value>
</variant-field-value>

Update variant_field_value

Endpoint

PUT /admin/variants/:variant_id/variant_field_values/:variant_field_value_id.xml

Parameters

Name Description
variant_field_value[value] variant field value

Request

Route

PUT /admin/variants/1/variant_field_values/1.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant-field-value>
  <value>new value</value>
</variant-field-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"?>
<variant-field-value>
  <id type="integer">1</id>
  <variant-field-id type="integer">1</variant-field-id>
  <value>new value</value>
</variant-field-value>

Warehouse

Create warehouse

Endpoint

POST /admin/warehouses.xml

Parameters

Name Description
warehouse[title] required warehouse title
warehouse[position] warehouse position (1 - main priority)

Request

Route

POST /admin/warehouses.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<warehouse>
  <title>secondary</title>
  <position type="integer">2</position>
</warehouse>

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"?>
<warehouse>
  <id type="integer">86</id>
  <title>secondary</title>
  <position type="integer">2</position>
  <array-index type="integer">1</array-index>
  <created-at type="dateTime">2024-11-21T00:57:29+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:29+03:00</updated-at>
  <status>creating</status>
</warehouse>

Delete warehouse

Endpoint

DELETE /admin/warehouses/:warehouse_id.xml

Request

Route

DELETE /admin/warehouses/91.xml

Headers

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

Response

Simulated Response

Status

202

Headers

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

Get warehouse

Endpoint

GET /admin/warehouses/:warehouse_id.xml

Request

Route

GET /admin/warehouses/83.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"?>
<warehouse>
  <id type="integer">83</id>
  <title>main</title>
  <position type="integer">1</position>
  <array-index type="integer">0</array-index>
  <created-at type="dateTime">2024-11-21T00:57:29+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:29+03:00</updated-at>
  <status>creating</status>
</warehouse>

Get warehouses list

Endpoint

GET /admin/warehouses.xml

Request

Route

GET /admin/warehouses.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"?>
<warehouses type="array">
  <warehouse>
    <id type="integer">81</id>
    <title>main</title>
    <position type="integer">1</position>
    <array-index type="integer">0</array-index>
    <created-at type="dateTime">2024-11-21T00:57:28+03:00</created-at>
    <updated-at type="dateTime">2024-11-21T00:57:28+03:00</updated-at>
    <status>creating</status>
  </warehouse>
</warehouses>

Update warehouse

Endpoint

PUT /admin/warehouses/:warehouse_id.xml

Parameters

Name Description
warehouse[title] warehouse title
warehouse[position] warehouse position

Request

Route

PUT /admin/warehouses/89.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<warehouse>
  <title>new title</title>
  <position type="integer">2</position>
</warehouse>

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"?>
<warehouse>
  <title>new title</title>
  <position type="integer">2</position>
  <id type="integer">89</id>
  <array-index type="integer">0</array-index>
  <created-at type="dateTime">2024-11-21T00:57:29+03:00</created-at>
  <updated-at type="dateTime">2024-11-21T00:57:29+03:00</updated-at>
  <status>creating</status>
</warehouse>

Webhook

Create webhook

Endpoint

POST /admin/webhooks.xml

Parameters

Name Description
webhook[address] required address
webhook[topic] required Topics: 'orders/create', 'orders/update', 'orders/destroy', 'products/create', 'products/update', 'client/create', 'client/update'
webhook[format_type] format of data sent by webhook: 'json' or 'xml'
webhook[warehouse_id] For 'orders/create', 'orders/update', 'orders/destroy' topics only, filters sent orders by warehouse
webhook[sales_channel_id] For 'products/update' topic only, filters sent products by sales channel
webhook[batch_size] For 'products/create', 'products/update' topics only, products are sent in batches, default value: 10

Request

Route

POST /admin/webhooks.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<webhook>
  <address>http://application.com/orders/create</address>
  <topic>orders/create</topic>
  <format-type>json</format-type>
</webhook>

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"?>
<webhook>
  <id type="integer">11</id>
  <address>http://application.com/orders/create</address>
  <topic>orders/create</topic>
  <created-at type="dateTime">2024-11-21T00:56:20+03:00</created-at>
  <format-type>json</format-type>
  <warehouse-id nil="true"/>
  <sales-channel-id nil="true"/>
  <batch-size nil="true"/>
</webhook>

Destroy webhook

Endpoint

DELETE /admin/webhooks/:webhook_id.xml

Request

Route

DELETE /admin/webhooks/16.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 webhook

Endpoint

GET /admin/webhooks/:webhook_id.xml

Request

Route

GET /admin/webhooks/8.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"?>
<webhook>
  <id type="integer">8</id>
  <address>http://app.ru/orders/create</address>
  <topic>orders/create</topic>
  <created-at type="dateTime">2024-11-21T00:56:20+03:00</created-at>
  <format-type>xml</format-type>
  <warehouse-id nil="true"/>
  <sales-channel-id nil="true"/>
  <batch-size nil="true"/>
</webhook>

Get webhooks

Endpoint

GET /admin/webhooks.xml

Request

Route

GET /admin/webhooks.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"?>
<webhooks type="array">
  <webhook>
    <id type="integer">1</id>
    <address>https://webhook.site/4f4dd3e6-46d8-403f-8a3e-4fb0b1f108a0</address>
    <topic>products/update</topic>
    <created-at type="dateTime">2022-05-05T20:37:45+03:00</created-at>
    <format-type>json</format-type>
    <warehouse-id nil="true"/>
    <sales-channel-id nil="true"/>
    <batch-size type="integer">5</batch-size>
  </webhook>
  <webhook>
    <id type="integer">3</id>
    <address>https://webhook.site/4f4dd3e6-46d8-403f-8a3e-4fb0b1f108a0</address>
    <topic>products/create</topic>
    <created-at type="dateTime">2022-05-05T20:37:45+03:00</created-at>
    <format-type>json</format-type>
    <warehouse-id nil="true"/>
    <sales-channel-id nil="true"/>
    <batch-size type="integer">5</batch-size>
  </webhook>
  <webhook>
    <id type="integer">4</id>
    <address>https://webhook.site/4f4dd3e6-46d8-403f-8a3e-4fb0b1f108a0</address>
    <topic>client/update</topic>
    <created-at type="dateTime">2022-05-05T20:37:45+03:00</created-at>
    <format-type>json</format-type>
    <warehouse-id nil="true"/>
    <sales-channel-id nil="true"/>
    <batch-size nil="true"/>
  </webhook>
  <webhook>
    <id type="integer">5</id>
    <address>https://webhook.site/4f4dd3e6-46d8-403f-8a3e-4fb0b1f108a0</address>
    <topic>client/create</topic>
    <created-at type="dateTime">2022-05-05T20:37:45+03:00</created-at>
    <format-type>json</format-type>
    <warehouse-id nil="true"/>
    <sales-channel-id nil="true"/>
    <batch-size nil="true"/>
  </webhook>
  <webhook>
    <id type="integer">6</id>
    <address>http://app.ru/orders/create</address>
    <topic>orders/create</topic>
    <created-at type="dateTime">2024-11-21T00:56:19+03:00</created-at>
    <format-type>xml</format-type>
    <warehouse-id nil="true"/>
    <sales-channel-id nil="true"/>
    <batch-size nil="true"/>
  </webhook>
</webhooks>

Update webhook

Endpoint

PUT /admin/webhooks/:webhook_id.xml

Parameters

Name Description
webhook[address] address
webhook[topic] Topics: 'orders/create', 'orders/update', 'orders/destroy', 'products/create', 'products/update', 'client/create', 'client/update'
webhook[format_type] format of data sent by webhook: json or xml
webhook[warehouse_id] For 'orders/create', 'orders/update', 'orders/destroy' topics only, filters sent orders by warehouse
webhook[sales_channel_id] For 'products/update' topic only, filters sent products by sales channel
webhook[batch_size] For 'products/create', 'products/update' topics only, products are sent in batches, default value: 10

Request

Route

PUT /admin/webhooks/14.xml

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<webhook>
  <format-type>xml</format-type>
</webhook>

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"?>
<webhook>
  <id type="integer">14</id>
  <address>http://app.ru/orders/create</address>
  <topic>orders/create</topic>
  <created-at type="dateTime">2024-11-21T00:56:20+03:00</created-at>
  <format-type>xml</format-type>
  <warehouse-id nil="true"/>
  <sales-channel-id nil="true"/>
  <batch-size nil="true"/>
</webhook>