# Categories

# Get All Address of Customer

Sử dụng APi này để lấy tất cả danh sách địa chỉ của khách hàng

# Endpoint

# Parameters

Name Type Description Required
Required parameters String :customerId:

# Response

{
  "status": true,
  "messageCode": "",
  "messageName": "",
  "data": {
    "totalCnt": 2,
    "items": [
      {
        "id": 1,
        "customerId": 1,
        "companyName": "EI",
        "receiverName": "Xinat1",
        "email": "xinat@gmail.com",
        "phone": "123456789",
        "province": "1",
        "district": "1",
        "ward": "1",
        "createdAt": "2021-07-14T17:00:00.000Z",
        "updatedAt": "2021-07-14T17:00:00.000Z",
        "createdBy": 1,
        "updatedBy": 1,
        "deleted": false
      },
      {
        "id": 2,
        "customerId": 1,
        "companyName": "EI",
        "receiverName": "Xinat2",
        "email": "xinat@gmail.com",
        "phone": "123456789",
        "province": "1",
        "district": "1",
        "ward": "1",
        "createdAt": "2021-07-14T17:00:00.000Z",
        "updatedAt": "2021-07-14T17:00:00.000Z",
        "createdBy": 1,
        "updatedBy": 1,
        "deleted": false
      }
    ]
  }
}
curl -X POST http://localhost:3000/customerAddress/ei/getList \
  -H 'Content-Type: application/json' \
  --data '{
    "customerId": "1"
  }'

# Get Category Level 2 By Level 1

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
Required parameters String 🆔
Required parameters String :slug:

# Response

{
  "status": true,
  "messageCode": "success",
  "messageContent": "success",
  "data": {
    "categoryId": 8,
    "categoryName": "Rustic Wooden Chips",
    "categorySlug": "rustic-wooden-chips",
    "totalCnt": 2,
    "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"
          }
        ]
      },
      {
        "id": 28,
        "name": "Fantastic Granite Shirt",
        "image": "http://placeimg.com/640/480",
        "slug": "fantastic-granite-shirt",
        "items": []
      }
    ]
  }
}
curl -X POST http://localhost:3000/category/ei/getMegaRootCategory \
  -H 'Content-Type: application/json' \
  --data '{
   "id": 8,
    "slug":"rustic-wooden-chips"
  }'