Update Customer
Function
To update information for a specific customer
更新顧客資料
URL
PUT API_DOMAIN/v1/customers/:id
Request parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| name | String | Customer's name 顧客姓名 | |
| mobile_phone | String | Customer Mobile Phone 顧客手機
| "mobile_phone":"944384598" |
| mobile_phone_country_calling_code *required if mobile_phone is not empty | String | Country Code of Mobile Phone 手機號碼國碼 | "mobile_phone_country_calling_code":"886" |
| phones | String | (to be deprecated, please use phone)Customer's phones, separate by comma if multiple 顧客電話, 以逗号分隔 | |
| phone | String | Customer's phone 顧客電話 | "phone": "0987123456" |
| phone_country_code | String | Country Code of Customer's phone 顧客電話國碼 | "phone_country_code": "886" |
String | Customer's email 顧客電子郵件 | "email":"[email protected]" | |
| gender | String | Customer's Gender 顧客性別
| |
| birthday | Date | Customer's birthday 顧客生日
| |
| birth_year | Integer | Customer's birth year 顧客出生年份
| "birth_year": 2000 |
| birth_month | Integer | Customer's birth month 顧客出生月份
| "birth_month": 10 |
| birth_day | Integer | Customer's birth day 顧客出生日期
| "birth_day": 5 |
| is_member | Boolean | Set as registered customer 目前只支持將客戶轉成會員,不支援消息客戶會員。 | |
| is_accept_marketing | Boolean | Set as True for acceptance of marketing news. 對應到前台顧客勾選 “訂閱電郵與簡訊”。
| |
| is_blacklisted | Boolean | Set as blacklisted 是否設定在黑名單 | |
| membership_tier_id | String | Membership Tier ID 會員等級ID
| |
| tier_expires_at | String | Tier Expires At Only future Date is available [Note]
| "tier_expires_at": "2026-12-31" |
| delivery_addresses | Array | Customer's Delivery Addresss 顧客送貨地址
| |
| ref_user_id | String | User ID from third party 第三方顧客ID | |
| memo | String | 備註 | |
| tags | String | 無法被顧客標籤 | |
| custom_fields | Hash | Custom field content 顧客客製化欄位
| |
Request Example
curl -X PUT \
API_DOMAIN/v1/customers/5ae6978d69702d04ad000000 \
-H 'Accept: application/json' \
-H 'Authorization: Bearar access_token' \
-H 'Content-Type: application/json' \
-d '{
"name": "Shopline User",
"mobile_phone": "944384598",
"mobile_phone_country_calling_code": "886",
"phones": "02-27423586,0910000123",
"gender": "male",
"birthday": "2000-06-01",
"memo": "memo by Grant",
"tags": ["Tag A", "Tag C"],
"is_member": "true",
"is_blacklisted": "false",
"membership_tier_id": "",
"ref_user_id": "SL001",
"custom_data": {
"5a72fdb0e388097fac000008": "Test Value"
}
}'Response fields
Response Example
{
"id": "606d4051c6febd0022d13447",
"name": "Shopline User",
"email": "[email protected]",
"gender": "male",
"birthday": "2000-06-01",
"birth_year": 2000,
"birth_month": 6,
"birth_day": 1,
"memo": "memo by Grant",
"phones": [
"02-27423586",
"0910000123"
],
"phone": "0910000123",
"mobile_phone": "0944384598",
"mobile_phone_verified": false,
"mobile_phone_country_calling_code": "886",
"locale_code": "zh-hant",
"order_count": 0,
"orders_total_sum": {
"cents": 0,
"currency_symbol": "NT$",
"currency_iso": "TWD",
"label": "",
"dollars": 0.0
},
"is_member": true,
"is_blacklisted": false,
"is_subscribed_marketing_email": true,
"credit_balance": 0,
"member_point_balance": 0,
"custom_data": [],
"membership_tier": null,
"delivery_addresses": [
{
"city": "Taipei",
"postcode": "10560",
"address_1": "光復北路11巷44號14樓",
"address_2": "松山區",
"recipient_name": "marry",
"recipient_phone": "0227423966",
"recipient_phone_country_code": "886",
"country": "TW",
"state": null,
"key": null,
"layer1": null,
"layer2": null,
"layer3": null,
"district": null,
"logistic_codes": null
},
{
"city": "Taipei",
"postcode": "10560",
"address_1": "光復北路11巷44號14樓",
"address_2": "松山區",
"recipient_name": "marry",
"recipient_phone": "0227423966",
"country": "TW",
"state": null,
"key": null,
"layer1": null,
"layer2": null,
"layer3": null,
"district": null,
"logistic_codes": null
}
],
"subscribed_email_types": [
"marketing.news"
],
"ref_user_id": "SL001",
"line_id": null,
"facebook_id": null,
"updated_at": "2021-04-07T10:09:04.104+00:00",
"created_at": "2021-04-07T05:17:05.406+00:00",
"current_sign_in_at": null,
"last_sign_in_at": null,
"registered_at": "2021-04-07T05:17:05.368+00:00",
"created_by": "mc",
"tags": [
"A",
"C"
],
"customer_authentication_linkings": [],
"tier_expires_at": null
}Updated 6 months ago
Did this page help you?
