Tạo / sửa trường tuỳ chỉnh
crm.fields.saveMCP:crm_fields_saveBộ công cụ: Khách hàngCreate or change a custom field (text, number, date, select).
Cần Idempotency-Key
Quản trị
Quyền: Khách hàng
Gọi bằng REST v2
curl -X POST https://zl.builera.app/api/public/v2/ops/crm.fields.save \
-H "Authorization: Bearer za_live_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"key":"x","label":"x","type":"text","options":[]}'Mỗi khoá/kết nối tối đa 300 lệnh đọc và 60 lệnh ghi mỗi phút. Gọi lại cùng Idempotency-Key trả đúng kết quả cũ, không làm lại.
Gọi qua MCP
{
"method": "tools/call",
"params": {
"name": "crm_fields_save",
"arguments": {
"key": "x",
"label": "x",
"type": "text",
"options": []
}
}
}Thêm https://zl.builera.app/mcp vào ứng dụng AI rồi cho phép kết nối; AI chỉ thấy công cụ trong bộ bạn chọn.
Kết quả
HTTP 200
{ "status": "succeeded", "operationId": "…", "data": { … } }Ví dụ đầu vào
{
"key": "x",
"label": "x",
"type": "text",
"options": []
}Thay mã (id) mẫu bằng mã thật lấy từ các thao tác liệt kê/tìm kiếm.
Lược đồ đầu vào (JSON Schema)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"key": {
"type": "string",
"maxLength": 40
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"select"
]
},
"options": {
"type": "array",
"items": {
"type": "string",
"maxLength": 60
},
"maxItems": 50,
"default": []
},
"expectedRevision": {
"type": "integer",
"minimum": 1,
"description": "The `revision` you read; if it changed meanwhile the save answers conflict instead of overwriting."
}
},
"required": [
"key",
"label",
"type"
],
"additionalProperties": false
}