Tourwell Open APIs
  1. v1
Tourwell Open APIs
  • Tổng quan
  • Hướng dẫn xác thực
  • API Beta 1.0
  • API Zalo Mini App (Beta)
  • Khách hàng
    • v1
      • Get by id
        GET
      • Get all customer
        GET
      • Create customer
        POST
      • Update customer
        PUT
      • Get order history
        GET
  • Đơn hàng
    • v1
      • Get by id
      • Get all order
      • Create order tour
      • Create order product
      • Create order hotel
      • Confirm payment order
  • Sản phẩm
    • v1
      • Create product
      • Get by id
      • Calendar pricing
  • Lịch khởi hành
  • Lead (Cơ hội)
    • v1
      • Get all lead
      • Get by id
      • Create lead
      • Update lead
  • Khách sạn
    • v1
      • Get all hotel
      • Get by id
  • Kế toán
    • Phiếu thu
      • v1
        • Get all receipt
    • Phiếu chi
      • v1
        • Get all payment
        • Confirm Payment
    • Hóa đơn
      • Update invoice
      • Issue Invoice
      • Get by id
      • Cancel invoice
  • Cấu hình
    • Zalo ZNS
      • Danh sách Tag
      • Get token
    • Địa điểm
      • Search
    • Nhân sự nội bộ
      • Search
    • Webhook
      • Hướng dẫn cài đặt
    • Trạng thái khách hàng
      • Get All
    • Loại dịch vụ
  1. v1

Update customer

PUT
/api/v1/customers/{id}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
id
integer 
required
ID khách hàng
Body Params application/json
pronoun
string 
optional
Danh xưng
Ví dụ: Anh/Chị
name
string 
required
Tên khách hàng
phone
string 
required
Số điện thoại chính
phone_sec
string 
optional
Số điện thoại phụ
email
string 
optional
Email chính
email_sec
string 
optional
Email phụ
country_code
string 
optional
Mã vùng
Ví dụ: (+84)
sub_group
string 
optional
Nhóm khách
Default: standard
personal : Cá nhân
enterprise: Doanh nghiệp
collaborator: Công tác viên
agency: Đại lý,đối tác
organization: Cơ quan,tổ chức
membership_tier_id
integer 
optional
ID Phân hạng trong cấu hình
company_id
integer 
optional
ID Công ty
Lấy theo danh sách Doanh nghiệp, đối tác, đại lý
creator_email
string 
optional
Email người tạo
sales_email
string 
optional
Email sales phụ trách
type_id
integer 
optional
ID trạng thái khách trong cấu hình
source_id
integer 
optional
ID nguồn trong cấu hình
birthday
string 
optional
Sinh nhật khách hàng
Format: dd/mm/yyyy
identification
string 
optional
Số CCCD
passport
string 
optional
Số Hộ chiếu
address
string 
optional
Địa chỉ khách hàng
agent_level_id
integer 
optional
ID cấp đại lý/CTV trong cấu hình
facebook_link
string 
optional
Link Facebook
facebook_name
string 
optional
Tên trên Facebook
gender
string 
optional
Giới tính
male: Nam
female: Nữ
medal
string 
optional
Example
{
    "pronoun": "Chị",
    "name": "Thân Thị Cẩm Lệ",
    "phone": "0888899000",
    "phone_sec": "0912345678",
    "email": "",
    "email_sec": "",
    "country_code": "+84",
    "sub_group": "personal",
    "membership_tier_id": 1,
    "company_id": 123,
    "creator_email": "admin@yourdomain.com",
    "sales_email": "kd2@upwell.vn",
    "type_id": "1",
    "source_id": "1",
    "birthday": "01/01/1990",
    "identification": "123456789",
    "passport": "B12345678",
    "address": "123 Lý Thường Kiệt, Quận 10, TP.HCM",
    "agent_level_id": 2,
    "facebook_link": "",
    "facebook_name": "Cẩm Lệ",
    "gender": "female"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://demo.tourwell.net/api/v1/customers/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "pronoun": "Chị",
    "name": "Thân Thị Cẩm Lệ",
    "phone": "0888899000",
    "phone_sec": "0912345678",
    "email": "",
    "email_sec": "",
    "country_code": "+84",
    "sub_group": "personal",
    "membership_tier_id": 1,
    "company_id": 123,
    "creator_email": "admin@yourdomain.com",
    "sales_email": "kd2@upwell.vn",
    "type_id": "1",
    "source_id": "1",
    "birthday": "01/01/1990",
    "identification": "123456789",
    "passport": "B12345678",
    "address": "123 Lý Thường Kiệt, Quận 10, TP.HCM",
    "agent_level_id": 2,
    "facebook_link": "",
    "facebook_name": "Cẩm Lệ",
    "gender": "female"
}'

Responses

🟢201Created
application/json
Body
success
boolean 
required
message
string 
required
data
object 
required
id
integer 
required
name
string 
required
code
string 
required
link_erp
string 
required
Example
{"success":true,"message":"Customer updated successfully","data":{"id":2147,"name":"Thân Thị Cẩm Lệ","code":"KH2147","link_erp":"http://{{host}}/admin/customer/2147/show"}}
Modified at 2025-06-16 16:41:41
Previous
Create customer
Next
Get order history
Built with