InSales API documentation

Account

Get account

Request

Route

GET admin/account.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<account>
  <blocked type="boolean">false</blocked>
  <city nil="true"/>
  <contact-phone nil="true"/>
  <country nil="true"/>
  <enable-cart-discounts type="boolean">false</enable-cart-discounts>
  <enable-client-discounts type="boolean">false</enable-client-discounts>
  <enable-group-discounts type="boolean">false</enable-group-discounts>
  <enable-order-discounts type="boolean">false</enable-order-discounts>
  <hide-items-out-of-stock type="boolean">false</hide-items-out-of-stock>
  <id type="integer">1</id>
  <notification-email nil="true"/>
  <organization>InSales, ltd</organization>
  <sms-notification-phone nil="true"/>
  <state nil="true"/>
  <subdomain>quentin</subdomain>
  <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.mylocalhost.localdomain:3000</main-host>
  <next-order-number type="integer">1006</next-order-number>
  <time-zone nil="true"/>
  <owner>
    <created-at type="timestamp">2016-04-16 14:52:35 +0300</created-at>
    <email>quentin@example.com</email>
    <id type="integer">1</id>
    <name>quentin</name>
  </owner>
</account>

Update account

Parameters

Name Description
account[title] shop title
account[phone] phone on site
account[email] email on site
account[icq] icq on site
account[contact_phone] phone for busines contacts, not displayed on site
account[sms_notification_phone] phone for sms notifications, not displayed on site
account[organization] organization name
account[country] country
account[city] city
account[state] region
subdomain[subdomain] subdomain
account[notification_email] emails for nitifications

Request

Route

PUT /admin/account.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<account>
  <title>NEW SHOP TITLE</title>
  <phone>8(912) 345-78-91</phone>
  <email>mynewemail@mydomain.com</email>
  <icq>98798755</icq>
  <contact-phone>+7(926)345-67-89</contact-phone>
  <sms-notification-phone>+7(926)345-67-89</sms-notification-phone>
  <organization>new organization name</organization>
  <country>RU</country>
  <city>London</city>
  <state>Vermont</state>
  <notification-email>new_notif_email1@gmail.com,new_notif_email2@gmail.com</notification-email>
</account>

Response

Status

200

Headers

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

Body

 

ApplicationCharge

Create application_charge

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <created-at type="datetime">2016-08-22T17:19:37+03:00</created-at>
  <id type="integer">140</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>
  <status>pending</status>
  <test type="boolean">true</test>
  <updated-at type="datetime">2016-08-22T17:19:37+03:00</updated-at>
  <confirmation-url>http://quentin.mylocalhost.localdomain:3000/admin/application_charges/140</confirmation-url>
</application-charge>

Decline application_charge

Only bill with status 'pending' can be declined.

Request

Route

POST /admin/application_charges/143/decline.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <created-at type="datetime">2016-08-22T17:19:37+03:00</created-at>
  <id type="integer">143</id>
  <name>Pay</name>
  <price type="decimal">180.0</price>
  <return-url>http://applicaiton.my/check_payment_url/%id_in_my_application%</return-url>
  <status>declined</status>
  <test type="boolean" nil="true"/>
  <updated-at type="datetime">2016-08-22T17:19:37+03:00</updated-at>
  <confirmation-url>http://quentin.mylocalhost.localdomain:3000/admin/invoices/121</confirmation-url>
</application-charge>

Get application_charge

Request

Route

GET /admin/application_charges/137.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charge>
  <created-at type="datetime">2016-08-22T17:19:37+03:00</created-at>
  <id type="integer">137</id>
  <name>Pay</name>
  <price type="decimal">180.0</price>
  <return-url>http://applicaiton.my/check_payment_url/%id_in_my_application%</return-url>
  <status>pending</status>
  <test type="boolean" nil="true"/>
  <updated-at type="datetime">2016-08-22T17:19:37+03:00</updated-at>
  <confirmation-url>http://quentin.mylocalhost.localdomain:3000/admin/invoices/117</confirmation-url>
</application-charge>

Get application_charges

Request

Route

GET /admin/application_charges.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-charges type="array">
  <application-charge>
    <created-at type="datetime">2016-08-22T17:19:35+03:00</created-at>
    <id type="integer">135</id>
    <name>Pay</name>
    <price type="decimal">180.0</price>
    <return-url>http://applicaiton.my/check_payment_url/%id_in_my_application%</return-url>
    <status>pending</status>
    <test type="boolean" nil="true"/>
    <updated-at type="datetime">2016-08-22T17:19:35+03:00</updated-at>
    <confirmation-url>http://quentin.mylocalhost.localdomain:3000/admin/invoices/115</confirmation-url>
  </application-charge>
</application-charges>

ApplicationWidget

Create application_widget

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <code>some html or javascript code</code>
  <created-at type="datetime">2016-08-11T18:55:32+03:00</created-at>
  <height type="integer">70</height>
  <id type="integer">66</id>
  <page-type>order</page-type>
</application-widget>

Destroy application_widget

Request

Route

DELETE /admin/application_widgets/71.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get application_widget

Request

Route

GET /admin/application_widgets/63.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <code>html/js code</code>
  <created-at type="datetime">2016-08-11T18:55:32+03:00</created-at>
  <height type="integer">50</height>
  <id type="integer">63</id>
  <page-type>product</page-type>
</application-widget>

Get application_widgets

Request

Route

GET /admin/application_widgets.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widgets type="array">
  <application-widget>
    <code>html/js code</code>
    <created-at type="datetime">2016-08-11T18:55:31+03:00</created-at>
    <height type="integer">50</height>
    <id type="integer">61</id>
    <page-type>product</page-type>
  </application-widget>
</application-widgets>

Update application_widget

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/69.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<application-widget>
  <code>code changed</code>
  <created-at type="datetime">2016-08-11T18:55:32+03:00</created-at>
  <height type="integer">80</height>
  <id type="integer">69</id>
  <page-type>order</page-type>
</application-widget>

Article

Create article

Parameters

Name Description
article[title] required article title
article[content] required 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[created_at] publication date
article[image] image for article

Request

Route

POST /admin/blogs/1/articles.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
  <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>
  <created-at>2014-09-09</created-at>
</article>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <created-at type="timestamp">2014-09-09 00:00:00 +0400</created-at>
  <id type="integer">4</id>
  <updated-at type="timestamp">2016-04-21 14:53:13 +0300</updated-at>
  <title>new article</title>
  <content>&lt;p&gt;content of my article&lt;p&gt;</content>
  <notice>some notice</notice>
  <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>
    <created-at type="timestamp">2016-04-21 14:53:13 +0300</created-at>
    <id type="integer">2</id>
    <original-url>/images/no_image_original.jpg</original-url>
  </image>
</article>

Delete article

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Content-Type: application/x-www-form-urlencoded

Response

Status

200

Headers

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

Body

 

Get article

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
  <id type="integer">2</id>
  <updated-at type="timestamp">2016-04-07 10:50:32 +0300</updated-at>
  <title>Второая Статья</title>
  <content>Привет</content>
  <notice>Второй анонс</notice>
  <author>Ivan</author>
  <permalink>статья-2</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <image>
    <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
    <id type="integer">1</id>
    <original-url>/images/articles/1/1/1/article_image_1.jpg</original-url>
  </image>
</article>

Get articles list

Request

Route

GET /admin/blogs/1/articles.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<articles type="array">
  <article>
    <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
    <id type="integer">1</id>
    <updated-at type="timestamp">2016-04-07 10:50:32 +0300</updated-at>
    <title>Статья</title>
    <content>Первая статья</content>
    <notice>Первый анонс</notice>
    <author nil="true"/>
    <permalink>статья</permalink>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
  </article>
  <article>
    <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
    <id type="integer">2</id>
    <updated-at type="timestamp">2016-04-07 10:50:32 +0300</updated-at>
    <title>Второая Статья</title>
    <content>Привет</content>
    <notice>Второй анонс</notice>
    <author>Ivan</author>
    <permalink>статья-2</permalink>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <image>
      <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
      <id type="integer">1</id>
      <original-url>/images/articles/1/1/1/article_image_1.jpg</original-url>
    </image>
  </article>
</articles>

Update article

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[created_at] publication date
article[image] image for article

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<article>
  <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
  <id type="integer">2</id>
  <updated-at type="timestamp">2016-04-21 14:53:13 +0300</updated-at>
  <title>new title</title>
  <content>Привет</content>
  <notice>Второй анонс</notice>
  <author>Ivan</author>
  <permalink>статья-2</permalink>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <image>
    <created-at type="timestamp">2016-04-07 10:50:32 +0300</created-at>
    <id type="integer">1</id>
    <original-url>/images/articles/1/1/1/article_image_1.jpg</original-url>
  </image>
</article>

Asset

Create asset from attachment

Parameters

Name Description
asset[name] required name for asset
asset[type] required Asset::Media
asset[attachment] required content of asset encoded in Base64

Request

Route

POST /admin/themes/1/assets.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <name>logo.png</name>
  <type>Asset::Media</type>
  <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>
</asset>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <id type="integer">820</id>
  <theme-id type="integer">1</theme-id>
  <type>Asset::Media</type>
  <name>logo.png</name>
  <content-type>image/jpeg</content-type>
  <file-size type="integer">2819</file-size>
  <asset-url>/assets/1/1/1/logo.png?1471865953</asset-url>
</asset>

Create asset from url

Parameters

Name Description
asset[name] name for asset, the name of original file is used unless specified
asset[type] required Asset::Media
asset[src] required asset url

Request

Route

POST /admin/themes/1/assets.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <type>Asset::Media</type>
  <src>https://assets3.insales.ru/assets/1/161/647329/v_1467875760/build/slide4.jpg</src>
</asset>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <id type="integer">816</id>
  <theme-id type="integer">1</theme-id>
  <type>Asset::Media</type>
  <name>slide4.jpg</name>
  <content-type>image/jpeg</content-type>
  <file-size type="integer">45502</file-size>
  <asset-url>/assets/1/1/1/slide4.jpg?1471865952</asset-url>
</asset>

Create text asset

Parameters

Name Description
asset[name] required name for asset, it is possibe to set up a category for a template by adding category name at the start of a template name; example: 'product.my_template.liquid'; available categories: layouts.layout, index, collection, product, cart, page, search, blog, article, page_404, compare, layouts.checkout, layouts, account.orders, order, order_missing
asset[type] required Asset::Template
asset[content] required text content

Request

Route

POST /admin/themes/1/assets.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <name>product.my_template.liquid</name>
  <type>Asset::Template</type>
  <content>![CDATA[template for product {{product.title}}]]</content>
</asset>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <id type="integer">812</id>
  <theme-id type="integer">1</theme-id>
  <type>Asset::Template</type>
  <name>product.my_template.liquid</name>
  <content-type>text/x-liquid</content-type>
  <file-size type="integer">48</file-size>
</asset>

Destroy asset

Request

Route

DELETE /admin/themes/1/assets/827.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get asset

For images response is with fields 'attachment' - content of image fileencoded in Base64. For text files there is the field 'content'.

Request

Route

GET /admin/themes/1/assets/809.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <id type="integer">809</id>
  <theme-id type="integer">1</theme-id>
  <type>Asset::Template</type>
  <name>accounts.tmplt.liquid</name>
  <content-type>text/x-liquid</content-type>
  <file-size type="integer">4</file-size>
  <content>text</content>
</asset>

Get assets

Request

Route

GET /admin/themes/1/assets.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<assets type="array">
  <asset>
    <id type="integer">1</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Media</type>
    <name>thumb_prayerbeads.jpg</name>
    <content-type>image/jpeg</content-type>
    <file-size type="integer">28598</file-size>
    <asset-url>/assets/1/1/1/thumb_prayerbeads.jpg</asset-url>
  </asset>
  <asset>
    <id type="integer">2</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Media</type>
    <name>thumb_prints.jpg</name>
    <content-type>image/jpeg</content-type>
    <file-size type="integer">9290</file-size>
    <asset-url>/assets/1/1/1/thumb_prints.jpg</asset-url>
  </asset>
  <asset>
    <id type="integer">3</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Media</type>
    <name>thumb_resource.jpg</name>
    <content-type>image/jpeg</content-type>
    <file-size type="integer">7528</file-size>
    <asset-url>/assets/1/1/1/thumb_resource.jpg</asset-url>
  </asset>
  <asset>
    <id type="integer">4</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Media</type>
    <name>thumb_t-shirts2.jpg</name>
    <content-type>image/jpeg</content-type>
    <file-size type="integer">14697</file-size>
    <asset-url>/assets/1/1/1/thumb_t-shirts2.jpg</asset-url>
  </asset>
  <asset>
    <id type="integer">5</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Media</type>
    <name>view-checkout.jpg</name>
    <content-type>image/jpeg</content-type>
    <file-size type="integer">1500</file-size>
    <asset-url>/assets/1/1/1/view-checkout.jpg</asset-url>
  </asset>
  <asset>
    <id type="integer">6</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Media</type>
    <name>icq.png</name>
    <content-type>image/png</content-type>
    <file-size type="integer">1390</file-size>
    <asset-url>/assets/1/1/1/icq.png</asset-url>
  </asset>
  <asset>
    <id type="integer">807</id>
    <theme-id type="integer">1</theme-id>
    <type>Asset::Template</type>
    <name>accounts.tmplt.liquid</name>
    <content-type>text/x-liquid</content-type>
    <file-size type="integer">4</file-size>
  </asset>
</assets>

Rename asset

Parameters

Name Description
asset[new_name] content for text asset

Request

Route

PUT /admin/themes/1/assets/825/rename.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <new-name>account.orders.tmplt.liquid</new-name>
</asset>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <id type="integer">825</id>
  <theme-id type="integer">1</theme-id>
  <type>Asset::Template</type>
  <name>account.orders.tmplt.liquid</name>
  <content-type>text/x-liquid</content-type>
  <file-size type="integer">4</file-size>
</asset>

Update asset

Parameters

Name Description
asset[content] content for text asset

Request

Route

PUT /admin/themes/1/assets/823.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <content>new content</content>
</asset>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<asset>
  <id type="integer">823</id>
  <theme-id type="integer">1</theme-id>
  <type>Asset::Template</type>
  <name>accounts.tmplt.liquid</name>
  <content-type>text/x-liquid</content-type>
  <file-size type="integer">11</file-size>
</asset>

Blog

Create blog

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<blog>
  <captcha-enabled type="boolean">false</captcha-enabled>
  <commentable>no</commentable>
  <disallow-links-in-comments type="boolean">false</disallow-links-in-comments>
  <id type="integer">16</id>
  <notify-about-comment type="boolean">true</notify-about-comment>
  <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>

Destroy blog

Request

Route

DELETE /admin/blogs/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get blog

Request

Route

GET /admin/blogs/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get blogs

Request

Route

GET /admin/blogs.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Update blog

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

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

BonusSystemTransaction

Create transaction for client

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transaction>
  <bonus-points type="integer">100</bonus-points>
  <client-id type="integer">2</client-id>
  <bonus-system-id type="integer">1415</bonus-system-id>
  <initiator-type>ApplicationPassword</initiator-type>
  <initiator-id type="integer">1</initiator-id>
  <description>compliment</description>
  <status>charged</status>
</bonus-system-transaction>

Get transaction for client

Request

Route

GET /admin/bonus_system_transactions/1739.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transaction>
  <bonus-points type="integer">100</bonus-points>
  <client-id type="integer">2</client-id>
  <bonus-system-id type="integer">1413</bonus-system-id>
  <initiator-type>Order</initiator-type>
  <initiator-id type="integer">1</initiator-id>
  <description>test</description>
  <status>charged</status>
</bonus-system-transaction>

Get transactions for client

Request

Route

GET /admin/clients/2/bonus_system_transactions.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<bonus-system-transactions type="array">
  <bonus-system-transaction>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">2</client-id>
    <bonus-system-id type="integer">1411</bonus-system-id>
    <initiator-type>User</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>test</description>
    <status>charged</status>
  </bonus-system-transaction>
  <bonus-system-transaction>
    <bonus-points type="integer">100</bonus-points>
    <client-id type="integer">2</client-id>
    <bonus-system-id type="integer">1411</bonus-system-id>
    <initiator-type>Order</initiator-type>
    <initiator-id type="integer">1</initiator-id>
    <description>test</description>
    <status>charged</status>
  </bonus-system-transaction>
</bonus-system-transactions>

Category

Create category

Parameters

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

Request

Route

POST /admin/categories.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <created-at type="timestamp">2016-07-08 09:57:16 +0300</created-at>
  <id type="integer">25</id>
  <parent-id type="integer">1</parent-id>
  <position type="integer">1</position>
  <title>Reebok</title>
  <updated-at type="timestamp">2016-07-08 09:57:16 +0300</updated-at>
</category>

Destroy category

Request

Route

DELETE /admin/categories/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get categories

Request

Route

GET /admin/categories.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get category

Request

Route

GET /admin/categories/6.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <created-at type="timestamp">2016-07-04 15:44:45 +0300</created-at>
  <id type="integer">6</id>
  <parent-id type="integer">1</parent-id>
  <position type="integer">0</position>
  <title>T-shirts</title>
  <updated-at type="timestamp">2016-07-04 15:44:45 +0300</updated-at>
</category>

Update category

Parameters

Name Description
category[title] title

Request

Route

PUT /admin/categories/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<category>
  <created-at type="timestamp">2016-07-04 15:44:45 +0300</created-at>
  <id type="integer">6</id>
  <parent-id type="integer">1</parent-id>
  <position type="integer">0</position>
  <title>Adidas</title>
  <updated-at type="timestamp">2016-07-08 09:57:17 +0300</updated-at>
</category>

Characteristic

Create characteristic

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

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

Destroy characteristic

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get characteristic

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get characteristics

Request

Route

GET /admin/properties/3/characteristics.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Update characteristic

Parameters

Name Description
characteristic[title] title

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<characteristic>
  <id type="integer">7</id>
  <position type="integer">1</position>
  <property-id type="integer">3</property-id>
  <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.

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[bonus_points] bonus points quantity
client[progressive_discount] progressive discount
client[group_discount] group discount
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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
  <type>Client::Individual</type>
  <fields-values-attributes type="array">
    <fields-values-attribute>
      <field-id type="integer">138</field-id>
      <value>text</value>
    </fields-values-attribute>
  </fields-values-attributes>
</client>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<individual>
  <bonus-points type="integer">0</bonus-points>
  <client-group-id type="integer">1</client-group-id>
  <correspondent-account nil="true"/>
  <created-at type="timestamp">2016-07-28 12:44:11 +0300</created-at>
  <email>test@example.com</email>
  <id type="integer">265</id>
  <ip-addr nil="true"/>
  <middlename>Ivanovich</middlename>
  <name>Ivan</name>
  <phone nil="true"/>
  <registered type="boolean">true</registered>
  <settlement-account nil="true"/>
  <subscribe type="boolean">true</subscribe>
  <surname>Ivanov</surname>
  <type>Client::Individual</type>
  <updated-at type="timestamp">2016-07-28 12:44:11 +0300</updated-at>
  <progressive-discount nil="true"/>
  <group-discount type="decimal">25.0</group-discount>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <created-at type="datetime">2016-07-28T12:44:11+03:00</created-at>
      <field-id type="integer">138</field-id>
      <id type="integer">109</id>
      <updated-at type="datetime">2016-07-28T12:44:11+03:00</updated-at>
      <value>text</value>
      <type type="NilClass">Текст</type>
      <name type="NilClass">special</name>
    </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.

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[bonus_points] bonus points quantity
client[progressive_discount] progressive discount
client[group_discount] group discount
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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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">140</field-id>
      <value>text_value</value>
    </fields-values-attribute>
  </fields-values-attributes>
</client>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<juridical>
  <bank-name nil="true"/>
  <bik type="integer">123456789</bik>
  <bonus-points type="integer">0</bonus-points>
  <client-group-id type="integer" nil="true"/>
  <correspondent-account nil="true"/>
  <created-at type="timestamp">2016-07-28 12:44:11 +0300</created-at>
  <email nil="true"/>
  <id type="integer">267</id>
  <inn type="integer">1234567890</inn>
  <ip-addr nil="true"/>
  <juridical-address>123456, Moscow, Novaya st., 1, 222</juridical-address>
  <kpp type="integer">123456789</kpp>
  <name>OOO 'Company'</name>
  <ogrn nil="true"/>
  <okpo nil="true"/>
  <phone nil="true"/>
  <registered type="boolean">false</registered>
  <settlement-account nil="true"/>
  <subscribe type="boolean">true</subscribe>
  <type>Client::Juridical</type>
  <updated-at type="timestamp">2016-07-28 12:44:11 +0300</updated-at>
  <progressive-discount nil="true"/>
  <group-discount nil="true"/>
  <fields-values type="array">
    <fields-value type="FieldValue">
      <created-at type="datetime">2016-07-28T12:44:11+03:00</created-at>
      <field-id type="integer">140</field-id>
      <id type="integer">111</id>
      <updated-at type="datetime">2016-07-28T12:44:11+03:00</updated-at>
      <value>text_value</value>
      <type type="NilClass">Текст</type>
      <name type="NilClass">field_juridical</name>
    </fields-value>
  </fields-values>
</juridical>

Destroy client

Request

Route

DELETE /admin/clients/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get client

Request

Route

GET /admin/clients/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<individual>
  <bonus-points type="integer">0</bonus-points>
  <client-group-id type="integer" nil="true"/>
  <correspondent-account nil="true"/>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <email>some-one@yandex.ru</email>
  <id type="integer">2</id>
  <ip-addr nil="true"/>
  <middlename nil="true"/>
  <name>Mortimer Hant</name>
  <phone>+7(916)212-85-06</phone>
  <registered type="boolean">false</registered>
  <settlement-account nil="true"/>
  <subscribe type="boolean">true</subscribe>
  <surname nil="true"/>
  <type>Client::Individual</type>
  <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
  <progressive-discount nil="true"/>
  <group-discount nil="true"/>
  <fields-values type="array"/>
</individual>

Get clients

Parameters

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

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Query Parameters

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<clients type="array">
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <correspondent-account nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <ip-addr nil="true"/>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <settlement-account nil="true"/>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <type>Client::Individual</type>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <fields-values type="array"/>
  </client>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer">1</client-group-id>
    <correspondent-account nil="true"/>
    <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
    <email>some-one2@yandex.ru</email>
    <id type="integer">3</id>
    <ip-addr nil="true"/>
    <middlename nil="true"/>
    <name>Just Man</name>
    <phone>+7(926)111-22-33</phone>
    <registered type="boolean">false</registered>
    <settlement-account nil="true"/>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <type>Client::Individual</type>
    <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
    <progressive-discount nil="true"/>
    <group-discount type="decimal">25.0</group-discount>
    <fields-values type="array"/>
  </client>
</clients>

Update client

Parameters

Name Description
client[name] name
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[bonus_points] bonus points quantity
client[progressive_discount] progressive discount
client[group_discount] group discount
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] fields values array
client[skip_send_mail] set it true to skip sending email confirmation

Request

Route

PUT /admin/clients/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</client>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<individual>
  <bonus-points type="integer">0</bonus-points>
  <client-group-id type="integer" nil="true"/>
  <correspondent-account nil="true"/>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <email>some-one@yandex.ru</email>
  <id type="integer">2</id>
  <ip-addr nil="true"/>
  <middlename nil="true"/>
  <name>Mortimer Hant</name>
  <phone>+79162128506</phone>
  <registered type="boolean">false</registered>
  <settlement-account nil="true"/>
  <subscribe type="boolean">true</subscribe>
  <surname nil="true"/>
  <type>Client::Individual</type>
  <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
  <progressive-discount nil="true"/>
  <group-discount nil="true"/>
  <fields-values type="array"/>
</individual>

ClientGroup

Create client group

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-group>
  <created-at type="datetime">2016-04-21T14:52:43+03:00</created-at>
  <discount type="decimal">0.2</discount>
  <id type="integer">2</id>
  <is-default type="boolean">false</is-default>
  <title>test group</title>
  <updated-at type="datetime">2016-04-21T14:52:43+03:00</updated-at>
  <discount-description>test group discount</discount-description>
</client-group>

Destroy client group

Request

Route

DELETE /admin/client_groups/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get client group

Request

Route

GET /admin/client_groups/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-group>
  <created-at type="datetime">2015-12-29T10:50:33+03:00</created-at>
  <discount type="decimal">25.0</discount>
  <id type="integer">1</id>
  <is-default type="boolean">true</is-default>
  <title>vip</title>
  <updated-at type="datetime">2016-04-07T10:50:33+03:00</updated-at>
  <discount-description nil="true"/>
</client-group>

Get client groups

Request

Route

GET /admin/client_groups.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<client-groups type="array">
  <client-group>
    <created-at type="datetime">2015-12-29T10:50:33+03:00</created-at>
    <discount type="decimal">25.0</discount>
    <id type="integer">1</id>
    <is-default type="boolean">true</is-default>
    <title>vip</title>
    <updated-at type="datetime">2016-04-07T10:50:33+03:00</updated-at>
    <discount-description nil="true"/>
  </client-group>
</client-groups>

Update client group

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

 

Collect

Add product to collection

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collect>
  <collection-id type="integer">2</collection-id>
  <created-at type="timestamp">2016-07-14 19:15:54 +0300</created-at>
  <id type="integer">557</id>
  <position type="integer">1</position>
  <product-id type="integer">1</product-id>
</collect>

Get collections by product

Request

Route

GET /admin/collects.xml?product_id=1

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Query Parameters

product_id=1

Response

Status

200

Headers

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

Body

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

Get collects

Request

Route

GET /admin/collects.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get products by collection

Request

Route

GET /admin/collects.xml?collection_id=1

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Query Parameters

collection_id=1

Response

Status

200

Headers

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

Body

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

Move product to another collection

Parameters

Name Description
collect[collection_id] collection id

Request

Route

PUT /admin/collects/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

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

Remove product from collection

Request

Route

DELETE /admin/collects/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Update position

Parameters

Name Description
collect[position] position

Request

Route

PUT /admin/collects/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

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

Collection

Create collection

Parameters

Name Description
collection[title] required title
collection[parent_id] required parent collection id
collection[position] required 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
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][original_url] image url

Request

Route

POST /admin/collections.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
    <original-url>https://assets3.insales.ru/assets/1/161/647329/v_1467875760/build/slide4.jpg</original-url>
  </image-attributes>
</collection>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <created-at type="timestamp">2016-07-19 11:55:51 +0300</created-at>
  <id type="integer">33</id>
  <is-hidden type="boolean">false</is-hidden>
  <parent-id type="integer">1</parent-id>
  <position type="integer">1</position>
  <recursive type="boolean" nil="true"/>
  <sort-type type="integer">1</sort-type>
  <updated-at type="timestamp">2016-07-19 11:55:51 +0300</updated-at>
  <title>T-shirts</title>
  <description>text</description>
  <html-title nil="true"/>
  <meta-description nil="true"/>
  <meta-keywords nil="true"/>
  <permalink>t-shirts</permalink>
  <url>/collection/t-shirts</url>
  <seo-description nil="true"/>
  <image>
    <created-at type="timestamp">2016-07-19 11:55:51 +0300</created-at>
    <id type="integer">25</id>
    <original-url>/images/no_image_original.jpg</original-url>
  </image>
</collection>

Destroy collection

Request

Route

DELETE /admin/collections/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get collection

Request

Route

GET /admin/collections/6.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
  <id type="integer">6</id>
  <is-hidden type="boolean">false</is-hidden>
  <parent-id type="integer">1</parent-id>
  <position type="integer">0</position>
  <recursive type="boolean" nil="true"/>
  <sort-type type="integer">7</sort-type>
  <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
  <title>all</title>
  <description nil="true"/>
  <html-title nil="true"/>
  <meta-description nil="true"/>
  <meta-keywords nil="true"/>
  <permalink>all</permalink>
  <url>/collection/all</url>
  <seo-description nil="true"/>
  <image>
    <created-at type="timestamp">2016-07-11 10:26:38 +0300</created-at>
    <id type="integer">3</id>
    <original-url>/images/no_image_original.jpg</original-url>
  </image>
</collection>

Get collections

Parameters

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

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Query Parameters

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collections type="array">
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">1</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer" nil="true"/>
    <position type="integer">-1</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>T-shirts</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>футболка</permalink>
    <url>/collection/футболка</url>
    <seo-description nil="true"/>
  </collection>
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">2</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">1</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>Shirts</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>shirts</permalink>
    <url>/collection/shirts</url>
    <seo-description nil="true"/>
  </collection>
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">3</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">2</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>Trousers</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>trousers</permalink>
    <url>/collection/trousers</url>
    <seo-description nil="true"/>
  </collection>
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">4</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">3</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>Stylish</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>stylish</permalink>
    <url>/collection/stylish</url>
    <seo-description nil="true"/>
  </collection>
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">5</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">4</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>Sport</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>sport</permalink>
    <url>/collection/sport</url>
    <seo-description nil="true"/>
  </collection>
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">6</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">0</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>all</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>all</permalink>
    <url>/collection/all</url>
    <seo-description nil="true"/>
    <image>
      <created-at type="timestamp">2016-07-11 10:26:38 +0300</created-at>
      <id type="integer">3</id>
      <original-url>/images/no_image_original.jpg</original-url>
    </image>
  </collection>
  <collection>
    <created-at type="timestamp">2016-03-26 15:44:43 +0300</created-at>
    <id type="integer">8</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">4</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-04 15:44:43 +0300</updated-at>
    <title>sort test</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>sort test</permalink>
    <url>/collection/sort test</url>
    <seo-description nil="true"/>
  </collection>
  <collection>
    <created-at type="timestamp">2016-07-08 17:34:57 +0300</created-at>
    <id type="integer">76</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">1</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-08 17:34:57 +0300</updated-at>
    <title>dd</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>dd</permalink>
    <url>/collection/dd</url>
    <seo-description nil="true"/>
    <image>
      <created-at type="timestamp">2016-07-08 17:36:45 +0300</created-at>
      <id type="integer">2</id>
      <original-url>/images/loading.gif</original-url>
    </image>
  </collection>
  <collection>
    <created-at type="timestamp">2016-07-08 17:40:30 +0300</created-at>
    <id type="integer">77</id>
    <is-hidden type="boolean">false</is-hidden>
    <parent-id type="integer">1</parent-id>
    <position type="integer">1</position>
    <recursive type="boolean" nil="true"/>
    <sort-type type="integer">7</sort-type>
    <updated-at type="timestamp">2016-07-08 17:40:30 +0300</updated-at>
    <title>jdd</title>
    <description nil="true"/>
    <html-title nil="true"/>
    <meta-description nil="true"/>
    <meta-keywords nil="true"/>
    <permalink>jdd</permalink>
    <url>/collection/jdd</url>
    <seo-description nil="true"/>
  </collection>
</collections>

Update collection

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

Request

Route

PUT /admin/collections/6.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</collection>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection>
  <created-at type="timestamp">2016-04-09 18:36:37 +0300</created-at>
  <id type="integer">6</id>
  <is-hidden type="boolean">true</is-hidden>
  <parent-id type="integer">1</parent-id>
  <position type="integer">2</position>
  <recursive type="boolean" nil="true"/>
  <sort-type type="integer">11</sort-type>
  <updated-at type="timestamp">2016-07-19 11:55:51 +0300</updated-at>
  <title>Books</title>
  <description>Description</description>
  <html-title nil="true"/>
  <meta-description nil="true"/>
  <meta-keywords nil="true"/>
  <permalink>all</permalink>
  <url>/collection/all</url>
  <seo-description nil="true"/>
</collection>

CollectionFieldValue

Get collection field value

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get collection fields values

Parameters

Name Description
collection_id collection id

Request

Route

GET /admin/collections/1/collection_field_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Update collection field value

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

 

CollectionFilter

Create collection filter

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

Request

Route

POST /admin/collection_filters.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</filter>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filter>
  <collection-id type="integer">1</collection-id>
  <id type="integer">2</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">159</id>
      <position type="integer">1</position>
      <property-id type="integer">186</property-id>
      <title>first prop value</title>
      <permalink>first-prop-value</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">160</id>
      <position type="integer">1</position>
      <property-id type="integer">187</property-id>
      <title>second property value</title>
      <permalink>second-property-value</permalink>
    </characteristic>
  </characteristics>
  <option-values type="array">
    <option-value>
      <id type="integer">659</id>
      <option-name-id type="integer">55</option-name-id>
      <position type="integer">1</position>
      <title>first option value</title>
    </option-value>
    <option-value>
      <id type="integer">660</id>
      <option-name-id type="integer">56</option-name-id>
      <position type="integer">1</position>
      <title>second option value</title>
    </option-value>
  </option-values>
</collection-filter>

Delete collection filter

Parameters

Name Description
filter[id] required filter id

Request

Route

DELETE /admin/collection_filters/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Content-Type: application/x-www-form-urlencoded

Response

Status

200

Headers

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

Body

 

Get collection filter

Parameters

Name Description
filter_id filter id

Request

Route

GET /admin/collection_filters/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filter>
  <collection-id type="integer">1</collection-id>
  <id type="integer">1</id>
  <permalink>foobar</permalink>
  <title>seo filter</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <characteristics type="array"/>
  <option-values type="array"/>
</collection-filter>

Get collection filters

Parameters

Name Description
collection_id collection id

Request

Route

GET /admin/collection_filters.xml?collection_id=1

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Query Parameters

collection_id=1

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filters type="array">
  <collection-filter>
    <collection-id type="integer">1</collection-id>
    <id type="integer">1</id>
    <permalink>foobar</permalink>
    <title>seo filter</title>
    <description>here is some description</description>
    <html-title nil="true"/>
    <meta-keywords nil="true"/>
    <meta-description nil="true"/>
    <characteristics type="array"/>
    <option-values type="array"/>
  </collection-filter>
</collection-filters>

Update collection filter

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

Request

Route

PUT /admin/collection_filters/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</filter>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<collection-filter>
  <collection-id type="integer">1</collection-id>
  <id type="integer">1</id>
  <permalink>new-seo-filter</permalink>
  <title>new-seo-filter</title>
  <html-title nil="true"/>
  <meta-keywords nil="true"/>
  <meta-description nil="true"/>
  <characteristics type="array">
    <characteristic>
      <id type="integer">163</id>
      <position type="integer">1</position>
      <property-id type="integer">190</property-id>
      <title>first prop value</title>
      <permalink>first-prop-value</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">164</id>
      <position type="integer">1</position>
      <property-id type="integer">191</property-id>
      <title>second property value</title>
      <permalink>second-property-value</permalink>
    </characteristic>
  </characteristics>
  <option-values type="array">
    <option-value>
      <id type="integer">663</id>
      <option-name-id type="integer">59</option-name-id>
      <position type="integer">1</position>
      <title>first option value</title>
    </option-value>
    <option-value>
      <id type="integer">664</id>
      <option-name-id type="integer">60</option-name-id>
      <position type="integer">1</position>
      <title>second option value</title>
    </option-value>
  </option-values>
</collection-filter>

CustomStatus

Create custom status

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-status>
  <color>#DC5F59</color>
  <created-at type="datetime">2016-04-21T14:52:47+03:00</created-at>
  <id type="integer">4</id>
  <is-default type="boolean">false</is-default>
  <permalink>new-ordered-by-phone</permalink>
  <position type="integer">2</position>
  <system-status>new</system-status>
  <updated-at type="datetime">2016-04-21T14:52:47+03:00</updated-at>
  <title>New (ordered by phone)</title>
</custom-status>

Destroy custom status

Request

Route

DELETE /admin/custom_statuses/novyy.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get custom status

Request

Route

GET /admin/custom_statuses/novyy.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<custom-status>
  <color>#DC5F59</color>
  <created-at type="datetime">2016-04-21T14:52:47+03:00</created-at>
  <id type="integer">1</id>
  <is-default type="boolean">true</is-default>
  <permalink>novyy</permalink>
  <position type="integer">1</position>
  <system-status>new</system-status>
  <updated-at type="datetime">2016-04-21T14:52:47+03:00</updated-at>
  <title>Новый</title>
</custom-status>

Get custom statuses

Request

Route

GET /admin/custom_statuses.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Update custom status

Parameters

Name Description
custom_status[title] discount

Request

Route

PUT /admin/custom_statuses/novyy.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

 

DeliveryVariant

Create delivery_variant External

DeliveryVariant::External is an external delivery variant.

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::Cpcr, DeliveryVariant::Ems, DeliveryVariant::External, DeliveryVariant::FirstClass, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::None, DeliveryVariant::NovaPoshta, DeliveryVariant::PickPoint, DeliveryVariant::PriceDepend, DeliveryVariant::Russianpost
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[url] url for sending request on delivery price estimation
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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<external>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <created-at type="timestamp">2016-07-29 17:56:35 +0300</created-at>
  <id type="integer">326</id>
  <inverted type="boolean">false</inverted>
  <position type="integer">1</position>
  <updated-at type="timestamp">2016-07-29 17:56:35 +0300</updated-at>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::External</type>
  <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>
      <created-at type="timestamp">2016-07-29 17:56:36 +0300</created-at>
      <id type="integer">831</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:35 +0300</created-at>
      <id type="integer">832</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <city>B</city>
      <country>RU</country>
      <id type="integer">335</id>
      <region>A</region>
    </delivery-location>
  </delivery-locations>
</external>

Create delivery_variant Fixed

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

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::Cpcr, DeliveryVariant::Ems, DeliveryVariant::External, DeliveryVariant::FirstClass, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::None, DeliveryVariant::NovaPoshta, DeliveryVariant::PickPoint, DeliveryVariant::PriceDepend, DeliveryVariant::Russianpost
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

Request

Route

POST /admin/delivery_variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</delivery-variant>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<fixed>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <created-at type="timestamp">2016-07-29 17:56:34 +0300</created-at>
  <id type="integer">324</id>
  <inverted type="boolean">false</inverted>
  <position type="integer">1</position>
  <updated-at type="timestamp">2016-07-29 17:56:34 +0300</updated-at>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::Fixed</type>
  <price type="float">300.0</price>
  <javascript nil="true"/>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:35 +0300</created-at>
      <id type="integer">827</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:35 +0300</created-at>
      <id type="integer">828</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <city>B</city>
      <country>RU</country>
      <id type="integer">333</id>
      <region>A</region>
    </delivery-location>
  </delivery-locations>
</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.

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::Cpcr, DeliveryVariant::Ems, DeliveryVariant::External, DeliveryVariant::FirstClass, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::None, DeliveryVariant::NovaPoshta, DeliveryVariant::PickPoint, DeliveryVariant::PriceDepend, DeliveryVariant::Russianpost
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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<location-depend>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <created-at type="timestamp">2016-07-29 17:56:36 +0300</created-at>
  <id type="integer">328</id>
  <inverted type="boolean">true</inverted>
  <position type="integer">1</position>
  <updated-at type="timestamp">2016-07-29 17:56:36 +0300</updated-at>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::LocationDepend</type>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:37 +0300</created-at>
      <id type="integer">835</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:36 +0300</created-at>
      <id type="integer">836</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <city>B</city>
      <country>RU</country>
      <id type="integer">337</id>
      <region>A</region>
    </delivery-location>
  </delivery-locations>
  <delivery-zones type="array">
    <delivery-zone>
      <id type="integer">65</id>
      <title>test</title>
      <tariffs type="array">
        <tariff type="DeliveryZoneTariff">
          <id type="integer">65</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">
          <city>D</city>
          <country>A</country>
          <id type="integer">338</id>
          <region>C</region>
        </location>
      </locations>
    </delivery-zone>
  </delivery-zones>
</location-depend>

Create delivery_variant PriceDepend

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

Parameters

Name Description
delivery_variant[title] required title
delivery_variant[type] required DeliveryVariant::Cpcr, DeliveryVariant::Ems, DeliveryVariant::External, DeliveryVariant::FirstClass, DeliveryVariant::Fixed, DeliveryVariant::LocationDepend, DeliveryVariant::None, DeliveryVariant::NovaPoshta, DeliveryVariant::PickPoint, DeliveryVariant::PriceDepend, DeliveryVariant::Russianpost
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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-depend>
  <charge-up-to type="decimal">1000.0</charge-up-to>
  <created-at type="timestamp">2016-07-29 17:56:37 +0300</created-at>
  <id type="integer">330</id>
  <inverted type="boolean">false</inverted>
  <position type="integer">1</position>
  <updated-at type="timestamp">2016-07-29 17:56:37 +0300</updated-at>
  <title>express delivery</title>
  <description>text</description>
  <type>DeliveryVariant::PriceDepend</type>
  <min-price type="float">300.0</min-price>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:38 +0300</created-at>
      <id type="integer">839</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:37 +0300</created-at>
      <id type="integer">840</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array">
    <delivery-location>
      <city>B</city>
      <country>RU</country>
      <id type="integer">341</id>
      <region>A</region>
    </delivery-location>
  </delivery-locations>
  <rules type="array">
    <rule type="DeliveryVariantRule::PriceDepend">
      <order-price type="float">10.0</order-price>
      <price type="float">300.0</price>
      <order-weight type="float">1.0</order-weight>
    </rule>
  </rules>
</price-depend>

Destroy delivery_variant

Request

Route

DELETE /admin/delivery_variants/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get delivery_variant

Request

Route

GET /admin/delivery_variants/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-depend>
  <charge-up-to type="decimal" nil="true"/>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <id type="integer">2</id>
  <inverted type="boolean">false</inverted>
  <position type="integer">2</position>
  <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
  <title>курьер</title>
  <description></description>
  <type>DeliveryVariant::PriceDepend</type>
  <min-price type="float">200.0</min-price>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
      <id type="integer">2</id>
      <payment-gateway-id type="integer">1</payment-gateway-id>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array"/>
  <rules type="array">
    <rule type="DeliveryVariantRule::PriceDepend">
      <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">
      <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">
      <order-price type="float">2000.0</order-price>
      <price type="float">800.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <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">
      <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">
      <order-price type="float">10000.0</order-price>
      <price type="float">500.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <order-price nil="true"/>
      <price type="float">0.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <order-price nil="true"/>
      <price type="float">100.0</price>
      <order-weight type="integer">20</order-weight>
    </rule>
  </rules>
</price-depend>

Get delivery_variants

Request

Route

GET /admin/delivery_variants.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <object>
    <charge-up-to type="decimal" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <id type="integer">1</id>
    <inverted type="boolean">false</inverted>
    <position type="integer">1</position>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <title>самовывоз</title>
    <description>самовывоз из офиса</description>
    <type>DeliveryVariant::Fixed</type>
    <price type="float">100.0</price>
    <javascript nil="true"/>
    <payment-delivery-variants type="array">
      <payment-delivery-variant>
        <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
        <id type="integer">1</id>
        <payment-gateway-id type="integer">1</payment-gateway-id>
      </payment-delivery-variant>
    </payment-delivery-variants>
    <delivery-locations type="array"/>
  </object>
  <object>
    <charge-up-to type="decimal" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <id type="integer">2</id>
    <inverted type="boolean">false</inverted>
    <position type="integer">2</position>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <title>курьер</title>
    <description></description>
    <type>DeliveryVariant::PriceDepend</type>
    <min-price type="float">200.0</min-price>
    <payment-delivery-variants type="array">
      <payment-delivery-variant>
        <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
        <id type="integer">2</id>
        <payment-gateway-id type="integer">1</payment-gateway-id>
      </payment-delivery-variant>
    </payment-delivery-variants>
    <delivery-locations type="array"/>
    <rules type="array">
      <rule type="DeliveryVariantRule::PriceDepend">
        <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">
        <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">
        <order-price type="float">2000.0</order-price>
        <price type="float">800.0</price>
        <order-weight nil="true"/>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <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">
        <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">
        <order-price type="float">10000.0</order-price>
        <price type="float">500.0</price>
        <order-weight nil="true"/>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <order-price nil="true"/>
        <price type="float">0.0</price>
        <order-weight type="integer">10</order-weight>
      </rule>
      <rule type="DeliveryVariantRule::PriceDepend">
        <order-price nil="true"/>
        <price type="float">100.0</price>
        <order-weight type="integer">20</order-weight>
      </rule>
    </rules>
  </object>
</objects>

Update delivery variant

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[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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</delivery-variant>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<price-depend>
  <charge-up-to type="decimal">2500.0</charge-up-to>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <id type="integer">2</id>
  <inverted type="boolean">false</inverted>
  <position type="integer">1</position>
  <updated-at type="timestamp">2016-07-29 17:56:37 +0300</updated-at>
  <title>new title</title>
  <description>new description</description>
  <type>DeliveryVariant::PriceDepend</type>
  <min-price type="float">200.0</min-price>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 17:56:38 +0300</created-at>
      <id type="integer">843</id>
      <payment-gateway-id type="integer">3</payment-gateway-id>
    </payment-delivery-variant>
  </payment-delivery-variants>
  <delivery-locations type="array"/>
  <rules type="array">
    <rule type="DeliveryVariantRule::PriceDepend">
      <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">
      <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">
      <order-price type="float">2000.0</order-price>
      <price type="float">800.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <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">
      <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">
      <order-price type="float">10000.0</order-price>
      <price type="float">500.0</price>
      <order-weight nil="true"/>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <order-price nil="true"/>
      <price type="float">0.0</price>
      <order-weight type="integer">10</order-weight>
    </rule>
    <rule type="DeliveryVariantRule::PriceDepend">
      <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

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<discount-code>
  <act-once type="boolean">true</act-once>
  <act-once-for-client type="boolean">true</act-once-for-client>
  <code>BIRTHDAY</code>
  <created-at type="datetime">2016-04-21T14:52:49+03:00</created-at>
  <description>Birthday discount</description>
  <disabled type="boolean">true</disabled>
  <discount type="decimal">10.0</discount>
  <expired-at type="date">2016-04-28</expired-at>
  <id type="integer">3</id>
  <min-price type="decimal">500.0</min-price>
  <type-id type="integer">1</type-id>
  <updated-at type="datetime">2016-04-21T14:52:49+03:00</updated-at>
  <worked type="boolean">false</worked>
  <discount-collections type="array"/>
</discount-code>

Destroy discount code

Request

Route

DELETE /admin/discount_codes/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get discount code

Request

Route

GET /admin/discount_codes/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get discount codes

Request

Route

GET /admin/discount_codes.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Update discount code

Parameters

Name Description
discount_code[discount] discount

Request

Route

PUT /admin/discount_codes/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

 

Domain

Create domain

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <created-at type="timestamp">2016-07-28 16:31:57 +0300</created-at>
  <domain>another-domain.ru</domain>
  <id type="integer">168</id>
  <main type="boolean">true</main>
  <updated-at type="timestamp">2016-07-28 16:31:57 +0300</updated-at>
</domain>

Destroy domain

Request

Route

DELETE /admin/domains/173.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get domain

Request

Route

GET /admin/domains/165.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <created-at type="timestamp">2016-07-28 16:31:57 +0300</created-at>
  <domain>some-domain.ru</domain>
  <id type="integer">165</id>
  <main type="boolean">true</main>
  <updated-at type="timestamp">2016-07-28 16:31:57 +0300</updated-at>
</domain>

Get domains

Request

Route

GET /admin/domains.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<domains type="array">
  <domain>
    <created-at type="timestamp">2016-07-28 16:31:57 +0300</created-at>
    <domain>some-domain.ru</domain>
    <id type="integer">163</id>
    <main type="boolean">true</main>
    <updated-at type="timestamp">2016-07-28 16:31:57 +0300</updated-at>
  </domain>
</domains>

Update domain

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/171.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<domain>
  <created-at type="timestamp">2016-07-28 16:31:57 +0300</created-at>
  <domain>other-domain.ru</domain>
  <id type="integer">171</id>
  <main type="boolean">true</main>
  <updated-at type="timestamp">2016-07-28 16:31:57 +0300</updated-at>
</domain>

Field

Create field

Parameters

Name Description
field[type] required Field::TextField, Field::TextArea, Field::Select, Field::Checkbox, Field::FileField (only for Order), Field::Delivery, Field::PickPoint
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
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[system_name] name for system field
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

Request

Route

POST /admin/fields.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
  <title>title_for_text_field</title>
  <active type="boolean">false</active>
  <for-buyer type="boolean">false</for-buyer>
  <system-name>text_field_test</system-name>
  <show-in-result type="boolean">false</show-in-result>
  <show-in-checkout type="boolean">false</show-in-checkout>
</field>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <active type="boolean">false</active>
  <created-at type="datetime">2016-08-11T15:42:38+03:00</created-at>
  <destiny type="integer">1</destiny>
  <for-buyer type="boolean">false</for-buyer>
  <id type="integer">769</id>
  <obligatory type="boolean">false</obligatory>
  <office-title>title_for_text_field</office-title>
  <position type="integer">5</position>
  <show-in-checkout type="boolean">false</show-in-checkout>
  <show-in-result type="boolean">false</show-in-result>
  <system-name>text_field_test</system-name>
  <updated-at type="datetime">2016-08-11T15:42:38+03:00</updated-at>
  <title>title_for_text_field</title>
  <example nil="true"/>
  <type>Field::TextField</type>
</field>

Destroy field

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

Request

Route

DELETE /admin/fields/23.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get field

Request

Route

GET /admin/fields/23.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <active type="boolean">false</active>
  <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
  <destiny type="integer">2</destiny>
  <for-buyer type="boolean">true</for-buyer>
  <id type="integer">23</id>
  <obligatory type="boolean">false</obligatory>
  <office-title>Селект</office-title>
  <position type="integer">6</position>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <show-in-result type="boolean">true</show-in-result>
  <system-name nil="true"/>
  <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
  <title>Селект</title>
  <example nil="true"/>
  <type>Field::Select</type>
</field>

Get fields

Request

Route

GET /admin/fields.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<fields type="array">
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">1</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">1</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Страна</office-title>
    <position type="integer">0</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>country</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::Country</type>
  </field>
  <field>
    <active type="boolean">true</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">11</id>
    <obligatory type="boolean">true</obligatory>
    <office-title>Имя</office-title>
    <position type="integer">1</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>name</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::ObligatoryTextField</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">1</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">2</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Регион</office-title>
    <position type="integer">1</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>state</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">true</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">12</id>
    <obligatory type="boolean">true</obligatory>
    <office-title>Телефон</office-title>
    <position type="integer">2</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>phone</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::Phone</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">1</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">3</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Город</office-title>
    <position type="integer">2</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>city</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">true</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">1</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">4</id>
    <obligatory type="boolean">true</obligatory>
    <office-title>Адрес</office-title>
    <position type="integer">3</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>address</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextArea</type>
  </field>
  <field>
    <active type="boolean">true</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">13</id>
    <obligatory type="boolean">true</obligatory>
    <office-title>E-mail</office-title>
    <position type="integer">3</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>email</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">21</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Фамилия</office-title>
    <position type="integer">4</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>surname</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">14</id>
    <obligatory type="boolean">true</obligatory>
    <office-title>Подтверждение e-mail</office-title>
    <position type="integer">4</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>email_confirmation</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">1</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">5</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Почтовый индекс</office-title>
    <position type="integer">4</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>zip</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">22</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Отчество</office-title>
    <position type="integer">5</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name>middlename</system-name>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title nil="true"/>
    <example nil="true"/>
    <type>Field::SystemTextField</type>
  </field>
  <field>
    <active type="boolean">false</active>
    <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
    <destiny type="integer">2</destiny>
    <for-buyer type="boolean">true</for-buyer>
    <id type="integer">23</id>
    <obligatory type="boolean">false</obligatory>
    <office-title>Селект</office-title>
    <position type="integer">6</position>
    <show-in-checkout type="boolean">true</show-in-checkout>
    <show-in-result type="boolean">true</show-in-result>
    <system-name nil="true"/>
    <updated-at type="datetime">2010-10-12T13:31:09+04:00</updated-at>
    <title>Селект</title>
    <example nil="true"/>
    <type>Field::Select</type>
  </field>
</fields>

Update field

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[system_name] name for system field
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

Request

Route

PUT /admin/fields/23.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
  <system-name>state_code</system-name>
  <show-in-result type="boolean">true</show-in-result>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <position type="integer">1</position>
</field>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<field>
  <active type="boolean">true</active>
  <created-at type="datetime">2010-10-12T13:31:09+04:00</created-at>
  <destiny type="integer">2</destiny>
  <for-buyer type="boolean">true</for-buyer>
  <id type="integer">23</id>
  <obligatory type="boolean">true</obligatory>
  <office-title>state_code</office-title>
  <position type="integer">1</position>
  <show-in-checkout type="boolean">true</show-in-checkout>
  <show-in-result type="boolean">true</show-in-result>
  <system-name>state_code</system-name>
  <updated-at type="datetime">2016-08-11T15:42:38+03:00</updated-at>
  <title>State code</title>
  <example nil="true"/>
  <type>Field::Select</type>
</field>

File

Create file from attachment

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <created-at type="datetime">2016-08-11T18:04:52+03:00</created-at>
  <id type="integer">48</id>
  <absolute-url>https://static-internal.insales.ru/files/1/48/48/original/some_file.?1470927892</absolute-url>
</file>

Create file from url

Parameters

Name Description
file[src] required file url

Request

Route

POST /admin/files.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <src>https://assets3.insales.ru/assets/1/161/647329/v_1467875760/build/slide4.jpg</src>
</file>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <created-at type="datetime">2016-08-11T18:04:51+03:00</created-at>
  <id type="integer">46</id>
  <absolute-url>https://static-internal.insales.ru/files/1/46/46/original/slide4.jpg?1470927891</absolute-url>
</file>

Destroy file

Request

Route

DELETE /admin/files/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get file

Request

Route

GET /admin/files/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<file>
  <created-at type="datetime">2009-03-18T07:53:15+03:00</created-at>
  <id type="integer">1</id>
  <absolute-url>https://static-internal.insales.ru/files/1/original/thumb_prayerbeads.jpg</absolute-url>
</file>

Get files

Request

Route

GET /admin/files.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<files type="array">
  <file>
    <created-at type="datetime">2009-03-18T07:53:15+03:00</created-at>
    <id type="integer">1</id>
    <absolute-url>https://static-internal.insales.ru/files/1/original/thumb_prayerbeads.jpg</absolute-url>
  </file>
</files>

Image

Create image fpom 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 new timestamp.

Parameters

Name Description
image[src] required image url
image[filename] file name
image[title] title
image[position] position

Request

Route

POST /admin/products/1/images.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <src>https://assets3.insales.ru/assets/1/161/647329/v_1467875760/build/slide4.jpg</src>
</image>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <created-at type="timestamp">2016-07-12 12:52:31 +0300</created-at>
  <id type="integer">317</id>
  <image-processing type="boolean">true</image-processing>
  <position type="integer">1</position>
  <product-id type="integer">1</product-id>
  <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>slide4.jpg</filename>
</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.

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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</filename>
</image>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <created-at type="timestamp">2016-07-12 12:52:32 +0300</created-at>
  <id type="integer">319</id>
  <image-processing type="boolean">true</image-processing>
  <position type="integer">1</position>
  <product-id type="integer">1</product-id>
  <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</filename>
</image>

Destroy image

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get image

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <created-at type="timestamp">2016-07-08 11:07:22 +0300</created-at>
  <id type="integer">258</id>
  <image-processing type="boolean">true</image-processing>
  <position type="integer">1</position>
  <product-id type="integer">1</product-id>
  <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>

Get images

Request

Route

GET /admin/products/1/images.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Update image

Parameters

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

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<image>
  <created-at type="timestamp">2016-07-08 11:07:24 +0300</created-at>
  <id type="integer">264</id>
  <image-processing type="boolean">true</image-processing>
  <position type="integer">5</position>
  <product-id type="integer">1</product-id>
  <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>

InvitedAccount

List invited accounts

Request

Route

GET /admin/invited_accounts.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<invited-accounts type="array">
  <invited-account>
    <id type="integer">6</id>
    <shop-url>https://test-shop.ru/</shop-url>
    <registered-at type="datetime">2016-04-21T14:52:35+03:00</registered-at>
    <plan>Стартовый</plan>
    <paid-till type="date">2009-03-02</paid-till>
    <alive type="boolean">true</alive>
    <royalties type="decimal">0.0</royalties>
  </invited-account>
</invited-accounts>

Show invited account

Request

Route

GET /admin/invited_accounts/6.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<invited-account>
  <id type="integer">6</id>
  <shop-url>https://test-shop.ru/</shop-url>
  <registered-at type="datetime">2016-04-21T14:52:35+03:00</registered-at>
  <plan>Стартовый</plan>
  <paid-till type="date">2009-03-02</paid-till>
  <alive type="boolean">true</alive>
  <royalties type="decimal">0.0</royalties>
</invited-account>

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.

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<text-tag>
  <content>alert('test');</content>
  <created-at type="timestamp">2016-08-19 10:46:07 +0300</created-at>
  <id type="integer">222</id>
  <name>alert test</name>
  <updated-at type="timestamp">2016-08-19 10:46:07 +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.

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<file-tag>
  <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
  <created-at type="timestamp">2016-08-19 10:46:07 +0300</created-at>
  <id type="integer">226</id>
  <name>jquery-1.9.1.min</name>
  <updated-at type="timestamp">2016-08-19 10:46:07 +0300</updated-at>
  <type>JsTag::FileTag</type>
</file-tag>

Destroy js_tag

Request

Route

DELETE /admin/js_tags/231.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get js_tag

Request

Route

GET /admin/js_tags/219.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<file-tag>
  <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
  <created-at type="timestamp">2016-08-19 10:46:07 +0300</created-at>
  <id type="integer">219</id>
  <name>jquery1.9.1</name>
  <updated-at type="timestamp">2016-08-19 10:46:07 +0300</updated-at>
  <type>JsTag::FileTag</type>
</file-tag>

Get js_tags

Request

Route

GET /admin/js_tags.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<js-tags type="array">
  <js-tag>
    <content>http://code.jquery.com/jquery-1.9.1.min.js</content>
    <created-at type="timestamp">2016-08-19 10:46:07 +0300</created-at>
    <id type="integer">217</id>
    <name>jquery1.9.1</name>
    <updated-at type="timestamp">2016-08-19 10:46:07 +0300</updated-at>
    <type>JsTag::FileTag</type>
  </js-tag>
</js-tags>

Update js_tag

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/229.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<file-tag>
  <content>http://code.jquery.com/jquery-2.2.4.min.js</content>
  <created-at type="timestamp">2016-08-19 10:46:07 +0300</created-at>
  <id type="integer">229</id>
  <name>jquery-2.2.4</name>
  <updated-at type="timestamp">2016-08-19 10:46:07 +0300</updated-at>
  <type>JsTag::FileTag</type>
</file-tag>

Marketplace

Create Google Merchant marketplace

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-09-07T18:58:02+03:00</created-at>
  <id type="integer">9</id>
  <name>GM</name>
  <updated-at type="datetime">2016-09-07T18:58:02+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/9.xml</url>
  <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>
  <description-type type="integer">1</description-type>
  <local-delivery-cost nil="true"/>
  <utm-label nil="true"/>
</hash>

Create Liquid for Yandex marketplace

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>windows-1251</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">8</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">6</collection-id>
  </collection-ids>
</marketplace>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-04-21T14:53:12+03:00</created-at>
  <id type="integer">7</id>
  <name>LYM</name>
  <page-encoding>windows-1251</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <updated-at type="datetime">2016-04-21T14:53:12+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/7.xml</url>
  <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>
  <local-delivery-cost 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>
</hash>

Create Model for Yandex marketplace

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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">8</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">6</collection-id>
  </collection-ids>
</marketplace>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-04-21T14:53:11+03:00</created-at>
  <id type="integer">3</id>
  <name>YM</name>
  <page-encoding>windows-1251</page-encoding>
  <shop-company>eBay</shop-company>
  <shop-name>eBay</shop-name>
  <updated-at type="datetime">2016-04-21T14:53:11+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/3.xml</url>
  <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>
  <delivery-price-kind nil="true"/>
  <description-type type="integer">1</description-type>
  <local-delivery-cost nil="true"/>
  <market-category nil="true"/>
  <sales-notes nil="true"/>
  <utm-label nil="true"/>
  <vendor-id type="integer">6</vendor-id>
</hash>

Destroy marketplace

Request

Route

DELETE /admin/marketplaces/11.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get marketplace

Request

Route

GET /admin/marketplaces/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-04-21T14:53:10+03:00</created-at>
  <id type="integer">1</id>
  <name>Yandex Model</name>
  <page-encoding nil="true"/>
  <shop-company nil="true"/>
  <shop-name nil="true"/>
  <updated-at type="datetime">2016-04-21T14:53:10+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/1.xml</url>
  <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>
  <delivery-price-kind nil="true"/>
  <description-type nil="true"/>
  <local-delivery-cost nil="true"/>
  <market-category nil="true"/>
  <sales-notes nil="true"/>
  <utm-label nil="true"/>
  <vendor-id nil="true"/>
</hash>

Get marketplaces

Request

Route

GET /admin/marketplaces.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <object>
    <created-at type="datetime">2016-09-07T18:58:01+03:00</created-at>
    <id type="integer">1</id>
    <name>Yandex Model</name>
    <updated-at type="datetime">2016-09-07T18:58:01+03:00</updated-at>
    <url>http://quentin.mylocalhost.localdomain:3000/marketplace/1.xml</url>
    <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>
    <local-delivery-cost nil="true"/>
    <offer-liquid nil="true"/>
    <page-encoding nil="true"/>
    <shop-company nil="true"/>
    <shop-name nil="true"/>
  </object>
  <object>
    <created-at type="datetime">2016-09-07T18:58:01+03:00</created-at>
    <id type="integer">2</id>
    <name>Google Model</name>
    <updated-at type="datetime">2016-09-07T18:58:01+03:00</updated-at>
    <url>http://quentin.mylocalhost.localdomain:3000/marketplace/2.xml</url>
    <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>
    <description-type nil="true"/>
    <local-delivery-cost nil="true"/>
    <utm-label nil="true"/>
  </object>
</objects>

Update Google Merchant marketplace

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-09-07T18:58:02+03:00</created-at>
  <id type="integer">13</id>
  <name>New GM</name>
  <updated-at type="datetime">2016-09-07T18:58:02+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/13.xml</url>
  <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>
  <description-type type="integer">2</description-type>
  <local-delivery-cost nil="true"/>
  <utm-label nil="true"/>
</hash>

Update Liquid for Yandex marketplace

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/9.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-04-21T14:53:12+03:00</created-at>
  <id type="integer">9</id>
  <name>New LYM</name>
  <page-encoding nil="true"/>
  <shop-company nil="true"/>
  <shop-name nil="true"/>
  <updated-at type="datetime">2016-04-21T14:53:12+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/9.xml</url>
  <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>
  <local-delivery-cost nil="true"/>
  <offer-liquid nil="true"/>
</hash>

Update Model for Yandex marketplace

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/5.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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">8</collection-id>
    <collection-id type="integer">5</collection-id>
    <collection-id type="integer">4</collection-id>
    <collection-id type="integer">3</collection-id>
    <collection-id type="integer">2</collection-id>
    <collection-id type="integer">1</collection-id>
    <collection-id type="integer">6</collection-id>
  </collection-ids>
</marketplace>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<hash>
  <created-at type="datetime">2016-04-21T14:53:11+03:00</created-at>
  <id type="integer">5</id>
  <name>New YM</name>
  <page-encoding nil="true"/>
  <shop-company nil="true"/>
  <shop-name nil="true"/>
  <updated-at type="datetime">2016-04-21T14:53:12+03:00</updated-at>
  <url>http://quentin.mylocalhost.localdomain:3000/marketplace/5.xml</url>
  <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>
  <delivery-price-kind nil="true"/>
  <description-type nil="true"/>
  <local-delivery-cost nil="true"/>
  <market-category nil="true"/>
  <sales-notes nil="true"/>
  <utm-label nil="true"/>
  <vendor-id type="integer">4</vendor-id>
</hash>

OptionName

Create option_name

Parameters

Name Description
option_name[title] required title
option_name[position] position in option names list

Request

Route

POST /admin/option_names.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

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

Destroy option_name

Request

Route

DELETE /admin/option_names/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get option_name

Request

Route

GET /admin/option_names/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-name>
  <id type="integer">1</id>
  <position type="integer">1</position>
  <title>Модификация</title>
</option-name>

Get option_names

Request

Route

GET /admin/option_names.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-names type="array">
  <option-name>
    <id type="integer">1</id>
    <position type="integer">1</position>
    <title>Модификация</title>
  </option-name>
  <option-name>
    <id type="integer">3</id>
    <position type="integer">2</position>
    <title>Цвет</title>
  </option-name>
</option-names>

Update option_name

Parameters

Name Description
option_name[title] title
option_name[position] position

Request

Route

PUT /admin/option_names/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

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

OptionValue

Create option_value

Parameters

Name Description
option_value[title] required title
option_value[position] position in option_values list

Request

Route

POST /admin/option_names/1/option_values.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <title>Blue</title>
</option-value>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<option-value>
  <id type="integer">1222</id>
  <option-name-id type="integer">1</option-name-id>
  <position type="integer">4</position>
  <title>Blue</title>
</option-value>

Destroy option_value

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get option_value

Request

Route

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

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

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>
</option-value>

Get option_values for all options

Request

Route

GET /admin/option_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

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>
  </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>
  </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>
  </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>
  </option-value>
</option-values>

Get option_values for specific option

Request

Route

GET /admin/option_names/1/option_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

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>
  </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>
  </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>
  </option-value>
</option-values>

Update option_value

Parameters

Name Description
option_value[position] position

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

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">3</position>
  <title>Зеленый</title>
</option-value>

Order

Create order line by product_id

Parameters

Name Description
order[order_lines_attributes] required order lines attributes
order[order_lines_attributes][][quantity] required quantity
order[order_lines_attributes][][product_id] required product id

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <state>state</state>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <fields-values type="array"/>
    <ip_addr/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2015-12-04 16:13:40 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">90</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt (Red)</title>
      <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <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>
<order-changes type="array">
  <order-change>
    <action>order_line_created</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">349</id>
    <user-name>Цифровые товары</user-name>
    <value-is>
      <sale-price type="float">300.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <quantity type="integer">1</quantity>
    </value-is>
    <value-was nil="true"/>
  </order-change>
  <order-change>
    <action>order_line_deleted</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">348</id>
    <user-name>Цифровые товары</user-name>
    <value-is nil="true"/>
    <value-was>
      <sale-price type="float">600.0</sale-price>
      <title>shirt</title>
      <quantity type="integer">2</quantity>
    </value-was>
  </order-change>
  <order-change>
    <action>order_line_deleted</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">347</id>
    <user-name>Цифровые товары</user-name>
    <value-is nil="true"/>
    <value-was>
      <sale-price type="float">300.0</sale-price>
      <title>Cool t-shirt</title>
      <quantity type="integer">1</quantity>
    </value-was>
  </order-change>
</order-changes>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Create order line by variant_id

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

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <state>state</state>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <fields-values type="array"/>
    <ip_addr/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2015-12-04 16:13:40 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">89</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt (Red)</title>
      <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <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>
<order-changes type="array">
  <order-change>
    <action>order_line_created</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">346</id>
    <user-name>Цифровые товары</user-name>
    <value-is>
      <sale-price type="float">300.0</sale-price>
      <title>Cool t-shirt (Red)</title>
      <quantity type="integer">1</quantity>
    </value-is>
    <value-was nil="true"/>
  </order-change>
  <order-change>
    <action>order_line_deleted</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">345</id>
    <user-name>Цифровые товары</user-name>
    <value-is nil="true"/>
    <value-was>
      <sale-price type="float">600.0</sale-price>
      <title>shirt</title>
      <quantity type="integer">2</quantity>
    </value-was>
  </order-change>
  <order-change>
    <action>order_line_deleted</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">344</id>
    <user-name>Цифровые товары</user-name>
    <value-is nil="true"/>
    <value-was>
      <sale-price type="float">300.0</sale-price>
      <title>Cool t-shirt</title>
      <quantity type="integer">1</quantity>
    </value-was>
  </order-change>
</order-changes>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Create order

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

Request

Route

POST /admin/orders.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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">2</quantity>
    </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>
</order>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment nil="true"/>
  <created-at type="timestamp">2016-08-10 12:08:20 +0300</created-at>
  <current-location nil="true"/>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз (самовывоз из офиса)</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title>самовывоз</delivery-title>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location nil="true"/>
  <first-referer nil="true"/>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1601</id>
  <key>745752288e54db864c70beec6d21a0af</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1006</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>Наличными курьеру</payment-title>
  <referer>app:digital-goods</referer>
  <updated-at type="timestamp">2016-08-10 12:08:20 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <client-transaction-id nil="true"/>
  <fields-values type="array"/>
  <shipping-address>
    <address>Moscow, Krasnaya Presna 24</address>
    <city nil="true"/>
    <country nil="true"/>
    <flat nil="true"/>
    <house nil="true"/>
    <id type="integer">1450</id>
    <middlename nil="true"/>
    <name>Vasya</name>
    <phone>79111112233</phone>
    <state nil="true"/>
    <street nil="true"/>
    <surname nil="true"/>
    <zip nil="true"/>
    <full-delivery-address>Moscow, Krasnaya Presna 24</full-delivery-address>
    <full-name>Vasya</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <correspondent-account nil="true"/>
    <created-at type="timestamp">2016-08-10 12:08:20 +0300</created-at>
    <email>vasya@example.com</email>
    <id type="integer">522</id>
    <ip-addr nil="true"/>
    <middlename nil="true"/>
    <name>Vasya</name>
    <phone>79111112233</phone>
    <registered type="boolean">false</registered>
    <settlement-account nil="true"/>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <type>Client::Individual</type>
    <updated-at type="timestamp">2016-08-10 12:08:20 +0300</updated-at>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <fields-values type="array"/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2016-08-10 12:08:20 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">453</id>
      <order-id type="integer">1601</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt (Red)</title>
      <unit>pce</unit>
      <updated-at type="timestamp">2016-08-10 12:08:20 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">300.0</full-sale-price>
      <total-price type="decimal">600.0</total-price>
      <full-total-price type="decimal">600.0</full-total-price>
    </order-line>
  </order-lines>
  <cookies>
  </cookies>
  <items-price type="decimal">600.0</items-price>
  <total-price type="decimal">700.0</total-price>
  <full-delivery-price type="decimal">100.0</full-delivery-price>
<order-changes type="array">
  <order-change>
    <action>order_created</action>
    <created-at type="datetime">2016-08-10T12:08:20+03:00</created-at>
    <id type="integer">3392</id>
    <user-name>Цифровые товары</user-name>
    <value-is nil="true"/>
    <value-was nil="true"/>
  </order-change>
</order-changes>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Get order

Request

Route

GET /admin/orders/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <state>state</state>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <fields-values type="array"/>
    <ip_addr/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt</title>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <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>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">2</product-id>
      <sale-price type="decimal">600.0</sale-price>
      <sku>424</sku>
      <title>shirt</title>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">2</variant-id>
      <weight type="decimal">0.3</weight>
      <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"/>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Get orders count

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get orders

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.xml?fulfillment_status[]=new&fulfillment_status[]=delivered&delivery_variant[]=1&delivery_variant[]=2&payment_gateway_id[]=1&payment_gateway_id[]=3

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Query Parameters

fulfillment_status[]=delivered
delivery_variant[]=2
payment_gateway_id[]=3

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<orders type="array">
  <order>
    <accepted-at type="timestamp" nil="true"/>
    <account-id type="integer">1</account-id>
    <comment>comment</comment>
    <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
    <current-location nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-price type="decimal">0.0</delivery-price>
    <delivery-title nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <financial-status>paid</financial-status>
    <first-current-location nil="true"/>
    <first-referer nil="true"/>
    <fulfillment-status>new</fulfillment-status>
    <id type="integer">4</id>
    <key nil="true"/>
    <manager-comment nil="true"/>
    <margin type="decimal">20.0</margin>
    <number type="integer">1005</number>
    <paid-at type="timestamp" nil="true"/>
    <payment-description nil="true"/>
    <payment-gateway-id type="integer">3</payment-gateway-id>
    <payment-title>наличными курьеру</payment-title>
    <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>
    <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
    <currency-code>RUR</currency-code>
    <fields-values type="array"/>
    <discounts type="array">
      <discount>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <description>рублевая скидка</description>
        <discount type="decimal">330.0</discount>
        <discount-products-ids type="array"/>
        <id type="integer">2</id>
        <type-id type="integer">2</type-id>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <percent nil="true"/>
        <discount-code-id nil="true"/>
        <amount type="decimal">330.0</amount>
        <full-amount type="decimal">396.0</full-amount>
      </discount>
    </discounts>
    <discount>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <description>рублевая скидка</description>
      <discount type="decimal">330.0</discount>
      <discount-products-ids type="array"/>
      <id type="integer">2</id>
      <type-id type="integer">2</type-id>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <percent nil="true"/>
      <discount-code-id nil="true"/>
      <amount type="decimal">330.0</amount>
      <full-amount type="decimal">396.0</full-amount>
    </discount>
    <client>
      <bonus-points type="integer">0</bonus-points>
      <client-group-id type="integer">1</client-group-id>
      <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
      <email>some-one2@yandex.ru</email>
      <id type="integer">3</id>
      <middlename nil="true"/>
      <name>Just Man</name>
      <phone>+7(926)111-22-33</phone>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <surname nil="true"/>
      <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
      <fields-values type="array"/>
      <ip_addr/>
    </client>
    <order-lines type="array">
      <order-line>
        <barcode nil="true"/>
        <comment nil="true"/>
        <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
        <discounts-amount type="decimal">264.0</discounts-amount>
        <id type="integer">7</id>
        <order-id type="integer">4</order-id>
        <product-id type="integer" nil="true"/>
        <sale-price type="decimal">800.0</sale-price>
        <sku>425</sku>
        <title>Cool t-shirt</title>
        <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
        <variant-id type="integer">1</variant-id>
        <weight type="decimal" nil="true"/>
        <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>
        <barcode nil="true"/>
        <comment nil="true"/>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <discounts-amount type="decimal">66.0</discounts-amount>
        <id type="integer">8</id>
        <order-id type="integer">4</order-id>
        <product-id type="integer" nil="true"/>
        <sale-price type="decimal">100.0</sale-price>
        <sku>426</sku>
        <title>shirt</title>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <variant-id type="integer">2</variant-id>
        <weight type="decimal">0.3</weight>
        <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>
    <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"/>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
  <order>
    <accepted-at type="timestamp" nil="true"/>
    <account-id type="integer">1</account-id>
    <comment>comment</comment>
    <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
    <current-location nil="true"/>
    <delivered-at type="timestamp" nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-price type="decimal">0.0</delivery-price>
    <delivery-title nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <financial-status>paid</financial-status>
    <first-current-location nil="true"/>
    <first-referer nil="true"/>
    <fulfillment-status>new</fulfillment-status>
    <id type="integer">3</id>
    <key nil="true"/>
    <manager-comment nil="true"/>
    <margin type="decimal">20.0</margin>
    <number type="integer">1004</number>
    <paid-at type="timestamp" nil="true"/>
    <payment-description nil="true"/>
    <payment-gateway-id type="integer">3</payment-gateway-id>
    <payment-title>наличными курьеру</payment-title>
    <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>
    <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
    <currency-code>RUR</currency-code>
    <fields-values type="array"/>
    <discounts type="array">
      <discount>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <description>процентная скидка</description>
        <discount type="decimal">30.0</discount>
        <discount-products-ids type="array"/>
        <id type="integer">1</id>
        <type-id type="integer">1</type-id>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <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>
    <discount>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <description>процентная скидка</description>
      <discount type="decimal">30.0</discount>
      <discount-products-ids type="array"/>
      <id type="integer">1</id>
      <type-id type="integer">1</type-id>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <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>
    <client>
      <bonus-points type="integer">0</bonus-points>
      <client-group-id type="integer">1</client-group-id>
      <created-at type="timestamp">2009-04-30 04:37:32 +0400</created-at>
      <email>some-one2@yandex.ru</email>
      <id type="integer">3</id>
      <middlename nil="true"/>
      <name>Just Man</name>
      <phone>+7(926)111-22-33</phone>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <surname nil="true"/>
      <updated-at type="timestamp">2009-04-30 12:20:34 +0400</updated-at>
      <fields-values type="array"/>
      <ip_addr/>
    </client>
    <order-lines type="array">
      <order-line>
        <barcode nil="true"/>
        <comment nil="true"/>
        <created-at type="timestamp">2011-03-18 10:53:14 +0300</created-at>
        <discounts-amount type="decimal">240.0</discounts-amount>
        <id type="integer">5</id>
        <order-id type="integer">3</order-id>
        <product-id type="integer" nil="true"/>
        <sale-price type="decimal">800.0</sale-price>
        <sku>425</sku>
        <title>Cool t-shirt</title>
        <updated-at type="timestamp">2011-03-18 10:53:15 +0300</updated-at>
        <variant-id type="integer">1</variant-id>
        <weight type="decimal" nil="true"/>
        <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>
        <barcode nil="true"/>
        <comment nil="true"/>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <discounts-amount type="decimal">60.0</discounts-amount>
        <id type="integer">6</id>
        <order-id type="integer">3</order-id>
        <product-id type="integer" nil="true"/>
        <sale-price type="decimal">100.0</sale-price>
        <sku>426</sku>
        <title>shirt</title>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <variant-id type="integer">2</variant-id>
        <weight type="decimal">0.3</weight>
        <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>
    <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"/>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
  <order>
    <accepted-at type="timestamp" nil="true"/>
    <account-id type="integer">1</account-id>
    <comment>comment</comment>
    <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
    <current-location>/</current-location>
    <delivered-at type="timestamp" nil="true"/>
    <delivery-date type="date" nil="true"/>
    <delivery-description>самовывоз</delivery-description>
    <delivery-from-hour type="integer" nil="true"/>
    <delivery-price type="decimal">100.0</delivery-price>
    <delivery-title nil="true"/>
    <delivery-to-hour type="integer" nil="true"/>
    <delivery-variant-id type="integer">1</delivery-variant-id>
    <financial-status>pending</financial-status>
    <first-current-location>/my_query</first-current-location>
    <first-referer>http://google.com?q=my_query</first-referer>
    <fulfillment-status>new</fulfillment-status>
    <id type="integer">1</id>
    <key>teest</key>
    <manager-comment nil="true"/>
    <margin type="decimal">0.0</margin>
    <number type="integer">1001</number>
    <paid-at type="timestamp" nil="true"/>
    <payment-description nil="true"/>
    <payment-gateway-id type="integer">1</payment-gateway-id>
    <payment-title>наличными курьеру</payment-title>
    <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>
    <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
    <currency-code>RUR</currency-code>
    <fields-values type="array"/>
    <shipping-address>
      <address>address</address>
      <city>London</city>
      <country>RU</country>
      <id type="integer">1</id>
      <middlename nil="true"/>
      <name>Tom Dellay</name>
      <phone>+7(495)212-85-06</phone>
      <state>state</state>
      <surname nil="true"/>
      <zip>123456</zip>
      <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
      <full-name>Tom Dellay</full-name>
      <fields-values type="array"/>
    </shipping-address>
    <discounts type="array"/>
    <client>
      <bonus-points type="integer">0</bonus-points>
      <client-group-id type="integer" nil="true"/>
      <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
      <email>some-one@yandex.ru</email>
      <id type="integer">2</id>
      <middlename nil="true"/>
      <name>Mortimer Hant</name>
      <phone>+7(916)212-85-06</phone>
      <registered type="boolean">false</registered>
      <subscribe type="boolean">true</subscribe>
      <surname nil="true"/>
      <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
      <fields-values type="array"/>
      <ip_addr/>
    </client>
    <order-lines type="array">
      <order-line>
        <barcode nil="true"/>
        <comment nil="true"/>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <discounts-amount type="decimal">0.0</discounts-amount>
        <id type="integer">1</id>
        <order-id type="integer">1</order-id>
        <product-id type="integer">1</product-id>
        <sale-price type="decimal">300.0</sale-price>
        <sku>423</sku>
        <title>Cool t-shirt</title>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <variant-id type="integer">1</variant-id>
        <weight type="decimal" nil="true"/>
        <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>
        <barcode nil="true"/>
        <comment nil="true"/>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <discounts-amount type="decimal">0.0</discounts-amount>
        <id type="integer">2</id>
        <order-id type="integer">1</order-id>
        <product-id type="integer">2</product-id>
        <sale-price type="decimal">600.0</sale-price>
        <sku>424</sku>
        <title>shirt</title>
        <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
        <variant-id type="integer">2</variant-id>
        <weight type="decimal">0.3</weight>
        <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"/>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
  </order>
</orders>

Remove order line

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] order line sale price

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <state>state</state>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <fields-values type="array"/>
    <ip_addr/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">2</product-id>
      <sale-price type="decimal">600.0</sale-price>
      <sku>424</sku>
      <title>shirt</title>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">2</variant-id>
      <weight type="decimal">0.3</weight>
      <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>
<order-changes type="array">
  <order-change>
    <action>order_line_deleted</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">350</id>
    <user-name>Цифровые товары</user-name>
    <value-is nil="true"/>
    <value-was>
      <sale-price type="float">300.0</sale-price>
      <title>Cool t-shirt</title>
      <quantity type="integer">1</quantity>
    </value-was>
  </order-change>
</order-changes>
<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.

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp">2015-12-04 16:13:40 +0300</accepted-at>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>accepted</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <state>state</state>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <fields-values type="array"/>
    <ip_addr/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt</title>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <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>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">2</product-id>
      <sale-price type="decimal">600.0</sale-price>
      <sku>424</sku>
      <title>shirt</title>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">2</variant-id>
      <weight type="decimal">0.3</weight>
      <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>
<order-changes type="array">
  <order-change>
    <action>fulfillment_status_changed</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">343</id>
    <user-name>Цифровые товары</user-name>
    <value-is>accepted</value-is>
    <value-was>new</value-was>
  </order-change>
  <order-change>
    <action>custom_status_changed</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">342</id>
    <user-name>Цифровые товары</user-name>
    <value-is>В обработке</value-is>
    <value-was>Новый</value-was>
  </order-change>
  <order-change>
    <action>custom_status_changed</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">341</id>
    <user-name>Цифровые товары</user-name>
    <value-is>Новый</value-is>
    <value-was nil="true"/>
  </order-change>
</order-changes>
<custom-status>
  <permalink>accepted</permalink>
  <title>В обработке</title>
</custom-status>
</order>

Update order line

Parameters

Name Description
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

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
    </order-lines-attribute>
  </order-lines-attributes>
</order>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment nil="true"/>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2015-12-04 16:13:41 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+7(495)212-85-06</phone>
    <state>state</state>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>Россия, state, London, address, 123456</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <fields-values type="array"/>
    <ip_addr/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment>New comment</comment>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">100.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt</title>
      <updated-at type="timestamp">2015-12-04 16:13:40 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <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>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">2</product-id>
      <sale-price type="decimal">600.0</sale-price>
      <sku>424</sku>
      <title>shirt</title>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">2</variant-id>
      <weight type="decimal">0.3</weight>
      <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>
<order-changes type="array">
  <order-change>
    <action>order_line_quantity_changed</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">352</id>
    <user-name>Цифровые товары</user-name>
    <value-is>
      <title>Cool t-shirt</title>
      <quantity type="integer">2</quantity>
    </value-is>
    <value-was>
      <title>Cool t-shirt</title>
      <quantity type="integer">1</quantity>
    </value-was>
  </order-change>
  <order-change>
    <action>order_line_price_changed</action>
    <created-at type="datetime">2015-12-04T16:13:40+03:00</created-at>
    <id type="integer">351</id>
    <user-name>Цифровые товары</user-name>
    <value-is>
      <title>Cool t-shirt</title>
      <sale-price type="float">100.0</sale-price>
    </value-is>
    <value-was>
      <title>Cool t-shirt</title>
      <sale-price>300.0</sale-price>
    </value-was>
  </order-change>
</order-changes>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Update order

Parameters

Name Description
order[client] client info
order[client][name] client name
order[client][email] client email
order[client][phone] client phone
order[delivery_variant_id] delivery variant id
order[payment_gateway_id] payment gateway id
order[comment] client comment to order
order[manager_comment] manager comment to order
order[financial_status] pending or paid

Request

Route

PUT /admin/orders/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <client>
    <name>Ivan</name>
    <email>ivan@example.com</email>
    <phone>79111113344</phone>
  </client>
  <delivery-variant-id type="integer">2</delivery-variant-id>
  <payment-gateway-id type="integer">3</payment-gateway-id>
  <comment>Please call from 9 to 18</comment>
  <manager-comment>New client</manager-comment>
  <financial-status>paid</financial-status>
</order>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>Please call from 9 to 18</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>курьер ()</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">600.0</delivery-price>
  <delivery-title>курьер</delivery-title>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">2</delivery-variant-id>
  <financial-status>paid</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment>New client</manager-comment>
  <margin type="decimal">20.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp">2016-08-23 18:48:15 +0300</paid-at>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">3</payment-gateway-id>
  <payment-title>Выставление счета для юр. лиц.</payment-title>
  <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>
  <updated-at type="timestamp">2016-08-23 18:48:15 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <fields-values type="array"/>
  <shipping-address>
    <address>address</address>
    <city>London</city>
    <country>RU</country>
    <flat nil="true"/>
    <house nil="true"/>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+74952128506</phone>
    <state>state</state>
    <street nil="true"/>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>123456, state, London, address</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <correspondent-account nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <ip-addr nil="true"/>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <settlement-account nil="true"/>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <type>Client::Individual</type>
    <updated-at type="timestamp">2016-08-23 18:48:15 +0300</updated-at>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <fields-values type="array"/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt</title>
      <unit>pce</unit>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <quantity type="integer">1</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">360.0</full-sale-price>
      <total-price type="decimal">300.0</total-price>
      <full-total-price type="decimal">360.0</full-total-price>
    </order-line>
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">2</product-id>
      <sale-price type="decimal">600.0</sale-price>
      <sku>424</sku>
      <title>shirt</title>
      <unit>pce</unit>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">2</variant-id>
      <weight type="decimal">0.3</weight>
      <quantity type="integer">2</quantity>
      <reserved-quantity type="integer" nil="true"/>
      <full-sale-price type="decimal">720.0</full-sale-price>
      <total-price type="decimal">1200.0</total-price>
      <full-total-price type="decimal">1440.0</full-total-price>
    </order-line>
  </order-lines>
  <items-price type="decimal">1800.0</items-price>
  <total-price type="decimal">2520.0</total-price>
  <full-delivery-price type="decimal">720.0</full-delivery-price>
<order-changes type="array">
  <order-change>
    <action>payment_gateway_changed</action>
    <created-at type="datetime">2016-08-23T18:48:15+03:00</created-at>
    <id type="integer">413</id>
    <user-name>Цифровые товары</user-name>
    <value-is>Выставление счета для юр. лиц.</value-is>
    <value-was>наличными курьеру</value-was>
  </order-change>
  <order-change>
    <action>delivery_price_changed</action>
    <created-at type="datetime">2016-08-23T18:48:15+03:00</created-at>
    <id type="integer">412</id>
    <user-name>Цифровые товары</user-name>
    <value-is type="float">600.0</value-is>
    <value-was type="float">100.0</value-was>
  </order-change>
  <order-change>
    <action>delivery_variant_changed</action>
    <created-at type="datetime">2016-08-23T18:48:15+03:00</created-at>
    <id type="integer">411</id>
    <user-name>Цифровые товары</user-name>
    <value-is>курьер</value-is>
    <value-was nil="true"/>
  </order-change>
  <order-change>
    <action>financial_status_changed</action>
    <created-at type="datetime">2016-08-23T18:48:15+03:00</created-at>
    <id type="integer">410</id>
    <user-name>Цифровые товары</user-name>
    <value-is>paid</value-is>
    <value-was>pending</value-was>
  </order-change>
</order-changes>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Update shipping address

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <accepted-at type="timestamp" nil="true"/>
  <account-id type="integer">1</account-id>
  <comment>comment</comment>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <current-location>/</current-location>
  <delivered-at type="timestamp" nil="true"/>
  <delivery-date type="date" nil="true"/>
  <delivery-description>самовывоз</delivery-description>
  <delivery-from-hour type="integer" nil="true"/>
  <delivery-price type="decimal">100.0</delivery-price>
  <delivery-title nil="true"/>
  <delivery-to-hour type="integer" nil="true"/>
  <delivery-variant-id type="integer">1</delivery-variant-id>
  <financial-status>pending</financial-status>
  <first-current-location>/my_query</first-current-location>
  <first-referer>http://google.com?q=my_query</first-referer>
  <fulfillment-status>new</fulfillment-status>
  <id type="integer">1</id>
  <key>teest</key>
  <manager-comment>manager comment1</manager-comment>
  <margin type="decimal">0.0</margin>
  <number type="integer">1001</number>
  <paid-at type="timestamp" nil="true"/>
  <payment-description nil="true"/>
  <payment-gateway-id type="integer">1</payment-gateway-id>
  <payment-title>наличными курьеру</payment-title>
  <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>
  <updated-at type="timestamp">2016-08-10 12:08:23 +0300</updated-at>
  <currency-code>RUR</currency-code>
  <client-transaction-id type="integer">1</client-transaction-id>
  <fields-values type="array"/>
  <shipping-address>
    <address>Moscow, Znamenka 12</address>
    <city>London</city>
    <country>RU</country>
    <flat nil="true"/>
    <house nil="true"/>
    <id type="integer">1</id>
    <middlename nil="true"/>
    <name>Tom Dellay</name>
    <phone>+74952128506</phone>
    <state>state</state>
    <street nil="true"/>
    <surname nil="true"/>
    <zip>123456</zip>
    <full-delivery-address>123456, state, London, Moscow, Znamenka 12</full-delivery-address>
    <full-name>Tom Dellay</full-name>
    <fields-values type="array"/>
  </shipping-address>
  <discounts type="array"/>
  <client>
    <bonus-points type="integer">0</bonus-points>
    <client-group-id type="integer" nil="true"/>
    <correspondent-account nil="true"/>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <email>some-one@yandex.ru</email>
    <id type="integer">2</id>
    <ip-addr nil="true"/>
    <middlename nil="true"/>
    <name>Mortimer Hant</name>
    <phone>+7(916)212-85-06</phone>
    <registered type="boolean">false</registered>
    <settlement-account nil="true"/>
    <subscribe type="boolean">true</subscribe>
    <surname nil="true"/>
    <type>Client::Individual</type>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <progressive-discount nil="true"/>
    <group-discount nil="true"/>
    <fields-values type="array"/>
  </client>
  <order-lines type="array">
    <order-line>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">1</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">1</product-id>
      <sale-price type="decimal">300.0</sale-price>
      <sku>423</sku>
      <title>Cool t-shirt</title>
      <unit>pce</unit>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">1</variant-id>
      <weight type="decimal" nil="true"/>
      <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>
      <barcode nil="true"/>
      <comment nil="true"/>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <discounts-amount type="decimal">0.0</discounts-amount>
      <id type="integer">2</id>
      <order-id type="integer">1</order-id>
      <product-id type="integer">2</product-id>
      <sale-price type="decimal">600.0</sale-price>
      <sku>424</sku>
      <title>shirt</title>
      <unit>pce</unit>
      <updated-at type="timestamp">2009-03-18 10:53:15 +0300</updated-at>
      <variant-id type="integer">2</variant-id>
      <weight type="decimal">0.3</weight>
      <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"/>
<custom-status>
  <permalink>new</permalink>
  <title>Новый</title>
</custom-status>
</order>

Page

Create page

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <created-at type="timestamp">2016-04-21 14:53:17 +0300</created-at>
  <id type="integer">5</id>
  <updated-at type="timestamp">2016-04-21 14:53:17 +0300</updated-at>
  <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>
  <is-main type="boolean">false</is-main>
  <meta-description>It's a page about our new products</meta-description>
</page>

Delete page

Request

Route

DELETE /admin/pages/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Content-Type: application/x-www-form-urlencoded

Response

Status

200

Headers

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

Body

 

Get page

Request

Route

GET /admin/pages/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <created-at type="timestamp">2016-04-07 10:50:37 +0300</created-at>
  <id type="integer">1</id>
  <updated-at type="timestamp">2016-04-07 10:50:37 +0300</updated-at>
  <title>any_url</title>
  <content>abc</content>
  <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>
</page>

Get pages list

Request

Route

GET /admin/pages.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<pages type="array">
  <page>
    <created-at type="timestamp">2016-04-07 10:50:37 +0300</created-at>
    <id type="integer">1</id>
    <updated-at type="timestamp">2016-04-07 10:50:37 +0300</updated-at>
    <title>any_url</title>
    <content>abc</content>
    <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>
  </page>
</pages>

Update page

Parameters

Name Description
page[title] page title
page[content] 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

PUT /admin/pages/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

 

PaymentGateway

Create Cod or Custom payment_gateway

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

Request

Route

POST /admin/payment_gateways.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<cod>
  <created-at type="timestamp">2016-07-29 16:11:48 +0300</created-at>
  <id type="integer">176</id>
  <margin type="decimal">10.0</margin>
  <position type="integer">3</position>
  <type>PaymentGateway::Cod</type>
  <updated-at type="timestamp">2016-07-29 16:11:48 +0300</updated-at>
  <title>cash on delivery</title>
  <description>text</description>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 16:11:48 +0300</created-at>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <id type="integer">749</id>
    </payment-delivery-variant>
  </payment-delivery-variants>
</cod>

Create External payment_gateway

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

Request

Route

POST /admin/payment_gateways.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</payment-gateway>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<external>
  <created-at type="timestamp">2016-07-29 16:11:48 +0300</created-at>
  <id type="integer">178</id>
  <margin type="decimal">10.0</margin>
  <position type="integer">3</position>
  <type>PaymentGateway::External</type>
  <updated-at type="timestamp">2016-07-29 16:11:48 +0300</updated-at>
  <title>external payment gateway</title>
  <description>text</description>
  <password>9038db46fe0c7592</password>
  <url>payment-gateway.ru/transactions/create</url>
  <shop-id>123</shop-id>
  <success-url>http://quentin.mylocalhost.localdomain:3000/payments/external/178/success</success-url>
  <fail-url>http://quentin.mylocalhost.localdomain:3000/payments/external/178/fail</fail-url>
  <server-url>http://quentin.mylocalhost.localdomain:3000/payments/external/178/server</server-url>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 16:11:48 +0300</created-at>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <id type="integer">751</id>
    </payment-delivery-variant>
  </payment-delivery-variants>
</external>

Destroy payment_gateway

Request

Route

DELETE /admin/payment_gateways/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get payment_gateway

Request

Route

GET /admin/payment_gateways/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<cod>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <id type="integer">1</id>
  <margin type="decimal">0.0</margin>
  <position type="integer">1</position>
  <type>PaymentGateway::Cod</type>
  <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
  <title>Наличными курьеру</title>
  <description></description>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <id type="integer">1</id>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
      <delivery-variant-id type="integer">2</delivery-variant-id>
      <id type="integer">2</id>
    </payment-delivery-variant>
  </payment-delivery-variants>
</cod>

Get payment_gateways

Request

Route

GET /admin/payment_gateways.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <object>
    <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
    <id type="integer">1</id>
    <margin type="decimal">0.0</margin>
    <position type="integer">1</position>
    <type>PaymentGateway::Cod</type>
    <updated-at type="timestamp">2009-03-31 12:20:34 +0400</updated-at>
    <title>Наличными курьеру</title>
    <description></description>
    <payment-delivery-variants type="array">
      <payment-delivery-variant>
        <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
        <delivery-variant-id type="integer">1</delivery-variant-id>
        <id type="integer">1</id>
      </payment-delivery-variant>
      <payment-delivery-variant>
        <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
        <delivery-variant-id type="integer">2</delivery-variant-id>
        <id type="integer">2</id>
      </payment-delivery-variant>
    </payment-delivery-variants>
  </object>
  <object>
    <created-at type="timestamp">2009-03-17 10:55:14 +0300</created-at>
    <id type="integer">3</id>
    <margin type="decimal">20.0</margin>
    <position type="integer">2</position>
    <type>PaymentGateway::JuridicalPersonBill</type>
    <updated-at type="timestamp">2009-03-17 10:55:15 +0300</updated-at>
    <title>Выставление счета для юр. лиц.</title>
    <description></description>
    <payment-delivery-variants type="array"/>
  </object>
</objects>

Update payment_gateway

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<cod>
  <created-at type="timestamp">2009-03-30 04:37:32 +0400</created-at>
  <id type="integer">1</id>
  <margin type="decimal">10.0</margin>
  <position type="integer">1</position>
  <type>PaymentGateway::Cod</type>
  <updated-at type="timestamp">2016-07-29 16:11:48 +0300</updated-at>
  <title>cash</title>
  <description>description</description>
  <payment-delivery-variants type="array">
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-22 13:39:47 +0300</created-at>
      <delivery-variant-id type="integer">1</delivery-variant-id>
      <id type="integer">1</id>
    </payment-delivery-variant>
    <payment-delivery-variant>
      <created-at type="timestamp">2016-07-29 16:11:49 +0300</created-at>
      <delivery-variant-id type="integer">2</delivery-variant-id>
      <id type="integer">753</id>
    </payment-delivery-variant>
  </payment-delivery-variants>
</cod>

Product

Create product

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

Request

Route

POST /admin/products.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</product>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <archived type="boolean">false</archived>
  <available type="boolean" nil="true"/>
  <canonical-url-collection-id type="integer" nil="true"/>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2016-04-21 14:53:03 +0300</created-at>
  <id type="integer">425</id>
  <is-hidden type="boolean">false</is-hidden>
  <sort-weight type="float" nil="true"/>
  <unit>pce</unit>
  <updated-at type="timestamp">2016-04-21 14:53:03 +0300</updated-at>
  <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"/>
  <images type="array"/>
  <option-names type="array"/>
  <properties type="array"/>
  <characteristics type="array"/>
  <product-field-values type="array"/>
  <variants type="array">
    <variant>
      <barcode nil="true"/>
      <cost-price type="decimal" nil="true"/>
      <created-at type="timestamp">2016-04-21 14:53:03 +0300</created-at>
      <id type="integer">883</id>
      <old-price type="decimal" nil="true"/>
      <price type="decimal">740.0</price>
      <product-id type="integer">425</product-id>
      <sku>QP021MVEN-r</sku>
      <updated-at type="timestamp">2016-04-21 14:53:03 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <price2 nil="true"/>
      <title></title>
      <option-values type="array"/>
      <quantity type="integer">1</quantity>
    </variant>
  </variants>
  <description/>
</product>

Destroy product

Request

Route

DELETE /admin/products/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get product

Request

Route

GET /admin/products/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <archived type="boolean">false</archived>
  <available type="boolean">false</available>
  <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
  <id type="integer">1</id>
  <is-hidden type="boolean">false</is-hidden>
  <sort-weight type="float" nil="true"/>
  <unit>pce</unit>
  <updated-at type="timestamp">2016-04-07 10:50:38 +0300</updated-at>
  <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>
  <images type="array"/>
  <option-names type="array">
    <option-name>
      <id type="integer">1</id>
      <position type="integer">1</position>
      <title>Модификация</title>
    </option-name>
  </option-names>
  <properties type="array">
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">6</id>
      <is-hidden type="boolean">true</is-hidden>
      <is-navigational type="boolean">true</is-navigational>
      <position type="integer">1</position>
      <permalink>hidden</permalink>
      <title>hidden</title>
    </property>
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">8</id>
      <is-hidden type="boolean">false</is-hidden>
      <is-navigational type="boolean">false</is-navigational>
      <position type="integer">3</position>
      <permalink>not_navigational</permalink>
      <title>not_navigational</title>
    </property>
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">4</id>
      <is-hidden type="boolean">false</is-hidden>
      <is-navigational type="boolean">true</is-navigational>
      <position type="integer">5</position>
      <permalink>style</permalink>
      <title>Style</title>
    </property>
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">3</id>
      <is-hidden type="boolean">false</is-hidden>
      <is-navigational type="boolean">true</is-navigational>
      <position type="integer">6</position>
      <permalink>vendor</permalink>
      <title>Vendor</title>
    </property>
  </properties>
  <characteristics type="array">
    <characteristic>
      <id type="integer">7</id>
      <position type="integer">1</position>
      <property-id type="integer">3</property-id>
      <title>Nike</title>
      <permalink>nike</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">9</id>
      <position type="integer">1</position>
      <property-id type="integer">4</property-id>
      <title>Old</title>
      <permalink>old</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">12</id>
      <position type="integer">1</position>
      <property-id type="integer">6</property-id>
      <title>Hidden</title>
      <permalink>Hidden</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">13</id>
      <position type="integer">1</position>
      <property-id type="integer">8</property-id>
      <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>
      <barcode nil="true"/>
      <cost-price type="decimal">3.0</cost-price>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <id type="integer">1</id>
      <old-price type="decimal" nil="true"/>
      <price type="decimal">10.0</price>
      <product-id type="integer">1</product-id>
      <sku>423</sku>
      <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <price2 type="float">12.0</price2>
      <title>Red</title>
      <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>
        </option-value>
      </option-values>
      <quantity type="integer">0</quantity>
    </variant>
  </variants>
  <description>guys, its a really cool t-shirt</description>
</product>

Get products count

Request

Route

GET /admin/products/count.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get products

Request

Route

GET /admin/products.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<products type="array">
  <product>
    <archived type="boolean">false</archived>
    <available type="boolean">false</available>
    <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
    <category-id type="integer">1</category-id>
    <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
    <id type="integer">1</id>
    <is-hidden type="boolean">false</is-hidden>
    <sort-weight type="float" nil="true"/>
    <unit>pce</unit>
    <updated-at type="timestamp">2016-04-07 10:50:38 +0300</updated-at>
    <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>
    <images type="array"/>
    <option-names type="array">
      <option-name>
        <id type="integer">1</id>
        <position type="integer">1</position>
        <title>Модификация</title>
      </option-name>
    </option-names>
    <properties type="array">
      <property>
        <backoffice type="boolean">false</backoffice>
        <id type="integer">6</id>
        <is-hidden type="boolean">true</is-hidden>
        <is-navigational type="boolean">true</is-navigational>
        <position type="integer">1</position>
        <permalink>hidden</permalink>
        <title>hidden</title>
      </property>
      <property>
        <backoffice type="boolean">false</backoffice>
        <id type="integer">8</id>
        <is-hidden type="boolean">false</is-hidden>
        <is-navigational type="boolean">false</is-navigational>
        <position type="integer">3</position>
        <permalink>not_navigational</permalink>
        <title>not_navigational</title>
      </property>
      <property>
        <backoffice type="boolean">false</backoffice>
        <id type="integer">4</id>
        <is-hidden type="boolean">false</is-hidden>
        <is-navigational type="boolean">true</is-navigational>
        <position type="integer">5</position>
        <permalink>style</permalink>
        <title>Style</title>
      </property>
      <property>
        <backoffice type="boolean">false</backoffice>
        <id type="integer">3</id>
        <is-hidden type="boolean">false</is-hidden>
        <is-navigational type="boolean">true</is-navigational>
        <position type="integer">6</position>
        <permalink>vendor</permalink>
        <title>Vendor</title>
      </property>
    </properties>
    <characteristics type="array">
      <characteristic>
        <id type="integer">7</id>
        <position type="integer">1</position>
        <property-id type="integer">3</property-id>
        <title>Nike</title>
        <permalink>nike</permalink>
      </characteristic>
      <characteristic>
        <id type="integer">9</id>
        <position type="integer">1</position>
        <property-id type="integer">4</property-id>
        <title>Old</title>
        <permalink>old</permalink>
      </characteristic>
      <characteristic>
        <id type="integer">12</id>
        <position type="integer">1</position>
        <property-id type="integer">6</property-id>
        <title>Hidden</title>
        <permalink>Hidden</permalink>
      </characteristic>
      <characteristic>
        <id type="integer">13</id>
        <position type="integer">1</position>
        <property-id type="integer">8</property-id>
        <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>
        <barcode nil="true"/>
        <cost-price type="decimal">3.0</cost-price>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <id type="integer">1</id>
        <old-price type="decimal" nil="true"/>
        <price type="decimal">10.0</price>
        <product-id type="integer">1</product-id>
        <sku>423</sku>
        <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
        <weight type="decimal" nil="true"/>
        <price2 type="float">12.0</price2>
        <title>Red</title>
        <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>
          </option-value>
        </option-values>
        <quantity type="integer">0</quantity>
      </variant>
    </variants>
    <description>guys, its a really cool t-shirt</description>
  </product>
  <product>
    <archived type="boolean">false</archived>
    <available type="boolean">true</available>
    <canonical-url-collection-id type="integer" nil="true"/>
    <category-id type="integer">1</category-id>
    <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
    <id type="integer">2</id>
    <is-hidden type="boolean">false</is-hidden>
    <sort-weight type="float" nil="true"/>
    <unit>pce</unit>
    <updated-at type="timestamp">2016-04-07 10:50:38 +0300</updated-at>
    <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>
    <images type="array"/>
    <option-names type="array">
      <option-name>
        <id type="integer">1</id>
        <position type="integer">1</position>
        <title>Модификация</title>
      </option-name>
      <option-name>
        <id type="integer">3</id>
        <position type="integer">2</position>
        <title>Цвет</title>
      </option-name>
    </option-names>
    <properties type="array">
      <property>
        <backoffice type="boolean">false</backoffice>
        <id type="integer">4</id>
        <is-hidden type="boolean">false</is-hidden>
        <is-navigational type="boolean">true</is-navigational>
        <position type="integer">5</position>
        <permalink>style</permalink>
        <title>Style</title>
      </property>
    </properties>
    <characteristics type="array">
      <characteristic>
        <id type="integer">10</id>
        <position type="integer">2</position>
        <property-id type="integer">4</property-id>
        <title>New</title>
        <permalink>new</permalink>
      </characteristic>
    </characteristics>
    <product-field-values type="array"/>
    <variants type="array">
      <variant>
        <barcode nil="true"/>
        <cost-price type="decimal" nil="true"/>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <id type="integer">2</id>
        <old-price type="decimal" nil="true"/>
        <price type="decimal">20.0</price>
        <product-id type="integer">2</product-id>
        <sku>424</sku>
        <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
        <weight type="decimal">0.3</weight>
        <price2 nil="true"/>
        <title>Зеленый / Синий</title>
        <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>
          </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>
          </option-value>
        </option-values>
        <quantity type="integer" nil="true"/>
      </variant>
    </variants>
    <description/>
  </product>
  <product>
    <archived type="boolean">false</archived>
    <available type="boolean">true</available>
    <canonical-url-collection-id type="integer" nil="true"/>
    <category-id type="integer">6</category-id>
    <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
    <id type="integer">3</id>
    <is-hidden type="boolean">false</is-hidden>
    <sort-weight type="float" nil="true"/>
    <unit>pce</unit>
    <updated-at type="timestamp">2016-04-07 10:50:38 +0300</updated-at>
    <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>
    <images type="array"/>
    <option-names type="array">
      <option-name>
        <id type="integer">1</id>
        <position type="integer">1</position>
        <title>Модификация</title>
      </option-name>
    </option-names>
    <properties type="array"/>
    <characteristics type="array"/>
    <product-field-values type="array"/>
    <variants type="array">
      <variant>
        <barcode nil="true"/>
        <cost-price type="decimal" nil="true"/>
        <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
        <id type="integer">3</id>
        <old-price type="decimal" nil="true"/>
        <price type="decimal">20.0</price>
        <product-id type="integer">3</product-id>
        <sku>425</sku>
        <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
        <weight type="decimal" nil="true"/>
        <price2 nil="true"/>
        <title>Базовая</title>
        <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>
          </option-value>
        </option-values>
        <quantity type="integer" nil="true"/>
      </variant>
    </variants>
    <description/>
  </product>
</products>

Update product

Parameters

Name Description
product[title] title

Request

Route

PUT /admin/products/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <title>Van Gogh Notebook</title>
</product>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product>
  <archived type="boolean">false</archived>
  <available type="boolean">false</available>
  <canonical-url-collection-id type="integer">1</canonical-url-collection-id>
  <category-id type="integer">1</category-id>
  <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
  <id type="integer">1</id>
  <is-hidden type="boolean">false</is-hidden>
  <sort-weight type="float" nil="true"/>
  <unit>pce</unit>
  <updated-at type="timestamp">2016-04-21 14:53:04 +0300</updated-at>
  <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>
  <images type="array"/>
  <option-names type="array">
    <option-name>
      <id type="integer">1</id>
      <position type="integer">1</position>
      <title>Модификация</title>
    </option-name>
  </option-names>
  <properties type="array">
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">6</id>
      <is-hidden type="boolean">true</is-hidden>
      <is-navigational type="boolean">true</is-navigational>
      <position type="integer">1</position>
      <permalink>hidden</permalink>
      <title>hidden</title>
    </property>
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">8</id>
      <is-hidden type="boolean">false</is-hidden>
      <is-navigational type="boolean">false</is-navigational>
      <position type="integer">3</position>
      <permalink>not_navigational</permalink>
      <title>not_navigational</title>
    </property>
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">4</id>
      <is-hidden type="boolean">false</is-hidden>
      <is-navigational type="boolean">true</is-navigational>
      <position type="integer">5</position>
      <permalink>style</permalink>
      <title>Style</title>
    </property>
    <property>
      <backoffice type="boolean">false</backoffice>
      <id type="integer">3</id>
      <is-hidden type="boolean">false</is-hidden>
      <is-navigational type="boolean">true</is-navigational>
      <position type="integer">6</position>
      <permalink>vendor</permalink>
      <title>Vendor</title>
    </property>
  </properties>
  <characteristics type="array">
    <characteristic>
      <id type="integer">7</id>
      <position type="integer">1</position>
      <property-id type="integer">3</property-id>
      <title>Nike</title>
      <permalink>nike</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">9</id>
      <position type="integer">1</position>
      <property-id type="integer">4</property-id>
      <title>Old</title>
      <permalink>old</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">12</id>
      <position type="integer">1</position>
      <property-id type="integer">6</property-id>
      <title>Hidden</title>
      <permalink>Hidden</permalink>
    </characteristic>
    <characteristic>
      <id type="integer">13</id>
      <position type="integer">1</position>
      <property-id type="integer">8</property-id>
      <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>
      <barcode nil="true"/>
      <cost-price type="decimal">3.0</cost-price>
      <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
      <id type="integer">1</id>
      <old-price type="decimal" nil="true"/>
      <price type="decimal">10.0</price>
      <product-id type="integer">1</product-id>
      <sku>423</sku>
      <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
      <weight type="decimal" nil="true"/>
      <price2 type="float">12.0</price2>
      <title>Red</title>
      <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>
        </option-value>
      </option-values>
      <quantity type="integer">0</quantity>
    </variant>
  </variants>
  <description>guys, its a really cool t-shirt</description>
</product>

ProductField

Create product_field

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

Request

Route

POST /admin/product_fields.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

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

Destroy product_field

Request

Route

DELETE /admin/product_fields/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get product_field

Request

Route

GET /admin/product_fields/2.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

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

Get product_fields

Request

Route

GET /admin/product_fields.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<objects type="array">
  <product-field>
    <application-id type="integer" nil="true"/>
    <handle>handle</handle>
    <id type="integer">1</id>
    <is-hidden type="boolean" nil="true"/>
    <position type="integer">1</position>
    <type>ProductField::TextField</type>
    <title>title</title>
  </product-field>
  <product-field>
    <application-id type="integer" nil="true"/>
    <handle>yml_import</handle>
    <id type="integer">4</id>
    <is-hidden type="boolean" nil="true"/>
    <position type="integer">1</position>
    <type>ProductField::YmlImportField</type>
    <title>import field</title>
  </product-field>
  <product-field>
    <application-id type="integer">1</application-id>
    <handle>handle2</handle>
    <id type="integer">2</id>
    <is-hidden type="boolean" nil="true"/>
    <position type="integer">2</position>
    <type>ProductField::TextArea</type>
    <title>title2</title>
  </product-field>
</objects>

Update product_field

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

Request

Route

PUT /admin/product_fields/2.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

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

ProductFieldValue

Create product_field_value

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<product-field-value>
  <id type="integer">106</id>
  <product-field-id type="integer">2</product-field-id>
  <value>test value</value>
</product-field-value>

Destroy product_field_value

Request

Route

DELETE /admin/products/1/product_field_values/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get product_field_value

Request

Route

GET /admin/products/1/product_field_values/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

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

Request

Route

GET /admin/products/1/product_field_values.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

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

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

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

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<property>
  <backoffice type="boolean">true</backoffice>
  <id type="integer">194</id>
  <is-hidden type="boolean">false</is-hidden>
  <is-navigational type="boolean">true</is-navigational>
  <position type="integer">9</position>
  <permalink>country</permalink>
  <title>Country</title>
</property>

Destroy property

Request

Route

DELETE /admin/properties/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get properties

Request

Route

GET /admin/properties.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<properties type="array">
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">6</id>
    <is-hidden type="boolean">true</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">1</position>
    <permalink>hidden</permalink>
    <title>hidden</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">7</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">2</position>
    <permalink>visible</permalink>
    <title>visible</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">8</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">false</is-navigational>
    <position type="integer">3</position>
    <permalink>not_navigational</permalink>
    <title>not_navigational</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">5</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">4</position>
    <permalink>параметр</permalink>
    <title>параметр</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">4</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">5</position>
    <permalink>style</permalink>
    <title>Style</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">3</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">6</position>
    <permalink>vendor</permalink>
    <title>Vendor</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">2</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">7</position>
    <permalink>importer</permalink>
    <title>Importer</title>
  </property>
  <property>
    <backoffice type="boolean">false</backoffice>
    <id type="integer">1</id>
    <is-hidden type="boolean">false</is-hidden>
    <is-navigational type="boolean">true</is-navigational>
    <position type="integer">8</position>
    <permalink>producer</permalink>
    <title>Producer</title>
  </property>
</properties>

Get property

Request

Route

GET /admin/properties/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<property>
  <backoffice type="boolean">false</backoffice>
  <id type="integer">1</id>
  <is-hidden type="boolean">false</is-hidden>
  <is-navigational type="boolean">true</is-navigational>
  <position type="integer">8</position>
  <permalink>producer</permalink>
  <title>Producer</title>
</property>

Update property

Parameters

Name Description
property[title] title

Request

Route

PUT /admin/properties/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<property>
  <backoffice type="boolean">false</backoffice>
  <id type="integer">1</id>
  <is-hidden type="boolean">false</is-hidden>
  <is-navigational type="boolean">true</is-navigational>
  <position type="integer">8</position>
  <permalink>producer</permalink>
  <title>Brand country</title>
</property>

RecurringApplicationCharge

Create recurring_application_charge

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

Parameters

Name Description
recurring_application_charge[monthly] required amount of monthly payment

Request

Route

POST /admin/recurring_application_charge.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<recurring-application-charge>
  <blocked type="boolean">false</blocked>
  <created-at type="datetime">2016-08-23T11:23:44+03:00</created-at>
  <id type="integer">185</id>
  <monthly type="decimal">200.0</monthly>
  <paid-till type="date">2016-08-30</paid-till>
  <trial-expired-at type="date">2016-08-30</trial-expired-at>
  <updated-at type="datetime">2016-08-23T11:23:44+03:00</updated-at>
</recurring-application-charge>

Destroy recurring_application_charge

Request

Route

DELETE /admin/recurring_application_charge.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get recurring_application_charge

Request

Route

GET /admin/recurring_application_charge.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<recurring-application-charge>
  <blocked type="boolean">false</blocked>
  <created-at type="datetime">2016-08-23T11:23:44+03:00</created-at>
  <id type="integer">183</id>
  <monthly type="decimal">1190.0</monthly>
  <paid-till type="date">2016-08-30</paid-till>
  <trial-expired-at type="date">2016-08-30</trial-expired-at>
  <updated-at type="datetime">2016-08-23T11:23:44+03:00</updated-at>
</recurring-application-charge>

Update recurring_application_charge

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<recurring-application-charge>
  <blocked type="boolean">false</blocked>
  <created-at type="datetime">2016-08-23T11:23:45+03:00</created-at>
  <id type="integer">187</id>
  <monthly type="decimal">300.0</monthly>
  <paid-till type="date">2016-08-30</paid-till>
  <trial-expired-at type="date">2016-08-30</trial-expired-at>
  <updated-at type="datetime">2016-08-23T11:23:45+03:00</updated-at>
</recurring-application-charge>

Redirect

Create redirect

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<redirect>
  <created-at type="datetime">2016-07-19T12:16:08+03:00</created-at>
  <id type="integer">76</id>
  <new-url>/new_url</new-url>
  <old-url>/old_url</old-url>
</redirect>

Destroy redirect

Request

Route

DELETE /admin/redirects/59.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get redirect

Request

Route

GET /admin/redirects/53.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<redirect>
  <created-at type="datetime">2016-07-18T18:55:31+03:00</created-at>
  <id type="integer">53</id>
  <new-url>/client_account/login</new-url>
  <old-url>/lk</old-url>
</redirect>

Get redirects

Request

Route

GET /admin/redirects.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<redirects type="array">
  <redirect>
    <created-at type="datetime">2016-07-18T18:55:31+03:00</created-at>
    <id type="integer">51</id>
    <new-url>/client_account/login</new-url>
    <old-url>/lk</old-url>
  </redirect>
</redirects>

Review

Create review

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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<review>
  <author>Bob</author>
  <content>Nice product! I'd like to buy it!</content>
  <created-at type="timestamp">2016-04-21 14:53:08 +0300</created-at>
  <email>bob@gmail.com</email>
  <id type="integer">2</id>
  <product-id type="integer">1</product-id>
  <published type="boolean">true</published>
  <rating type="integer">7</rating>
  <updated-at type="timestamp">2016-04-21 14:53:08 +0300</updated-at>
</review>

Destroy review

Request

Route

DELETE /admin/reviews/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get review

Request

Route

GET /admin/reviews/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<review>
  <author>Автор</author>
  <content>Комментарий</content>
  <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
  <email>email@email.com</email>
  <id type="integer">1</id>
  <product-id type="integer">1</product-id>
  <published type="boolean">true</published>
  <rating type="integer">5</rating>
  <updated-at type="timestamp">2016-04-07 10:50:38 +0300</updated-at>
</review>

Get reviews

Request

Route

GET /admin/reviews.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<reviews type="array">
  <review>
    <author>Автор</author>
    <content>Комментарий</content>
    <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
    <email>email@email.com</email>
    <id type="integer">1</id>
    <product-id type="integer">1</product-id>
    <published type="boolean">true</published>
    <rating type="integer">5</rating>
    <updated-at type="timestamp">2016-04-07 10:50:38 +0300</updated-at>
  </review>
</reviews>

Update review

Parameters

Name Description
review[content] content

Request

Route

PUT /admin/reviews/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<review>
  <author>Автор</author>
  <content>Sweet product!</content>
  <created-at type="timestamp">2016-04-07 10:50:38 +0300</created-at>
  <email>email@email.com</email>
  <id type="integer">1</id>
  <product-id type="integer">1</product-id>
  <published type="boolean">true</published>
  <rating type="integer">5</rating>
  <updated-at type="timestamp">2016-04-21 14:53:08 +0300</updated-at>
</review>

Similar

Create similar

Parameters

Name Description
similar_ids required similar ids array

Request

Route

POST /admin/products/1/similars.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

 

Destroy similar

Request

Route

DELETE /admin/products/1/similars/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get similars

Request

Route

GET /admin/products/1/similars.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

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.

Parameters

Name Description
stock_currency[code] required Available codes: LVL, BYR, 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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<stock-currency>
  <exchange-rate-manual type="decimal" nil="true"/>
  <exchange-rate-percent type="decimal">10.0</exchange-rate-percent>
  <exchange-rate-use-cb type="boolean">true</exchange-rate-use-cb>
  <id type="integer">39</id>
  <is-default type="boolean">false</is-default>
  <code>KZT</code>
  <name>Казахский тенге</name>
  <cb-rate type="float">0.21</cb-rate>
  <unit>тг.</unit>
</stock-currency>

Get stock currencies

Request

Route

GET /admin/stock_currencies.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<stock-currencies type="array">
  <stock-currency>
    <exchange-rate-manual type="decimal">30.0</exchange-rate-manual>
    <exchange-rate-percent type="decimal">0.0</exchange-rate-percent>
    <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
    <id type="integer">1</id>
    <is-default type="boolean">true</is-default>
    <code>LVL</code>
    <name>Латвийский лат</name>
    <cb-rate type="float">30.0</cb-rate>
    <unit>Ls</unit>
  </stock-currency>
</stock-currencies>

Get stock currency

Request

Route

GET /admin/stock_currencies/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<stock-currency>
  <exchange-rate-manual type="decimal">30.0</exchange-rate-manual>
  <exchange-rate-percent type="decimal">0.0</exchange-rate-percent>
  <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
  <id type="integer">1</id>
  <is-default type="boolean">true</is-default>
  <code>LVL</code>
  <name>Латвийский лат</name>
  <cb-rate type="float">30.0</cb-rate>
  <unit>Ls</unit>
</stock-currency>

Update stock_currency

Parameters

Name Description
stock_currency[code] Available codes: LVL, BYR, 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 ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<stock-currency>
  <exchange-rate-manual type="decimal">40.0</exchange-rate-manual>
  <exchange-rate-percent type="decimal">0.0</exchange-rate-percent>
  <exchange-rate-use-cb type="boolean">false</exchange-rate-use-cb>
  <id type="integer">1</id>
  <is-default type="boolean">true</is-default>
  <code>UAH</code>
  <name>Украинская гривна</name>
  <cb-rate type="float">5.0</cb-rate>
  <unit>грн.</unit>
</stock-currency>

Supplementary

Create supplementary

Parameters

Name Description
supplementary_ids required supplementary ids array

Request

Route

POST /admin/products/1/supplementaries.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

200

Headers

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

Body

 

Destroy supplementary

Request

Route

DELETE /admin/products/1/supplementaries/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get supplementaries

Request

Route

GET /admin/products/1/supplementaries.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<products type="array">
  <product>
    <id type="integer">3</id>
  </product>
</products>

Variant

Create variant

Parameters

Name Description
variant[price] required price
variant[quantity] required quantity
variant[options] options

Request

Route

POST /admin/products/1/variants.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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>
</variant>

Response

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant>
  <barcode nil="true"/>
  <cost-price type="decimal" nil="true"/>
  <created-at type="timestamp">2016-04-21 14:53:09 +0300</created-at>
  <id type="integer">885</id>
  <old-price type="decimal" nil="true"/>
  <price type="decimal">100.0</price>
  <product-id type="integer">1</product-id>
  <sku nil="true"/>
  <updated-at type="timestamp">2016-04-21 14:53:09 +0300</updated-at>
  <weight type="decimal" nil="true"/>
  <price2 nil="true"/>
  <title>Black</title>
  <option-values type="array">
    <option-value>
      <id type="integer">667</id>
      <option-name-id type="integer">1</option-name-id>
      <position type="integer">4</position>
      <title>Black</title>
    </option-value>
  </option-values>
  <quantity type="integer">1</quantity>
</variant>

Destroy variant

Request

Route

DELETE /admin/products/1/variants/1.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get variant

Request

Route

GET /admin/products/1/variants/1.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant>
  <barcode nil="true"/>
  <cost-price type="decimal">3.0</cost-price>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <id type="integer">1</id>
  <old-price type="decimal" nil="true"/>
  <price type="decimal">10.0</price>
  <product-id type="integer">1</product-id>
  <sku>423</sku>
  <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
  <weight type="decimal" nil="true"/>
  <price2 type="float">12.0</price2>
  <title>Red</title>
  <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>
    </option-value>
  </option-values>
  <quantity type="integer">0</quantity>
</variant>

Get variants

Request

Route

GET /admin/products/1/variants.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variants type="array">
  <variant>
    <barcode nil="true"/>
    <cost-price type="decimal">3.0</cost-price>
    <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
    <id type="integer">1</id>
    <old-price type="decimal" nil="true"/>
    <price type="decimal">10.0</price>
    <product-id type="integer">1</product-id>
    <sku>423</sku>
    <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
    <weight type="decimal" nil="true"/>
    <price2 type="float">12.0</price2>
    <title>Red</title>
    <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>
      </option-value>
    </option-values>
    <quantity type="integer">0</quantity>
  </variant>
</variants>

Get variants

Request

Route

GET /admin/products/1/variants.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variants type="array">
  <variant>
    <barcode nil="true"/>
    <cost-price type="decimal">3.0</cost-price>
    <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
    <id type="integer">1</id>
    <old-price type="decimal" nil="true"/>
    <price type="decimal">10.0</price>
    <product-id type="integer">1</product-id>
    <sku>423</sku>
    <updated-at type="timestamp">2009-03-18 10:53:14 +0300</updated-at>
    <weight type="decimal" nil="true"/>
    <price2 type="float">12.0</price2>
    <title>Red</title>
    <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>
      </option-value>
    </option-values>
    <quantity type="integer">0</quantity>
  </variant>
</variants>

Update variant

Parameters

Name Description
variant[price] price
variant[quantity] quantity

Request

Route

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

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant>
  <price type="integer">150</price>
  <quantity type="integer">2</quantity>
</variant>

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<variant>
  <barcode nil="true"/>
  <cost-price type="decimal">3.0</cost-price>
  <created-at type="timestamp">2009-03-18 10:53:14 +0300</created-at>
  <id type="integer">1</id>
  <old-price type="decimal" nil="true"/>
  <price type="decimal">150.0</price>
  <product-id type="integer">1</product-id>
  <sku>423</sku>
  <updated-at type="timestamp">2016-04-21 14:53:10 +0300</updated-at>
  <weight type="decimal" nil="true"/>
  <price2 type="float">12.0</price2>
  <title>Red</title>
  <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>
    </option-value>
  </option-values>
  <quantity type="integer">2</quantity>
</variant>

Webhook

Create webhook

Parameters

Name Description
webhook[address] required address
webhook[topic] required For now only 'orders/update' and 'orders/create' are available
webhook[format_type] format of data sent by webhook: 'json' or 'xml'

Request

Route

POST /admin/webhooks.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

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

Status

201

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<webhook>
  <address>http://application.com/orders/create</address>
  <created-at type="datetime">2016-07-21T10:15:12+03:00</created-at>
  <id type="integer">437</id>
  <topic>orders/create</topic>
  <format-type>json</format-type>
</webhook>

Destroy webhook

Request

Route

DELETE /admin/webhooks/442.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

 

Get webhook

Request

Route

GET /admin/webhooks/434.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<webhook>
  <address>http://app.ru/orders/create</address>
  <created-at type="datetime">2016-07-21T10:15:12+03:00</created-at>
  <id type="integer">434</id>
  <topic>orders/create</topic>
  <format-type>xml</format-type>
</webhook>

Get webhooks

Request

Route

GET /admin/webhooks.xml

Headers

Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<webhooks type="array">
  <webhook>
    <address>http://app.ru/orders/create</address>
    <created-at type="datetime">2016-07-21T10:15:11+03:00</created-at>
    <id type="integer">432</id>
    <topic>orders/create</topic>
    <format-type>xml</format-type>
  </webhook>
</webhooks>

Update webhook

Parameters

Name Description
webhook[address] address
webhook[topic] For now only 'orders/update' and 'orders/create' are available
webhook[format_type] format of data sent by webhook: json or xml

Request

Route

PUT /admin/webhooks/440.xml

Headers

Content-Type: application/xml
Authorization: Basic ZGlnaXRhbC1nb29kczpjNTFjOTA3MDdhMTNjZTNmZmYyMTNhZmJiNWNkMTI3
MA==

Body

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

Response

Status

200

Headers

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

Body

<?xml version="1.0" encoding="UTF-8"?>
<webhook>
  <address>http://app.ru/orders/create</address>
  <created-at type="datetime">2016-07-21T10:15:12+03:00</created-at>
  <id type="integer">440</id>
  <topic>orders/create</topic>
  <format-type>xml</format-type>
</webhook>