InSales API - Размещение товаров на сайте
Материал из Insales Wiki
Версия от 13:26, 16 августа 2010; Vb (обсуждение | вклад) (Новая: =Получение списка размещений= Зарос: GET /admin/collects.xml Ответ: <per> HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <collects type="array...)
Содержание
Получение списка размещений
Зарос: GET /admin/collects.xml
Ответ: <per> HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <collects type="array">
<collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-07 02:22:12 +0400</created-at> <id type="integer">742440</id> <position type="integer">5</position> <product-id type="integer">806547</product-id> </collect> <collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-07 02:07:46 +0400</created-at> <id type="integer">742439</id> <position type="integer">2</position> <product-id type="integer">806546</product-id> </collect> <collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-08 13:09:05 +0400</created-at> <id type="integer">745442</id> <position type="integer">6</position> <product-id type="integer">809688</product-id> </collect> <collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-08 13:16:30 +0400</created-at> <id type="integer">745449</id> <position type="integer">7</position> <product-id type="integer">809691</product-id> </collect> <collect> <collection-id type="integer">12148</collection-id> <created-at type="timestamp">2009-08-24 21:43:20 +0400</created-at> <id type="integer">47514</id> <position type="integer">3</position> <product-id type="integer">89973</product-id> </collect> <collect> <collection-id type="integer">12149</collection-id> <created-at type="timestamp">2010-06-23 14:28:39 +0400</created-at> <id type="integer">830921</id> <position type="integer">5</position> <product-id type="integer">89973</product-id> </collect>
</collects> </pre>
Получение списка категорий содержащих товар
Зарос: GET /admin/collects.xml?product_id=89973
Ответ:
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <collects type="array"> <collect> <collection-id type="integer">12148</collection-id> <created-at type="timestamp">2009-08-24 21:43:20 +0400</created-at> <id type="integer">47514</id> <position type="integer">3</position> <product-id type="integer">89973</product-id> </collect> <collect> <collection-id type="integer">12149</collection-id> <created-at type="timestamp">2010-06-23 14:28:39 +0400</created-at> <id type="integer">830921</id> <position type="integer">5</position> <product-id type="integer">89973</product-id> </collect> </collects>
Получение списка товаров в категории
Зарос: GET /admin/collects.xml?collection_id=108528
Ответ: <per> HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <collects type="array">
<collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-07 02:22:12 +0400</created-at> <id type="integer">742440</id> <position type="integer">5</position> <product-id type="integer">806547</product-id> </collect> <collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-07 02:07:46 +0400</created-at> <id type="integer">742439</id> <position type="integer">2</position> <product-id type="integer">806546</product-id> </collect> <collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-08 13:09:05 +0400</created-at> <id type="integer">745442</id> <position type="integer">6</position> <product-id type="integer">809688</product-id> </collect> <collect> <collection-id type="integer">108528</collection-id> <created-at type="timestamp">2010-06-08 13:16:30 +0400</created-at> <id type="integer">745449</id> <position type="integer">7</position> <product-id type="integer">809691</product-id> </collect>
</collects> </per>