# Trang Product

# Lấy danh sách "Danh Mục Sản Phẩm" và " Công cụ gia công" - Done

Sử dụng APi này để lấy tất cả các Category level 2 và 3 sản phẩm tiêu biểu

# Endpoint

# Parameters

Name Type Description Required
id String ✔️
slug String ✔️
productLimit String ✔️
productOffset String

# Response

{
    "status": true,
    "messageCode": "success",
    "messageContent": "success",
    "data": {
        "categoryId": 30,
        "categoryName": "ĐÈN LED  ",
        "categorySlug": "den-led",
        "categoryPath": [
            {
                "id": "30",
                "name": "ĐÈN LED  ",
                "slug": "den-led"
            }
        ],
        "totalCnt": 26,
        "items": [
            {
                "id": 31,
                "name": "Bóng đèn LED BULB",
                "icon": "https://via.placeholder.com/150/FFFFFF/000000?text=No%20icon",
                "image": "https://via.placeholder.com/150/FFFFFF/000000?text=No%20image",
                "slug": "bong-den-led-bulb",
                "categoryPath": [
                    {
                        "id": "30",
                        "name": "ĐÈN LED  ",
                        "slug": "den-led"
                    },
                    {
                        "id": "31",
                        "name": "Bóng đèn LED BULB",
                        "slug": "bong-den-led-bulb"
                    }
                ],
                "items": [
                    {
                        "id": 8,
                        "name": "Bóng đèn LED BULB tròn màu 1W màu trắng",
                        "images": "https://d3p5dsvnajipiv.cloudfront.net/images/products/product_359/LED-A45-W-1W.jpg",
                        "price": 19958.4,
                        "slug": "bong-den-led-bulb-tron-mau-1w-mau-trang"
                    },
                    {
                        "id": 9,
                        "name": "Bóng đèn LED BULB tròn màu 1W màu đỏ",
                        "images": "https://d3p5dsvnajipiv.cloudfront.net/images/products/product_360/LED-A45-R-1W.jpg",
                        "price": 19958.4,
                        "slug": "bong-den-led-bulb-tron-mau-1w-mau-do"
                    },
                    {
                        "id": 10,
                        "name": "Bóng đèn LED BULB tròn màu 1W màu xanh lam",
                        "images": "https://d3p5dsvnajipiv.cloudfront.net/images/products/product_361/LED-A45-B-1W.jpg",
                        "price": 19958.4,
                        "slug": "bong-den-led-bulb-tron-mau-1w-mau-xanh-lam"
                    }
                ]
            },
            ...
            
        ]
    }
}
curl -X POST http://localhost:3000/category/ei/getCategoryProductLevel \
  -H 'Content-Type: application/json' \
  --data '{
   "id": "30",
    "slug":"den-led",
    "productLimit":"3"
  }'

# Lấy danh sách "Thuộc Tính Sản Phẩm"

Sử dụng APi này để lấy Thuộc Tính Sản Phẩm

# Endpoint

# Parameters

Name Type Description Required
id String ✔️
slug String ✔️

# Response

{
  "status": true,
  "messageCode": "success",
  "messageContent": "success",
  "data": {
    "categoryId": 8,
    "categoryName": "Rustic Wooden Chips",
    "categorySlug": "rustic-wooden-chips",
    "totalCnt": 10,
    "items": [
      {
        "id": 13,
        "name": "Awesome Steel Pants",
        "image": "http://placeimg.com/640/480",
        "slug": "awesome-steel-pants",
        "items": [
          {
            "id": 154,
            "name": "hhhhhhhhhhhhhhhhh",
            "images": "https://ei-dev-store.s3.amazonaws.com/products/1/1/192587241_2139972466170676_1068249686044846344_n.jpg",
            "price": 1000000,
            "slug": "hhhhhhhhhhhhhhhhh"
          },
          {
            "id": 155,
            "name": "hhhhhhhhh",
            "images": "https://ei-dev-store.s3.amazonaws.com/products/1/1/be.png",
            "price": 10000000,
            "slug": "hhhhhhhhh"
          },
          {
            "id": 178,
            "name": "kkkkkkkkk",
            "images": "https://unsplash.it/200?random",
            "price": 9800000,
            "slug": "kkkkkkkkk"
          }
        ]
      },
      ...
    ]
  }
}
curl -X POST http://localhost:3000/category/ei/getCategoryProductLevel \
  -H 'Content-Type: application/json' \
  --data '{
   "id": 8,
    "slug":"rustic-wooden-chips"
  }'

# Lấy danh sách "Thương Hiệu Nổi Bật"

Sử dụng APi này để lấy Thương Hiệu Nổi Bật

# Endpoint

# Parameters

Name Type Description Required
id String ✔️
slug String ✔️

# Response

{
  "status": true,
  "messageCode": "success",
  "messageContent": "success",
  "data": {
    "categoryId": 8,
    "categoryName": "Rustic Wooden Chips",
    "categorySlug": "rustic-wooden-chips",
    "totalCnt": 10,
    "items": [
      {
        "id": 13,
        "name": "Awesome Steel Pants",
        "image": "http://placeimg.com/640/480",
        "slug": "awesome-steel-pants",
        "items": [
          {
            "id": 154,
            "name": "hhhhhhhhhhhhhhhhh",
            "images": "https://ei-dev-store.s3.amazonaws.com/products/1/1/192587241_2139972466170676_1068249686044846344_n.jpg",
            "price": 1000000,
            "slug": "hhhhhhhhhhhhhhhhh"
          },
          {
            "id": 155,
            "name": "hhhhhhhhh",
            "images": "https://ei-dev-store.s3.amazonaws.com/products/1/1/be.png",
            "price": 10000000,
            "slug": "hhhhhhhhh"
          },
          {
            "id": 178,
            "name": "kkkkkkkkk",
            "images": "https://unsplash.it/200?random",
            "price": 9800000,
            "slug": "kkkkkkkkk"
          }
        ]
      },
      ...
    ]
  }
}
curl -X POST http://localhost:3000/category/ei/getCategoryProductLevel \
  -H 'Content-Type: application/json' \
  --data '{
   "id": 8,
    "slug":"rustic-wooden-chips"
  }'

# Lấy danh sách "Khoảng giá"

Sử dụng APi này để lấy Khoảng giá

# Endpoint

# Parameters

Name Type Description Required
id String ✔️
slug String ✔️

# Response

{
  "status": true,
  "messageCode": "success",
  "messageContent": "success",
  "data": {
    "categoryId": 8,
    "categoryName": "Rustic Wooden Chips",
    "categorySlug": "rustic-wooden-chips",
    "totalCnt": 10,
    "items": [
      {
        "id": 13,
        "name": "Awesome Steel Pants",
        "image": "http://placeimg.com/640/480",
        "slug": "awesome-steel-pants",
        "items": [
          {
            "id": 154,
            "name": "hhhhhhhhhhhhhhhhh",
            "images": "https://ei-dev-store.s3.amazonaws.com/products/1/1/192587241_2139972466170676_1068249686044846344_n.jpg",
            "price": 1000000,
            "slug": "hhhhhhhhhhhhhhhhh"
          },
          {
            "id": 155,
            "name": "hhhhhhhhh",
            "images": "https://ei-dev-store.s3.amazonaws.com/products/1/1/be.png",
            "price": 10000000,
            "slug": "hhhhhhhhh"
          },
          {
            "id": 178,
            "name": "kkkkkkkkk",
            "images": "https://unsplash.it/200?random",
            "price": 9800000,
            "slug": "kkkkkkkkk"
          }
        ]
      },
      ...
    ]
  }
}
curl -X POST http://localhost:3000/category/ei/getCategoryProductLevel \
  -H 'Content-Type: application/json' \
  --data '{
   "id": 8,
    "slug":"rustic-wooden-chips"
  }'