Main Category with products(26/11)
Get the primary category detail and their all products:-
This endpoint allows you to get category detail and their products.
GET
https://castleindia.in/emart/public /api/category/1?secret=2908df2c-881e-49fc-933c-92d6ea90d182?currency=INR /api/category/
Path Parameters
Name | Type | Description |
---|---|---|
id | Integer | Pass the id of that category eg: 1 |
Query Parameters
Name | Type | Description |
---|---|---|
Currency | String | Three digit valid currency code ISO 3 |
secret | String | Client secret key which obtained from admin panel |
Headers
Name | Type | Description |
---|---|---|
Authorization | String | Bearer { bearer_token without bracket } |
Accept | String | application/json |
{
"category": {
"id": 1,
"name": {
"en": "Furniture"
},
"desciption": {
"en": "Furniture refers to movable objects intended to support various human activities such as seating , eating , and sleeping. Furniture is also used to hold objects at a convenient height for work, or to store things. Furniture can be a product of design and is considered a form of decorative art."
},
"icon": "fa-database",
"image": "1579087936Faye Floor Lamp, Brass and Marble 05-02.jpg",
"imagepath": "http://emart.test/images/grandcategory"
},
"products": [
{
"productid": 87,
"variantid": 91,
"productname": {
"en": "Floor Lamp, Brass and Marble"
},
"variantname": "152H x 69W x 14Dcm",
"type": "v",
"mainprice": 1646.26,
"offerprice": 0,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1594123471e8tlJuKZUO.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 0,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/87/91"
},
{
"productid": 43,
"variantid": 79,
"productname": {
"en": "Austin Table Lamp"
},
"variantname": "50H x 30W x 13Dcm",
"type": "v",
"mainprice": 3292.52,
"offerprice": 0,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1579266391DqpT36PFko.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 0,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/43/79"
},
{
"productid": 89,
"variantid": 93,
"productname": {
"en": "Large Double Sofa Bed"
},
"variantname": "82H x 142W x 89Dcm",
"type": "v",
"mainprice": 20578.25,
"offerprice": 12346.95,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1594124273R9lbz269hj.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 40,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/89/93"
},
{
"productid": 11,
"variantid": 0,
"type": "s",
"variantname": null,
"productname": {
"en": "School Bagpack"
},
"mainprice": 9578.24,
"offerprice": 0,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "pink-black-bagpack-mock-up_1310-135.jpg",
"thumbpath": "http://emart.test/images/simple_products",
"off_in_percent": 0,
"is_in_wishlist": false
},
{
"productid": 41,
"variantid": 77,
"productname": {
"en": "Super Kingsize Bed With Storage"
},
"variantname": "196H x 196W x 216Dcm",
"type": "v",
"mainprice": 16874.17,
"offerprice": 0,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_15792641263O7B6KIZqa.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 0,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/41/77"
},
{
"productid": 42,
"variantid": 78,
"productname": {
"en": "King Size Bed, Royal Blue Velvet and Brass Legs"
},
"variantname": "90H x 214W x 161Dcm",
"type": "v",
"mainprice": 2880.96,
"offerprice": 2057.83,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1579265150ABRYtmSWna.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 29,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/42/78"
},
{
"productid": 88,
"variantid": 92,
"productname": {
"en": "2 Seater Sofa"
},
"variantname": "75H x 128W x 82Dcm",
"type": "v",
"mainprice": 4938.78,
"offerprice": 0,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1594123732UgJ4DAVzlV.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 0,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/88/92"
},
{
"productid": 40,
"variantid": 76,
"productname": {
"en": "Double Bed"
},
"variantname": "Coppper Steel,110H x 206W x 143Dcm",
"type": "v",
"mainprice": 37040.85,
"offerprice": 0,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1579263598Q42HAMnkqi.png",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 0,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/40/76"
},
{
"productid": 159,
"variantid": 115,
"productname": {
"en": "Sunglasses"
},
"variantname": "Red",
"type": "v",
"mainprice": 1481.63,
"offerprice": 411.57,
"pricein": "INR",
"symbol": "₹",
"rating": 0,
"review": 0,
"images": "variant_1637146697mpZnZQ5lcx.jpeg",
"thumbpath": "http://emart.test/variantimages/thumbnails",
"off_in_percent": 72,
"is_in_wishlist": false,
"detail_page_url": "http://emart.test/api/details/159/115"
}
]
}
If response fail
{
"errors": "Secret Key is required",
"status": "fail"
}
{
"errors": "Invalid Secret Key !",
"status": "fail"
}
{
"errors": "Category is not active !",
"status": "fail"
}
{
"errors": "Category not found !",
"status": "fail"
}
Last updated