Member API
API quản lý thành viên
Lấy thông tin thành viên của một địa điểm
GET
{{base_url}}/customers_location
Cho phép lấy thông tin thành viên của một địa điểm (shop, cửa hàng, nhà hàng...) theo số điện thoại
Query Parameters
shop_id
string
id địa điểm
pos_id
string
id địa điểm
phone
string
Số điện thoại
Headers
Authorization
string
Bearer <access_token>
{
"status": 200,
"message": "Customer info",
"data": {
"_id": "5d8c353a7c857b43b4eff3ae",
"age_range": "",
"year_birthday": "1996",
"home_town": "Ha Noi",
"twitter": "",
"gender": "1",
"created_at": "26-09-2019",
"fb_id": "152134088",
"phone": "0945350398",
"birthday": "05-30",
"facebook": "https://vi-vn.facebook.com/nextifyvn",
"address": "Phao Dai Lang",
"relationship_status": "Chua ket hon",
"client_mac": [],
"email": "phundk59uet@gmail.com",
"name": "Ly Tu Quang Thang",
"updated_at": "26-09-2019"
}
Lưu ý:
Bắt buộc phải truyền shop_id hoặc pos_id
Lấy shop_id qua Merchant API
curl -X GET \
'{{ base_url }}/customers_location?shop_id={{ shop_id }}&phone={{ phone }}' \
-H 'Authorization: Bearer {{ access_token }}'
Lấy thông tin thành viên của Merchant
GET
{{ base_url }}/customers
Cho phép lấy thông tin thành viên của Merchant theo số điện thoại
Query Parameters
merchant_id
string
id merchant
phone
string
số điện thoai
Headers
Authorization
string
Bearer <access_token>
{
"status": 200,
"message": "Customer info",
"data": {
"_id": "5d8c353a7c857b43b4eff3ae",
"age_range": "",
"year_birthday": "1996",
"home_town": "Ha Noi",
"twitter": "",
"gender": "1",
"created_at": "26-09-2019",
"fb_id": "152134088",
"phone": "0945350398",
"birthday": "05-30",
"facebook": "https://vi-vn.facebook.com/nextifyvn",
"address": "Phao Dai Lang",
"relationship_status": "Chua ket hon",
"client_mac": [],
"email": "phundk59uet@gmail.com",
"name": "Ly Tu Quang Thang",
"updated_at": "26-09-2019"
}
Lưu ý:
- Lấy merchant_id qua Partner API
curl -X GET \
'{{ base_url }}/customers?merchant_id={{ merchant_id }}&phone={{ phone }}' \
-H 'Authorization: Bearer {{ access_token }}'
Tạo mới thành viên
POST
{{base_url}}/customers_location
Cho phép tạo mới thành viên vào một địa điểm
Query Parameters
pos_id
string
id địa điểm
Headers
Authorization
string
Bearer <access_token>
Content-Type
string
application/json
Request Body
name
string
Họ và tên
phone
string
Số điện thoại
string
company
string
Công ty
company_role
string
Vị trí trong công ty
gender
string
Giới tính (nam: 1, nữ: 2)
birthday
string
Sinh nhật (mm-dd)
year_birthday
string
Năm sinh
address
string
Địa chỉ
note
string
id facebook
string
Link facebook cá nhân
string
Link twitter cá nhân
{
"status": 200,
"status_code": 200,
"message": "Success!"
}
Lưu ý:
- Bắt buộc phải truyền vào phone hoặc email
Thay đổi thông tin thành viên
PUT
{{base_url}}/customers_location
Query Parameters
pos_id
string
id địa điểm
phone
string
Số điện thoại
Headers
Authorization
string
Bearer <access_token>
Content-Type
string
application/json
Request Body
name
string
Họ và tên
string
gender
string
Giới tính (nam: 1, nữ: 2)
relationship_status
string
Trạng thái hôn nhân
birthday
string
Sinh nhật (mm-dd)
year_birthday
string
Năm sinh
home_town
string
Quê quán
address
string
Địa chỉ
fb_id
string
id facebook
string
Link facebook cá nhân
string
Link twitter cá nhân
{
"status": 200,
"status_code": 200,
"message": "Success!"
}
Tạo mới thành viên ( theo địa chỉ mac )
POST
{{ base_url }}/customers_mac
cho phép tạo mới thành viên tại một địa điểm
Query Parameters
gateway_mac
string
địa chỉ MAC thiết bị của địa điểm
Headers
Authorization
string
Bearer <access_token>
Content-Type
string
application/json
Request Body
name
string
họ và tên người dùng
string
địa chỉ email người dùng
address
string
địa chỉ người dùng
phone
string
số điện thoại người dùng
client_mac
string
địa chỉ MAC của người dùng
Tạo tag cho khách hàng
POST
{{base_url}}/customers/tags
Cho phép tạo và chỉnh sửa tag cho khách hàng
Query Parameters
merchant_id_app
string
id merchant
phone
string
Số điện thoại khách hàng
tag_id
string
id tag ( danh sách tag trong phần tag API )
Headers
Authorization
string
Bearer <access_token>
Last updated
Was this helpful?