Danh mục
Lấy ra danh mục sản phẩm
HTTP Request
[GET] /api/v6/products/categories
Query Parameters
Fields
| Fields | Type | Description |
|---|---|---|
| id | integer | Định danh |
| category_name | string | Tên danh mục |
| category_code | string | Mã danh mục |
| description | string | Mô tả |
| is_default | bool | Là mặc định |
| parent_id | integer | Danh mục cha |
| level | integer | Cấp danh mục |
Filtering
| Fields | Support | Type | Description |
|---|---|---|---|
| id | eq,in | integer | Định danh |
| valid | is,in | integer | Hợp lệ hay không |
Sort
| Sort (field) | Direction |
|---|---|
| id | asc,desc |
Limit & Offset
| Type | Description | |
|---|---|---|
| Limit | integer | Lấy bao nhiêu bản ghi |
| Offset | integer | Bỏ qua bao nhiêu bản ghi |
Example
HTTP Request
GET api/v6/products/categories?fields=category_name&limit=1&offset=0&filtering[id]=4 HTTP/1.1
Host: example.getflycrm.com
Content-Type: application/json
Status
200 OK
Response
{
"data": [
{
"id": 4,
"category_name": "TEST PRODUCT CATEGORY API",
}
],
"has_more": false,
"offset": 0,
"limited": 1
}