Skip to content

Instantly share code, notes, and snippets.

@klinkin
Last active October 23, 2017 11:13
Show Gist options
  • Save klinkin/02b0b6a1d6a645b2bb1602adc34d022c to your computer and use it in GitHub Desktop.
Save klinkin/02b0b6a1d6a645b2bb1602adc34d022c to your computer and use it in GitHub Desktop.
Get main Navigation Tree - categories and promoshops

Get Navigation

Response cashed on a device for 24-hour

Запрос

REQUSET: 
  TYPE: 
    GET
  PATH: 
    api.quelle.ru/v1/cnt/navs
  HEADERS:
    Authorization: <token> - jwt token 

The main navigation of Catalogue screen can consist of any number of blocks, there can be any number of the 1-st level categories inside a block. There can be any number of the 2-nd level categories inside the 1-st level category. The selection of a 2-nd level category opens the screen with a list of products (listing). The example of the respond shows 2 blocks of Categories and Promo. The 1-st level categories can contain icons.

The meaning of the separation into these blocks is to create a flexible structure which allows quickly add new categories into different logical navigation groups. The Categories Block is for the main canonical categories, the Promo Block is for derivative categories (BigSizes, News), aggregated pages (Trends), different promoshops.

All parameters are required, except "icon_url"

Response:

Status: 200 OK
[
  {
    "id": 1,
    "name": "Categories",
    "icon_url": "https://quelle.ru/icon.svg",
    "order_num": 0,
    "items": [
      {
        "id": 2,
        "name": "Woman", -- 1-st level categories
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 2,
        "items": [
          {
            "id": 4,
            "name": "Верхняя одежда", -- 2-nd level categories
            "icon_url": "https://quelle.ru/icon.svg",
            "order_num": 0,
          }, ...
        ]
      }, ...
    ]
  },
  {
    "id": 2,
    "name": "Promo", -- The array of all derivative categories (Sales, News,  BigSizes), aggregated pages (Trends) and promoshops.
    "icon_url": "https://quelle.ru/icon.svg",
    "order_num": 1,
    "items": [
      {
        "id": 6,
        "name": "Big size",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 0
      },
      {
        "id": 7,
        "name": "Free shipping",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 0
      }, ...
    ]
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment