Skip to content

Instantly share code, notes, and snippets.

@klinkin
Last active October 23, 2017 11:09
Show Gist options
  • Save klinkin/5c8fcd3508e81b40df1cca5e68772597 to your computer and use it in GitHub Desktop.
Save klinkin/5c8fcd3508e81b40df1cca5e68772597 to your computer and use it in GitHub Desktop.
Get list of brands

List brands

Returns a list of brands divided by groups

Request

REQUSET:
  TYPE: 
    GET
  PATH: 
    api.xyz.ru/v1/cnt/brands

Response cashed on a device for 24-hour

All parameters are required, except "icon_url"

Response:

Status: 200 OK
RESPONSE: 
[
  {
    "id": 1,
    "group_name": "Popular", // Категория бренда
    "icon_url": "https://quelle.ru/icon.svg",
    "order_num": 0,
    "brands": [
      {
        "id": 2,
        "name": "Adidas", // Название бренда
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 2
      },
      {
        "id": 4,
        "name": "Nike",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 2
      },
      {
        "id": 6,
        "name": "Reebok",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 2
      }, ...
    ]
  },
  {
    "id": 2,
    "group_name": "Best choice",
    "icon_url": "https://quelle.ru/icon.svg",
    "order_num": 1,
    "brands": [
      {
        "id": 2,
        "name": "Zara",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 2
      },
      {
        "id": 4,
        "name": "Salomon",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 4
      },
      {
        "id": 6,
        "name": "Hoka one one",
        "icon_url": "https://quelle.ru/icon.svg",
        "order_num": 5
      }, ...
    ]
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment