Sổ nông trại
Sổ tự dựng của trại (nhật ký, kho, chi phí…): đọc bảng, đọc dòng, thêm dòng.
3 thao tác · gốc /api/v1/office
GET
/api/v1/office/apps/{app_id}/tablesCác bảng trong một sổ và cấu trúc cột.
Công cụ MCP:
book_list_tablesPhạm vi: office.base.record.viewTham số
| Tham số | Kiểu | Vị trí | Bắt buộc | Mô tả |
|---|---|---|---|---|
app_id | GUID | path | có | — |
Ví dụ
curl https://api-prod.nextfarm.vn/api/v1/office/apps/<app_id>/tables \
-H "Authorization: Bearer nfk_..."POST
/api/v1/office/tables/{table_id}/records/listĐọc dòng của một bảng (POST vì thân chứa bộ lọc).
Công cụ MCP:
book_query_recordsPhạm vi: office.base.record.viewTham số
| Tham số | Kiểu | Vị trí | Bắt buộc | Mô tả |
|---|---|---|---|---|
table_id | GUID | path | có | — |
page | int | body | không | — |
page_size | int | body | không | — |
Ví dụ
curl -X POST https://api-prod.nextfarm.vn/api/v1/office/tables/<table_id>/records/list \
-H "Authorization: Bearer nfk_..." \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"page_size": 20
}'POST
/api/v1/office/tables/{table_id}/recordsGHI: thêm một dòng. data = {id_cột: giá_trị}.
Công cụ MCP:
book_add_recordPhạm vi: office.base.record.manageTham số
| Tham số | Kiểu | Vị trí | Bắt buộc | Mô tả |
|---|---|---|---|---|
table_id | GUID | path | có | — |
data | object | body | có | — |
Ví dụ
curl -X POST https://api-prod.nextfarm.vn/api/v1/office/tables/<table_id>/records \
-H "Authorization: Bearer nfk_..." \
-H "Content-Type: application/json" \
-d '{
"data": {}
}'