InSales API - Тема

Материал из Insales Wiki
Перейти к: навигация, поиск

Получение списка

Отправив запрос GET по адресу /admin/themes.json (или .xml) можно получить список тем:

[
  {
    "created_at": "2013-05-06T17:22:39+04:00",
    "description": null,
    "id": 11774,
    "is_mobile": false,
    "is_published": false,
    "title": "Пользовательская",
    "updated_at": "2013-05-08T08:36:46+04:00"
  },
  {
    "created_at": "2013-05-27T17:29:21+04:00",
    "description": null,
    "id": 11810,
    "is_mobile": false,
    "is_published": false,
    "title": "Пользовательская",
    "updated_at": "2013-05-27T17:30:08+04:00"
  },
  {
    "created_at": "2013-04-15T15:55:30+04:00",
    "description": null,
    "id": 11768,
    "is_mobile": false,
    "is_published": true,
    "title": "Копия Пользовательская",
    "updated_at": "2013-06-07T12:34:42+04:00"
  },
  {
    "created_at": "2013-05-27T18:36:01+04:00",
    "description": null,
    "id": 11811,
    "is_mobile": false,
    "is_published": false,
    "title": "Пользовательская",
    "updated_at": "2013-06-07T12:34:22+04:00"
  }
]

Для XML соответственно:

<themes type="array">
  <theme>
    <created-at type="timestamp">2013-05-06 17:22:39 +0400</created-at>
    <description nil="true"/>
    <id type="integer">11774</id>
    <is-mobile type="boolean">false</is-mobile>
    <is-published type="boolean">false</is-published>
    <title>Пользовательская</title>
    <updated-at type="timestamp">2013-05-08 08:36:46 +0400</updated-at>
  </theme>
  <theme>
    <created-at type="timestamp">2013-05-27 17:29:21 +0400</created-at>
    <description nil="true"/>
    <id type="integer">11810</id>
    <is-mobile type="boolean">false</is-mobile>
    <is-published type="boolean">false</is-published>
    <title>Пользовательская</title>
    <updated-at type="timestamp">2013-05-27 17:30:08 +0400</updated-at>
  </theme>
  <theme>
    <created-at type="timestamp">2013-04-15 15:55:30 +0400</created-at>
    <description nil="true"/>
    <id type="integer">11768</id>
    <is-mobile type="boolean">false</is-mobile>
    <is-published type="boolean">true</is-published>
    <title>Копия Пользовательская</title>
    <updated-at type="timestamp">2013-06-07 12:34:42 +0400</updated-at>
  </theme>
  <theme>
    <created-at type="timestamp">2013-05-27 18:36:01 +0400</created-at>
    <description nil="true"/>
    <id type="integer">11811</id>
    <is-mobile type="boolean">false</is-mobile>
    <is-published type="boolean">false</is-published>
    <title>Пользовательская</title>
    <updated-at type="timestamp">2013-06-07 12:34:22 +0400</updated-at>
  </theme>
</themes>