/shops/{SHOP_ID}/customersCustomer listPOST/shops/{SHOP_ID}/customersCreate customerGET/shops/{SHOP_ID}/customers/{CUSTOMER_ID}Customer detailPUT/shops/{SHOP_ID}/customers/{CUSTOMER_ID}Update customerGET/shops/{SHOP_ID}/customers/point_logsCustomer reward point historyPOST/shops/{SHOP_ID}/promotion_advance/create_multiCreate promotions by customerGET/shops/{SHOP_ID}/customers/{CUSTOMER_ID}/load_customer_notesList of notesPOST/shops/{SHOP_ID}/customers/{CUSTOMER_ID}/create_noteAdd noteGET/shops/{SHOP_ID}/customer_levelsCustomer level listCustomer list
/shops/{SHOP_ID}/customersGet list of customers
Path parameters
SHOP_IDintegerrequiredShop ID
Query parameters
page_sizeintegerPage size
page_numberintegerPage number
searchstringSearch keyword
start_time_inserted_atintegerStart time inserted
end_time_inserted_atintegerEnd time inserted
start_time_updated_atintegerStart time updated
end_time_updated_atintegerEnd time updated
customer_idsstringCustomer IDs (comma-separated)
selectedLevel[]array<string>Customer level IDs
Responses
dataarray<Customer>List of customers
page_numberintegerPage number
page_sizeintegerPage size
successbooleanSuccess status
total_entriesintegerTotal entries
total_pagesintegerTotal pages
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers?api_key=API_KEY"{
"success": true,
"data": [
{
"id": "b0110315-b102-436b-8b3b-ed8d16740327",
"name": "Trần Văn Hoàng",
"gender": "male",
"emails": [
"thudo@gmail.com"
],
"phone_numbers": [
"0999999999"
],
"date_of_birth": "1999-09-01",
"reward_point": 10,
"is_discount_by_level": true,
"tags": [],
"is_block": false,
"assigned_user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
"level_id": null,
"notes": [],
"shop_customer_address": [
{
"id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
"country_code": null,
"province_id": "101",
"district_id": "10101",
"commune_id": null,
"address": "lê văn lương",
"full_address": "lê văn lương, Quận Ba Đình, Hà Nội",
"full_name": "test",
"phone_number": "0999999999"
}
],
"order_count": 108,
"purchased_amount": 0,
"succeed_order_count": 8,
"last_order_at": "2020-04-01T10:18:41Z",
"conversation_link": "https://pancake.vn/2284322048329488?customer_id=fc0dda4f-8d2a-4e70-a34a-7a6a434c6475",
"referral_code": "1nw4geGA",
"fb_id": null,
"customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02",
"pages_customers": [
{
"id": 256469571170000,
"name": "Clonners",
"platform": "facebook"
}
]
}
]
}Create customer
/shops/{SHOP_ID}/customersPath parameters
SHOP_IDintegerrequiredShop ID
Request body
Request body containing customer information to create
namestringrequiredCustomer name
phoneNumberstringrequiredPhone number
createTypestringCreate type
dateOfBirthstring · dateDate of birth
last_order_atintegerLast order timestamp
shop_customer_addressarray<object>Customer addresses
Responses
dataCustomerCustomer information
successbooleanSuccess status
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers?api_key=API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Hoang",
"phoneNumber": "0909090909",
"createType": "force",
"dateOfBirth": "1995-02-01",
"last_order_at": 1715878800,
"shop_customer_address": [
{
"full_address": "190, phường dịch vọng, cầu giấy, hà nội",
"full_name": "hoang",
"phone_number": "0972868874"
},
{
"full_address": "190, Mỹ đình 2, Nam từ liêm, hà nội",
"full_name": "hoang",
"phone_number": "0972868875"
}
]
}'{
"success": true,
"data": {
"id": "9e749e68-142f-4587-a3b1-70279c30b5c2",
"name": "Nguyen Van Hoang",
"gender": null,
"emails": [],
"phone_numbers": [
"0903924956"
],
"date_of_birth": "1995-02-01",
"reward_point": 0,
"is_discount_by_level": true,
"tags": [],
"is_block": false,
"assigned_user_id": "e4cec6de-96fa-4c16-9523-07910ddfee8e",
"level_id": null,
"notes": [],
"shop_customer_address": [
{
"id": "deeb419a-e7b6-42fd-9684-52ec6a72a41a",
"country_code": 84,
"province_id": null,
"district_id": null,
"commune_id": null,
"address": null,
"full_address": null,
"full_name": null,
"phone_number": "0903924956"
}
],
"order_count": 0,
"purchased_amount": 0,
"succeed_order_count": 0,
"last_order_at": "2024-05-16T17:00:00Z",
"conversation_link": null,
"referral_code": "gqo7ulKf",
"fb_id": null,
"customer_id": "5b717afb-1856-48c9-9b6e-b8ac9db7d520"
}
}Customer detail
/shops/{SHOP_ID}/customers/{CUSTOMER_ID}Get detail information of a customer
Path parameters
SHOP_IDintegerrequiredShop ID
CUSTOMER_IDstringrequiredCustomer ID
Responses
dataCustomerCustomer information
successbooleanSuccess status
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers/{CUSTOMER_ID}?api_key=API_KEY"{
"success": true,
"data": [
{
"id": "b0110315-b102-436b-8b3b-ed8d16740327",
"name": "Trần Văn Hoàng",
"gender": "male",
"emails": [
"thudo@gmail.com"
],
"phone_numbers": [
"0999999999"
],
"date_of_birth": "1999-09-01",
"reward_point": 10,
"is_discount_by_level": true,
"tags": [],
"is_block": false,
"assigned_user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
"level_id": null,
"notes": [],
"shop_customer_address": [
{
"id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
"country_code": null,
"province_id": "101",
"district_id": "10101",
"commune_id": null,
"address": "lê văn lương",
"full_address": "lê văn lương, Quận Ba Đình, Hà Nội",
"full_name": "test",
"phone_number": "0999999999"
}
],
"order_count": 108,
"purchased_amount": 0,
"succeed_order_count": 8,
"last_order_at": "2020-04-01T10:18:41Z",
"conversation_link": "https://pancake.vn/2284322048329488?customer_id=fc0dda4f-8d2a-4e70-a34a-7a6a434c6475",
"referral_code": "1nw4geGA",
"fb_id": null,
"customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02",
"pages_customers": [
{
"id": 256469571170000,
"name": "Clonners",
"platform": "facebook"
}
]
}
]
}Update customer
/shops/{SHOP_ID}/customers/{CUSTOMER_ID}Path parameters
SHOP_IDintegerrequiredShop ID
CUSTOMER_IDstringrequiredCustomer ID
Request body
Request body containing customer information to update
customerCustomerrequiredCustomer information
Responses
successbooleanSuccess status
curl -X PUT "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers/{CUSTOMER_ID}?api_key=API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer": {
"name": "Nguyễn Thị Hằng",
"gender": "female",
"emails": [
"pancake@gmail.com",
"hoang@gmail.com"
],
"phone_numbers": [
"0983925966"
],
"date_of_birth": "1995-03-04",
"reward_point": 20,
"is_discount_by_level": false,
"tags": [
"Hay hoàn"
],
"is_block": false,
"assigned_user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
"level_id": "f8dced06-965d-4070-a765-dd8268373f1e",
"notes": [
{
"id": "8a6f5380-4674-44e9-aaf2-40d898d460f5",
"message": "Khách hàng thân thiết",
"images": [
{
"url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2023/9/6/655ae9172118ba9ffde16fa129a7001a392d1fff.png"
}
]
}
],
"shop_customer_address": [
{
"id": "df631f21-3841-4d1c-8204-b85a7ecfce0c",
"country_code": 84,
"province_id": "101",
"district_id": "10113",
"commune_id": "1011309",
"address": "190 Cầu Giấy",
"full_name": "sơn",
"phone_number": "0972868874"
}
],
"order_count": 7,
"purchased_amount": 1000000
}
}'{
"success": true
}Customer reward point history
/shops/{SHOP_ID}/customers/point_logsGet reward point history for a customer
Path parameters
SHOP_IDintegerrequiredShop ID
Query parameters
shop_customer_idstringrequiredCustomer ID
page_sizeintegerPage size
page_numberintegerPage number
Responses
dataarray<object>List of point logs
page_numberintegerPage number
page_sizeintegerPage size
successbooleanSuccess status
total_entriesintegerTotal entries
total_pagesintegerTotal pages
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers/point_logs?api_key=API_KEY&shop_customer_id=96a8e283-3fba-492e-a35a-970f72a30a02"{
"success": true,
"data": [
{
"amount": 10,
"creator": {
"id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
"name": "Hoang Anh",
"fb_id": "2042723249341651",
"avatar_url": null
},
"current_point": 100,
"inserted_at": "2024-01-01T00:00:00Z",
"note": "Tích điểm từ đơn hàng"
}
]
}Create promotions by customer
/shops/{SHOP_ID}/promotion_advance/create_multiCreate promotions for specific customers
Path parameters
SHOP_IDintegerrequiredShop ID
Request body
Request body containing promotion information to create for customers
promotion_advanceobjectrequiredResponses
successbooleanSuccess status
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/promotion_advance/create_multi?api_key=API_KEY" \
-H "Content-Type: application/json" \
-d '{
"promotion_advance": {
"promotion": {
"start_time": "2024-09-30T04:58:30.020Z",
"end_time": "2024-10-30T04:58:30.020Z",
"warehouse_ids": [],
"customer_tags": [],
"type": "discount_by_coupon_id",
"is_activated": true,
"promo_code_info": {
"discount": 5,
"is_percent": true,
"max_discount_by_percent": 100000,
"disable": false,
"order_price_min": 2000000,
"order_price_max": 3000000,
"no_applied_products_in_other_promotions": true,
"discount_after_other_discount": true
}
},
"shop_customer_ids": [
"a8c1113d-55c2-4f7e-b33a-d4ecd76668fd"
]
}
}'{
"success": true
}List of notes
/shops/{SHOP_ID}/customers/{CUSTOMER_ID}/load_customer_notesGet list of customer notes
Path parameters
SHOP_IDintegerrequiredShop ID
CUSTOMER_IDstringrequiredCustomer ID
Responses
customer_notesarray<object>List of customer notes
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers/{CUSTOMER_ID}/load_customer_notes?api_key=API_KEY"{
"customer_notes": [
{
"notes": [
{
"id": "8a6f5380-4674-44e9-aaf2-40d898d460f5",
"message": "Khách hàng thân thiết",
"images": [
{
"url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2023/9/6/655ae9172118ba9ffde16fa129a7001a392d1fff.png"
}
],
"created_at": 1693987200,
"updated_at": 1693987200,
"order_id": "116947",
"created_by": {
"uid": "cee3c05e-5f85-43c4-b27e-889b99c50097",
"fb_id": "377936050731194",
"fb_name": "Vũ Sơn"
},
"edit_history": []
}
]
}
]
}Add note
/shops/{SHOP_ID}/customers/{CUSTOMER_ID}/create_noteAdd a note to customer
Path parameters
SHOP_IDintegerrequiredShop ID
CUSTOMER_IDstringrequiredCustomer ID
Request body
Request body containing customer note information
conversation_idstringConversation ID
page_idstringPage ID
messagestringNote content
imagesarray<object>Note image information
order_idintegerOrder ID
Responses
successbooleanSuccess status
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customers/{CUSTOMER_ID}/create_note?api_key=API_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation_id": "117967746266487_9306266852780716",
"page_id": "117967746266487",
"message": "khách hàng mua nhiều lần",
"images": [
{
"image_data": {
"height": 225,
"width": 225
},
"name": "iship thai.jpeg",
"preview_url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/2/25/2488ecb12514520d9828390f695abc9db69a1452.jpg",
"url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/2/25/2488ecb12514520d9828390f695abc9db69a1452.jpg"
}
],
"order_id": 116947
}'{
"success": true
}Customer level list
/shops/{SHOP_ID}/customer_levelsGet list of customer levels
Path parameters
SHOP_IDintegerrequiredShop ID
Query parameters
searchstringCustomer level name
Responses
dataarray<object>List of customer levels
successbooleanSuccess status
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/customer_levels?api_key=API_KEY"{
"success": true,
"data": [
{
"id": "84fdef8b-8e4b-44e7-8d61-8553ee7f5833",
"name": "cap 1",
"color_customer_level": "#87d068",
"discount": 5,
"discount_type": 3,
"shop_id": 20,
"upgrade_by_order_count": 10,
"upgrade_by_point": 100,
"upgrade_by_total_purchase": 30000000
}
]
}