# Read all product categories
```javascript
WXAPI.goodsCategoryV2(shopId)
```
+ shopId filters product categories according to stores. If this parameter is not passed, the product categories of all stores will be returned. Multiple stores are separated by commas in English.
shopId = 0, represents the global classification, which is the classification that all stores have. Therefore, when obtaining a certain store classification, you also need to add the global store. For example, if a store ID is 39879, then call it like this:
```javascript
WXAPI.goodsCategoryV2('0,39879')
```
Return example:
```json
{
"code": 0,
"data": [
{
"icon": "https://cdn.it120.cc/apifactory/2019/04/09/f89753a227d26a3fe9ccc6f975857bb6.png",
"id": 1872,
"isUse": true,
"key": "1",
"level": 1,
"name": "Top",
"paixu": 0,
"pid": 0,
"shopId": 0,
"type": "index",
"userId": 951
}
],
"msg": "success"
}
```
+ id category ID
+ icon icon
+ key classification number
+ level classification level (1 is the first level classification, 2 is the second level classification)
+ pid is the upper-level classification. If it is a first-level classification, the value is 0.
+ type Custom type of classification
# Read product category details
```javascript
WXAPI.goodsCategoryDetailV2({
ID: 1234
})
```
+ id is the category id, for example, the id returned by all category interfaces in the above example: `1872`
+ key product category number, you can choose one of these two parameters
Return example:
```json
{
"code": 0,
"data": {
"extJson": {},
"info": {
"icon": "https://cdn.it120.cc/apifactory/2019/04/09/f89753a227d26a3fe9ccc6f975857bb6.png",
"id": 1872,
"isUse": true,
"key": "1",
"name": "Top",
"paixu": 0,
"pid": 0,
"shopId": 0,
"type": "index",
"userId": 951
}
},
"msg": "success"
}
```