Category
Appliances are categorized based on their specifications and users' needs.
For instance, refrigerators have various specific categories tailored to different purposes within each subcategory.
This API
provides instructions on retrieving a list of products categorized by their respective categories.
List All Categories
The category specifies the grouping of products.
The API
will retrieve data for each product, including its subcategory, category details, and product description.
Parameters
No parameter required.
Attributes
id
number
The id of the categories.
name
string
The name of the category.
slug
string
The slug in the existing url.
GET /api/public/category
curl --location 'https://appliance-api.com/api/public/category' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id'
{
"code": "200",
"message": "Success",
"data": [
{
"id": 1,
"name": "Air Conditioners",
"slug": "air-conditioners"
},
{
"id": 2,
"name": "Cooking",
"slug": "cooking"
},
{
"id": 3,
"name": "Dishwashers",
"slug": "dishwashers"
},
{
"id": 4,
"name": "Laundry",
"slug": "laundry"
},
{
"id": 12,
"name": "Other",
"slug": "other"
},
{
"id": 5,
"name": "Outdoor",
"slug": "outdoor"
},
{
"id": 6,
"name": "Refrigeration",
"slug": "refrigeration"
}
],
"meta": null,
"errors": null
}
List All Subcategories
Each category includes specific subcategories to classify products.
The API
will retrieve data for each product, including its subcategory, category details, and product description.
Parameters
category_id
number
The param determines the id of category.
Attributes
id
number
The special id number of the subcategories.
name
string
The name of the main appliance type.
slug
string
The slug of the main appliance type.
GET /api/public/subcategory
curl --location 'https://appliance-api.com/api/public/subcategory?category_id=1' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id'
{
"code": "200",
"message": "Success",
"data": [
{
"id": 1,
"name": "Air Conditioners",
"slug": "air-conditioners"
},
{
"id": 2,
"name": "Dehumidifiers",
"slug": "dehumidifiers"
}
],
"meta": null,
"errors": null
}
List Detail Categories
Each subcategory contains more detailed classifications for products.
The API
will retrieve data for each product, including its subcategory, category details, and product description.
Parameters
subcategory_id
number
The param determines the id of subcategory.
Attributes
id
number
The special id number of the detail categories.
name
string
The name of the main appliance type.
slug
string
The slug of the main appliance type.
GET /api/public/detail-category
curl --location 'https://appliance-api.com/api/public/detail-category?subcategory_id=1' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id'
{
"code": "200",
"message": "Success",
"data": [
{
"id": 3,
"name": "Portable Air Conditioners",
"slug": "portable-air-conditioners"
},
{
"id": 2,
"name": "Wall Mount Air Conditioners",
"slug": "wall-mount-air-conditioners"
},
{
"id": 1,
"name": "Window Mount Air Conditioners",
"slug": "window-mount-air-conditioners"
}
],
"meta": null,
"errors": null
}