-
Notifications
You must be signed in to change notification settings - Fork 0
/
api_doc
53 lines (53 loc) · 4 KB
/
api_doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
API
==== Корневой ендпоинт
>> api/v1/: Корневой ендпоинт API, предоставляет ссылки на доступные ресурсы.
==== Блоги
>> api/v1/blog/: Список всех блогов.
>> api/v1/blog/{pk}/: Детали конкретного блога по идентификатору.
==== Популярные продукты
>> api/v1/populates/: Список всех популярных продуктов.
>> api/v1/populates/{pk}/: Детали конкретного популярного продукта по идентификатору.
==== Продукты
>> api/v1/products/: Список всех продуктов.
>> api/v1/products/{slug_prod}/: Детали конкретного продукта по его слагу.
>> api/v1/products/filter_by_cat/{slug_cat}/: Фильтрация продуктов по категории.
>> api/v1/products/all/slugs/: Получение списка слагов всех продуктов.
>> api/v1/products/by_ids/{ids}/: Получение продуктов по списку идентификаторов.
>> api/v1/products/set/filter/: Фильтрация продуктов по различным параметрам.
Пример запроса body:
{
"category": 3,
"brand": 1,
"price_min": 333,
"price_max": 5000,
"specifications": [{"name": "диагональ", "value": "15"}],
}
==== Категории
>> api/v1/category/: Список всех категорий.
>> api/v1/category/{slug_cat}/: Детали конкретной категории по её слагу.
>> api/v1/category/{slug_cat}/subcategories/: Получение списка подкатегорий для конкретной категории по её слагу.
==== Остатки на складах
>> api/v1/stocks/: Список всех остатков на складах.
>> api/v1/stocks/{pk}/: Детали конкретного остатка на складе по идентификатору.
>> api/v1/stocks/filter_by_prod/{prod_pk}/{city_pk}/: Фильтрация остатков по идентификатору продукта и идентификатору города.
>> api/v1/stocks/prices_by_category/{cat_pk}/: Получение цен на продукты по идентификатору категории.
==== Спецификации
>> api/v1/specif/: Список всех спецификаций.
>> api/v1/specif/{pk}/: Детали конкретной спецификации по идентификатору.
>> api/v1/specif/by_category/{cat_pk}/: Получение спецификаций продуктов по идентификатору категории.
>> api/v1/specif/filter_by_prod/{prod_pk}/: Фильтрация спецификаций по идентификатору продукта.
==== Отзывы
>> api/v1/reviews/: Список всех отзывов.
>> api/v1/reviews/{pk}/: Детали конкретного отзыва по идентификатору.
>> api/v1/reviews/filter_by_prod/{prod_pk}/: Фильтрация отзывов по идентификатору продукта.
==== Описания
>> api/v1/descrip/: Список всех описаний.
>> api/v1/descrip/{pk}/: Детали конкретного описания по идентификатору.
>> api/v1/descrip/filter_by_prod/{prod_pk}/: Фильтрация описаний по идентификатору продукта.
==== Бренды
>> api/v1/brands/: Список всех брендов.
>> api/v1/brands/{pk}/: Детали конкретного бренда по идентификатору.
>> api/v1/brands/by_category/{cat_pk}/: Получение брендов по идентификатору категории.
==== Медиа и статические файлы
>> media/{path}/: Доступ к медиафайлам по пути.
>> static/{path}/: Доступ к статичным файлам по пути.