Update Customer
Function
To update information for a specific customer
更新顧客資料
URL
PUT <<api_domain>>/v1/customers/:id
Request parameters
Parameter | Type | Description | Example |
|---|---|---|---|
name |
| Customer's name | |
mobile_phone |
| Customer Mobile Phone
|
|
mobile_phone_country_calling_code |
| Country Code of Mobile Phone |
|
phones |
| (to be deprecated, please use | |
phone | String | Customer's phone |
|
phone_country_code | String | Country Code of Customer's phone |
|
| Customer's email |
| |
gender |
| Customer's Gender
| |
birthday |
| Customer's birthday
| |
birth_year |
| Customer's birth year
|
|
birth_month |
| Customer's birth month
|
|
birth_day |
| Customer's birth day
|
|
is_member |
| Set as registered customer 目前只支持將客戶轉成會員,不支援消息客戶會員。 | |
is_accept_marketing |
| Set as True for acceptance of marketing news. [Note]
| |
is_blacklisted |
| Set as blacklisted | |
membership_tier_id |
| Membership Tier ID
| |
tier_expires_at |
| Tier Expires At 會員等級到期日 Only future Date is available [Note]
|
|
delivery_addresses |
| Customer's Delivery Addresss
| |
ref_user_id |
| User ID from third party | |
memo |
| 備註 | |
tags |
| 無法被顧客標籤 | |
custom_fields |
| 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 3 days ago