Skip to navigation

Cập nhật thông tin khách hàng

Scope yêu cầu: customer:write. Agent cần quyền sửa (crm.customer → edit) và khách hàng phải nằm trong phạm vi chỉnh sửa của agent.

Headers

X-Api-KeystringRequired

Request

This endpoint expects an object.
idstringRequired

ID nội bộ của khách hàng cần cập nhật.

lifecycleStagesstringOptional

Mã giai đoạn hành trình — tenant có thể tự cấu hình (xem Cấu hình khách hàng → Hành trình). Mẫu mặc định: subscriber (Đăng ký), lead (Tiềm năng), qualifiedLead (Đủ điều kiện), opportunity (Cơ hội bán hàng), official (Chính thức), evangelist (Trung thành), other (Khác).

statusstringOptional

Mã trạng thái khách hàng — tenant có thể tự cấu hình (xem Cấu hình khách hàng → Trạng thái). Mẫu mặc định: active (Hoạt động), inactive (Không hoạt động), atRisk (Rủi ro), lost (Rời bỏ).

fullNamestringOptional<=200 characters
phonestringOptional

Định dạng E.164.

emailstringOptionalformat: "email"<=254 characters
dateOfBirthdatetimeOptional
genderOptionIdstringOptional

Mã giá trị lựa chọn của thuộc tính Giới tính.

customerSourceOptionIdstringOptional

Mã giá trị lựa chọn của thuộc tính Nguồn khách hàng.

occupationstringOptional
descriptionstringOptional<=2000 characters

Ghi chú.

avatarUrlstringOptional<=2048 characters
attributesmap from strings to anyOptional

Thuộc tính tuỳ chỉnh của tenant, khoá theo fieldCode (mã thuộc tính — không phải slot lưu trữ nội bộ valueKey). Mã không tồn tại hoặc gửi thẳng slot thô → 422 CUSTOMER_ATTRIBUTE_UNKNOWN.

socialIdsmap from strings to stringsOptional
assignedAgentIdstringOptional

uid của agent phụ trách.

relatedAgentIdslist of stringsOptional
relatedCustomerUidslist of stringsOptional
tagIdslist of stringsOptional
groupIdslist of stringsOptional
industryIdslist of stringsOptional
refIdstringOptional

Mã tham chiếu ngoài.

Response

Khách hàng sau khi cập nhật.

idstringOptional
uidstringOptional
tenantIdstringOptional
lifecycleStagesstringOptional
statusstringOptional
fullNamestringOptional
phonestringOptional

Có thể đã bị che.

emailstringOptional

Có thể đã bị che.

attributesmap from strings to anyOptional

Khoá theo fieldCode.

assignedAgentIdstringOptional
createdAtlongOptional
Epoch millis.
lastModifiedAtlongOptional
Epoch millis.
createdByobjectOptional
lastModifiedByobjectOptional
createdViaobjectOptional

Kênh tự động đã thực hiện thao tác ghi; null nếu nhân viên thao tác trực tiếp.

lastModifiedViaobjectOptional

Kênh tự động đã thực hiện thao tác ghi; null nếu nhân viên thao tác trực tiếp.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
503
Service Unavailable Error