InSales API - Способы доставки — различия между версиями
Материал из Insales Wiki
Vb (обсуждение | вклад) (Новая: =Получение списка= Запрос: GET /admin/delivery_variants.xml Ответ: <pre> </pre> =Получение информации о способе доставки= ...) |
Vb (обсуждение | вклад) (→Получение списка) |
||
Строка 5: | Строка 5: | ||
Ответ: | Ответ: | ||
<pre> | <pre> | ||
+ | <objects type="array"> | ||
+ | <object> | ||
+ | <id type="integer">57802</id> | ||
+ | <title>Курьером</title> | ||
+ | <description>Супер быстрая доставка</description> | ||
+ | <position type="integer">1</position> | ||
+ | <created-at type="timestamp">2012-02-22 12:56:51 +0400</created-at> | ||
+ | <updated-at type="timestamp">2012-05-17 11:55:07 +0400</updated-at> | ||
+ | <delivery-locations type="array"> | ||
+ | <delivery-location> | ||
+ | <region>Респ Адыгея</region> | ||
+ | <city>Майкоп</city> | ||
+ | </delivery-location> | ||
+ | <delivery-location> | ||
+ | <region>Респ Адыгея</region> | ||
+ | <city>Красногвардейский район</city> | ||
+ | </delivery-location> | ||
+ | </delivery-locations> | ||
+ | <type>DeliveryVariant::PriceDepend</type> | ||
+ | </object> | ||
+ | <object> | ||
+ | <id type="integer">57955</id> | ||
+ | <title>Курьером</title> | ||
+ | <description nil="true"/> | ||
+ | <position type="integer">2</position> | ||
+ | <created-at type="timestamp">2012-02-24 11:36:46 +0400</created-at> | ||
+ | <updated-at type="timestamp">2012-02-24 11:38:26 +0400</updated-at> | ||
+ | <delivery-locations type="array"/> | ||
+ | <type>DeliveryVariant::Fixed</type> | ||
+ | </object> | ||
+ | </objects> | ||
</pre> | </pre> | ||
Версия 15:02, 31 мая 2012
Получение списка
Запрос: GET /admin/delivery_variants.xml
Ответ:
<objects type="array"> <object> <id type="integer">57802</id> <title>Курьером</title> <description>Супер быстрая доставка</description> <position type="integer">1</position> <created-at type="timestamp">2012-02-22 12:56:51 +0400</created-at> <updated-at type="timestamp">2012-05-17 11:55:07 +0400</updated-at> <delivery-locations type="array"> <delivery-location> <region>Респ Адыгея</region> <city>Майкоп</city> </delivery-location> <delivery-location> <region>Респ Адыгея</region> <city>Красногвардейский район</city> </delivery-location> </delivery-locations> <type>DeliveryVariant::PriceDepend</type> </object> <object> <id type="integer">57955</id> <title>Курьером</title> <description nil="true"/> <position type="integer">2</position> <created-at type="timestamp">2012-02-24 11:36:46 +0400</created-at> <updated-at type="timestamp">2012-02-24 11:38:26 +0400</updated-at> <delivery-locations type="array"/> <type>DeliveryVariant::Fixed</type> </object> </objects>
Получение информации о способе доставки
Запрос: GET /admin/delivery_variants/#{id}.xml
Ответ:
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?>
Добавление
Запрос: POST /admin/delivery_variants.xml
Ответ:
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?>
Удаление
Запрос: DELETE /admin/delivery_variants/#{id}.xml
Ответ:
HTTP/1.1 200 OK