CategoryList
Function
Get a list of category.
Endpoint
- /v1/category/list
HTTP Method
- POST
Request Headers
- Authorization: Bearer {token}
- X-App-Key: {appKey}
Request Payload
{
"pageNo": 1,
"pageSize": 10
}
Request Parameters
| Field | Required | Type | Remark | Sample |
|---|---|---|---|---|
| pageNo | No | integer | Pagination page number, 0 represents the first page | 1 |
| pageSize | No | integer | Number of entries per page, maximum 200 | 10 |
Response Payload
{
"status": 1,
"errorCode": 0,
"message": "success",
"morePage":true,
"pageNo": 1,
"pageSize": 1,
"items": [
{
"categoryId": "01hdmxx74gh75ykw03203hpxvq",
"categoryNameEn": "Name (EN)",
"categoryNameSc": "Name (SC)",
"categoryNameTc": "Name (TC)",
"categoryStatus": "Active"
}
]
}
Response Parameters
| Field | Required | Type | Remark | Sample |
|---|---|---|---|---|
| status | Yes | string | status code of the api call | |
| message | Yes | string | detail message of the api call | |
| errorCode | No | string | ||
| morePage | Yes | boolean | Whether has more page. If this value is true, you may want to continue to check next page | true |
| pageNo | Yes | integer | Pagination page number, 0 represents the first page | 1 |
| pageSize | Yes | integer | Number of entries per page, maximum 200 | 10 |
| items | Yes | object[] | ||
| categoryId | Yes | string | Category Id | 01hdmxx74gh75ykw03203hpxvq |
| categoryNameEn | Yes | string | English Name | Name (EN) |
| categoryNameSc | Yes | string | Simplified Chinese Name | Name (SC) |
| categoryNameTc | Yes | string | Traditional Chinese Name | Name (TC) |
| categoryStatus | Yes | string | Active 、 Inactive | Active |
Response Headers
Error Codes
| Code | Description |
|---|---|
| 1 | Internal Error |