🛒 Ecommerce
Get all categories
The API endpoint allows users to fetch all the available categories in an e-commerce application.
When accessing this endpoint, users will receive a response containing a list of categories that exist within the e-commerce app.
get/ecommerce/categories
Query parameters
pagestring
Example:1
limitstring
Example:5
Response
Get all categories
Example response
{
"data": {
"categories": [
{
"__v": 0,
"_id": "649e792a64e7dba29b7265fc",
"createdAt": "2023-06-30T06:41:46.367Z",
"name": "sleek",
"owner": "649e792964e7dba29b72634a",
"updatedAt": "2023-06-30T06:41:46.367Z"
},
{
"__v": 0,
"_id": "649e792a64e7dba29b7265fd",
"createdAt": "2023-06-30T06:41:46.367Z",
"name": "licensed",
"owner": "649e792964e7dba29b72634a",
"updatedAt": "2023-06-30T06:41:46.367Z"
},
{
"__v": 0,
"_id": "649e792a64e7dba29b7265fe",
"createdAt": "2023-06-30T06:41:46.367Z",
"name": "handcrafted",
"owner": "649e792964e7dba29b72634a",
"updatedAt": "2023-06-30T06:41:46.367Z"
},
{
"__v": 0,
"_id": "649e792a64e7dba29b7265ff",
"createdAt": "2023-06-30T06:41:46.367Z",
"name": "licensed",
"owner": "649e792964e7dba29b72634a",
"updatedAt": "2023-06-30T06:41:46.367Z"
},
{
"__v": 0,
"_id": "649e792a64e7dba29b726600",
"createdAt": "2023-06-30T06:41:46.367Z",
"name": "refined",
"owner": "649e792964e7dba29b72634a",
"updatedAt": "2023-06-30T06:41:46.367Z"
}
],
"hasNextPage": true,
"limit": 5,
"nextPage": 2,
"page": 1,
"serialNumberStartFrom": 1,
"totalCategories": 20,
"totalPages": 4
},
"message": "Categories fetched successfully",
"statusCode": 200,
"success": true
}