Subcategory with products (26/11)

Get subcategory detail with products.

This endpoint allows you to get subcategory detail with their all products.

GET https://castleindia.in/emart/public /api/subcategory/1?secret=2908df2c-881e-49fc-933c-92d6ea90d182?currency=INR /api/subcategory

Path Parameters

NameTypeDescription

id

Integer

id of that subcategory eg: 1

Query Parameters

NameTypeDescription

currency

String

Three digit currency code is required eg: ISO code 3

secret

String

Put the client secret key which you obtained from admin panel

Headers

NameTypeDescription

Authorization

String

Bearer { bearer_token without bracket }

Accept

String

application/json

{
    "category": {
        "id": 1,
        "name": {
            "en": "Bed"
        },
        "desciption": {
            "en": "Aย bedย is a piece of furniture which is used as a place to sleep or relax. Most modernย bedsย consist of a soft, cushioned mattress on aย bedย frame, the mattress resting either on a solid base, often wood slats, or a sprung base. ... Someย bedsย are made especially for animals."
        },
        "icon": "fa-bed",
        "image": "1579088525Kida King Size Bed, Royal Blue Velvet and Brass Legs 02-04.jpg",
        "imagepath": "http://emart.test/images/grandcategory"
    },
    "products": [
        {
            "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"
        },
        {
            "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": 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": 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"
        }
    ]
}

If response fail

{
  "errors": "Secret Key is required",
  "status": "fail"
}
{
  "errors": "Invalid Secret Key !",
  "status": "fail"
}
{
  "errors": "Subcategory is not active !",
  "status": "fail" 
}
{
  "errors": "Subategory not found !",
  "status": "fail"
}

Last updated