Product Categories Endpoint
TIP
Refer to products page for Base URL
* Add Product Category
Endpoint: POST
admin/product-categoryRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ******* | Firebase access token | ✔️ |
Payload Description
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | category name | ✔️ |
| icon | string | category file | ✔️ |
| subCategory | uuid | sub category foreign key | ✔️ |
Sample Payload
{
"name": "Nike",
"icon": file,
"subCategory": "cd96f037-808d-49cf-902a-c0b94cf20377"
}Sample Response
{
"id": "d00e9237-367b-4bd9-b76f-a9429bc2d2ee",
"name": "Nike",
"icon": "http://127.0.0.1:8000/media/mainCategory/nike.jpg",
"subCategory": "cd96f037-808d-49cf-902a-c0b94cf20377"
}* List Product Categories
Endpoint: GET
admin/product-categoriesRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ******* | Firebase access token | ✔️ |
Parameters
Not required
Sample Response
[
{
"id": "2891f81e-5034-4df6-85ab-c769f3932092",
"name": "Active Tracksuits",
"icon": null,
"subCategory": {
"id": "8f8d31d9-b4c8-4cdc-ab8b-72bd8e73443d",
"name": "Women's Clothing",
"icon": null,
"mainCategory": {
"id": "f202128d-55ba-488a-9e46-64a18bbc9194",
"name": "Women",
"icon": null
}
}
},
]* Filter Product Categories
Endpoint: GET
admin/product-categories/filter/?subCategory__name=subCategory_nameRequest Headers
| Authorization | Value | Description | Required |
|---|---|---|---|
| Bearer | ******* | Firebase access token | ✔️ |
Parameters
Not required
Sample Response
Sample Response
admin/product-categories/filter/?subCategory__name=Boy's Accessories[
{
"id": "15a46f53-5fc1-41d8-8e19-7834e78023df",
"name": "Belts",
"icon": null,
"subCategory": "40669bb7-059f-42fc-a479-2fa9714b0c70"
},
{
"id": "94d6c439-fe72-4b9f-9b48-67ddf504a5ae",
"name": "Gloves and Mittens",
"icon": null,
"subCategory": "40669bb7-059f-42fc-a479-2fa9714b0c70"
},
]
Wookein Docs