Cập nhật khách hàng
HTTP request
Example Request
code
curl --location 'https://api.service.ladiflow.com/1.0/customer/update' \
--header 'Api-Key: {{API_KEY}}' \
--data-raw '{
"email": "test@gmail.com",
"_id":"653a3ca502e8ab00122c39c3",
"first_name": "test",
"full_name": "test",
"dob": "1989-11-03",
"phone": null,
"gender": "male",
"tags": ["5fffb9c981cf1245fa091985", "5fffb9ce81cf1245fa091986", "5fffb9ce81cf1245fa091900"],
"custom_fields": [
{
"name": "ldp_pkg_name",
"value": "LADIPAGE-PRO"
},
{
"name": "ldp_pkg_name1",
"value": "LADIPAGE-PRO"
}
],
"city": "Hà Nội",
"address": "68 Nguyễn Cơ Thạch",
"address_2":"",
"district": "Nam Từ Liêm",
"company": "LadiPage",
"job_title": "Coder",
"ward": "Mỹ Đình 1",
"lang": "vi",
"postal_code": 100000,
"source": "API",
"external_customer_id": "123",
"subcribed_at": "2020-12-01",
"website": "123",
"facebook_url": "123",
"twitter_url": "123",
"linkedIn_url": "123",
"score": 14,
"skype": null,
"zalo": null
}'
Tham số Kiểu dữ liệu Bắt buộc Mô tả Api-Key string có API key lấy trên LadiFlow
Tham số Body
Tham số Kiểu dữ liệu Bắt buộc Mô tả email string Bắt buộc email hoặc số điện thoại _id string có ID của khách hàng first_name string Tên full_name string Họ và tên dob yyyy-mm-dd Ngày sinh phone string Số điện thoại Bắt buộc email hoặc số điện thoại gender male/female Giới tính tags list Danh sách tag id custom_fields List Object Các giá trị trường tuỳ chỉnh country string Quốc gia city string thành phố district string Quận huyện ward string Phường xã address string Địa chỉ company string Tên công ty job_title string Công việc lang vi/en/other Ngôn ngữ postal_code number Mã bưu điện channels list Kênh tương tác external_customer_id string ID khách hàng từ dữ liệu bên ngoài website list facebook_url string Đường dẫn tài khoản Facebook twitter_url string Đường dẫn tài khoản Twitter linkedIn_url string Đường dẫn tài khoản Linkedln score number Điểm lead scoring zalo string Tên zalo skype string Tên tài khoản Skype
Example response
code
{
"data": {
"channels": [
"API"
],
"tags": [],
"vouchers": [],
"is_email_verified": false,
"messenger_recurring_message_tokens": [],
"messenger_recurring_topics": [],
"fb_page_ids": [],
"fb_uids": [],
"zalo_oa_ids": [],
"zalo_uids": [],
"ladichat_uids": [],
"ladichat_store_ids": [],
"is_merge": false,
"is_delete": false,
"_id": "653a3ca502e8ab00122c39c3",
"email": "test@gmail.com",
"key": "test@gmail.com-5f9fa8a09b5c4d6ce6e3a77d",
"custom_fields": [],
"name": "test",
"first_name": "test",
"last_name": "",
"gender": "male",
"dob": "1989-11-03T00:00:00.000Z",
"dob_year": 1989,
"dob_month": 10,
"dob_day": 3,
"dob_month_day": "1003",
"company": "LadiPage",
"job_title": "Coder",
"city": "Hà Nội",
"district": "Nam Từ Liêm",
"address": "68 Nguyễn Cơ Thạch",
"ward": "Mỹ Đình 1",
"postal_code": 100000,
"website": "123",
"facebook_url": "123",
"twitter_url": "123",
"linkedIn_url": "123",
"alias": "testgmail-com-test",
"status": "SUBSCRIBER",
"subscribed_at": "2023-10-26T10:17:09.526Z",
"external_customer_id": "123",
"source": "API",
"store_id": "5f9fa8a09b5c4d6ce6e3a77d",
"owner_id": "5ebd77abdbd90818b28f8fce",
"creator_id": "5ebd77abdbd90818b28f8fce",
"avatar_color": "#0137D3",
"score": 14,
"fb_page_uids": [],
"zalo_oa_uids": [],
"ladichat_store_uids": [],
"created_at": "2023-10-26T10:17:09.529Z",
"updated_at": "2023-10-26T10:17:09.529Z",
"isNewSubscriber": true,
"external_data": [
{
"name": "full_name",
"value": "test"
},
{
"name": "lang",
"value": "vi"
},
{
"name": "subcribed_at",
"value": "2020-12-01"
},
{
"name": "owner_id",
"value": "5ebd77abdbd90818b28f8fce"
},
{
"name": "creator_id",
"value": "5ebd77abdbd90818b28f8fce"
},
{
"name": "is_delete",
"value": false
}
]
},
"message": "Thành công",
"code": 201
}
Cấu trúc thuộc tính data
| Thuộc tính | Kiểu dữ liệu | Mô tả |
|---|
| data | Object | Dữ liệu khách hàng được tạo |
| message | string | Thông điệp |
| code | number | Mã phản hồi |