v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Customers

Get Customer

To get detailed information for a specific customer with its ID<br>使用顧客ID獲取特定一個顧客的詳細資料

get/customers/{id}

Path parameters

idstring required

Customer unique ID<br>顧客ID

Query parameters

excludes[]string[]

Exclude certain parameters in the response<br>結果要排除哪些參數

[
  "status"
]
fields[]string[]

Only show certain parameters in the response<br> This field will have conflicts to the include_fields[]<br> To avoid the conflicts<br> please also input all the items included in the include_fields[] to this field<br> otherwise those fields will not be shown<br> 結果只顯示哪些參數<br> 這個欄位會跟include_fields[]的欄位有衝突<br> 要避免衝突的話,請輸入所有也包括在include_fields[]內的項目<br> 否則那些項目將不能被顯示

include_fields[]string[]

Provide additional attributes in the response<br>結果添加哪些參數

Response

OK

idstring

Customer Unique ID<br>顧客ID

namestring nullable

Customer Name<br>顧客姓名

emailstring nullable

Customer Email<br>顧客電子郵件

gender'male' | 'female' | 'other' nullable

Customer Gender<br>顧客性別

birthdaystring nullable

Customer Birthday<br>顧客生日<br> Please use birth_year, birth_month, birth_day instead.<br> The field is compatible with the old version.<br> 請使用 birth_year, birth_month, birth_day 代替<br> 此欄位為舊版相容用<br><br> If birth_year is null, then the default year is 1904.<br> 如果 birth_year 為 null, 則預設為 1904 年<br><br> If birth_month is null, then the default month is 1.<br> 如果 birth_month 為 null, 則預設為 1 月<br><br> If birth_day is null, then the default day is 1.<br> 如果 birth_day 為 null, 則預設為 1 日

birth_yearinteger nullable

Customer Birth Year<br>顧客出生年份<br>

birth_monthinteger nullable

Customer Birth Month<br>顧客出生月份<br>

birth_dayinteger nullable

Customer Birth Day<br>顧客出生日期<br>

memostring nullable

Customer memo<br>顧客備註

phonesstring[]

Customer Phones<br>顧客電話<br>-<br>*If customer mobile phone is confirmed, this field is hidden.<br>如果顧客手機已經確認,此欄位則會被隱藏

phonestring nullable

Customer Phone<br>顧客電話<br>-<br>*If customer mobile phone is confirmed, this field is hidden.<br>如果顧客手機已經確認,此欄位則會被隱藏<br> This should be the last item in phones field.<br> 此電話為 phones 欄位的最後一項

phone_country_codestring nullable

Customer Phone Country Code<br>顧客電話國碼

mobile_phonestring nullable

Customer Mobile Phone<br>顧客手機<br>-<br>*If customer mobile phone is confirmed, this field is displayed.<br>如果顧客手機已經確認,此欄位則會被顯示

mobile_phone_verifiedboolean

Mobile Phone is Verified or not<br>是否手機驗證

mobile_phone_country_calling_codestring nullable

Country Code of Mobile Phone<br>手機號碼國碼

locale_codestring nullable

Customer Locale Code<br>顧客使用前台之語言

order_countinteger

Customer Order Number<br>顧客累積訂單數

is_memberboolean

Is the customer a member?<br>顧客是否為會員?

is_blacklistedboolean

Is the customer in black-list?<br>顧客是否在黑名單?

is_subscribed_marketing_emailboolean

Does the customer subscribe marketing email?<br>顧客是否接受優惠宣傳?

credit_balanceinteger

Current Customer Credits<br>顧客購物金餘額

member_point_balanceinteger

Current Member Points<br>顧客會員點數餘額

subscribed_email_typesstring[]

Subscribed Email Types<br>訂閱消息類型

ref_user_idstring nullable

For third party to put custom user_id<br>可供儲存第三方顧客ID

line_idstring nullable

LINE ID<br>顧客Line ID

facebook_idstring nullable

FACEBOOK ID<br>顧客FACEBOOK ID

google_idstring nullable

GOOGLE ID<br>顧客GOOGLE ID

updated_atstring

Customer Last Updated Time<br>顧客最後更新資訊時間<br>-<br>*UTC Time

created_atstring

Customer Created Time<br>顧客資料創造時間<br>-<br>*UTC Time

current_sign_in_atstring nullable

Timestamp updated when customers sign in<br>顧客最後登入時間

last_sign_in_atstring nullable

Holds the timestamp of the previous sign in<br>顧客上一次登入時間

registered_atstring nullable

Customer register's Date and time<br>顧客註冊時間

created_by'shop' | 'admin' | 'openapi' | 'shop_crm' | 'pos'

顧客建立來源<br>"shop" 來自前台網站<br> "admin" 來自後台<br>"openapi" 由open api創建<br> "shop_crm" 來自 kiosk<br>"pos"來自 POS

created_by_channelstring nullable

顧客建立店家來源

tagsstring[]

自定義標籤

tier_expires_atstring nullable

Membership expiry date<br>會籍到期日

confirmed_atstring nullable

timestamp of the email verification<br>顧客確認電郵注册時間

referral_codestring nullable

Referral code<br>推薦碼

offline_referral_registered_atstring nullable

Referral Registered At<br>門市綁定時間

offline_referral_channel_idstring nullable

Referral Channel ID<br>門市 ID

offline_referral_agent_idstring nullable

Referral Agent ID<br>門市推薦人 ID

metafieldsobject

metafields<br>only show if include_fields[]=metafields

customer_authentication_linkingsstring[]

3rd Party Customer Authentication(SSO)<br> SSO 第三方串接相關資訊<br><br> * 備註:串接 SSO 的會員 ID 不會存在 ref_user_id,會存在 customer_authentication_linkings 中的 ref_id

info_reward_triggeredboolean

If the Update Customer API is called to update customer information and triggers the sending of a customer data reward, it will be true.<br> 如果呼叫 Update Customer API 更新顧客資料並觸發發送顧客資料獎賞,則為 true

info_reward_claimedboolean

Whether the customer has claimed the info reward<br>顧客是否已經領取資料獎賞

Example response

{
  "id": "5ce0d084e388096bdb229a59",
  "name": "Shopline User",
  "email": "rich+2019@shopline.com",
  "gender": "male",
  "birthday": "2013-06-01",
  "birth_year": 2013,
  "birth_month": 6,
  "birth_day": 2,
  "memo": "高級客戶",
  "phones": [],
  "phone": "0910000123",
  "phone_country_code": "886",
  "mobile_phone": "0910000123",
  "mobile_phone_verified": true,
  "mobile_phone_country_calling_code": "886",
  "locale_code": "zh-hant",
  "order_count": 1,
  "orders_total_sum": {
    "cents": 999999999,
    "currency_symbol": "NT$",
    "currency_iso": "TWD",
    "label": "NT$999,999,999",
    "dollars": 999999999
  },
  "is_member": true,
  "is_subscribed_marketing_email": true,
  "credit_balance": 500,
  "member_point_balance": 30,
  "custom_data": [
    {
      "type": "text",
      "name_translations": {
        "zh-hant": "測試欄位",
        "en": "Test Field"
      },
      "field_id": "5ad86757e38809441400001b",
      "value": "Test Field Value"
    }
  ],
  "membership_tier": {
    "id": "5de6192b9a8b7900365abb5b",
    "level": 2,
    "name_translations": {
      "zh-hant": "山竹會員"
    },
    "status": "active"
  },
  "delivery_addresses": [],
  "subscribed_email_types": [
    "marketing.news"
  ],
  "ref_user_id": "SL001",
  "line_id": "null",
  "facebook_id": "null",
  "google_id": "null",
  "updated_at": "2018-07-31T03:57:36.409+00:00",
  "created_at": "2018-01-10T06:33:45.231+00:00",
  "current_sign_in_at": "2018-07-31T03:49:52.725+00:00",
  "last_sign_in_at": "2018-04-02T04:02:23.391+00:00",
  "registered_at": "2018-01-10T06:33:45.231+00:00",
  "registered_from_channel": {
    "id": "5ce0d084e388096bdb229a59",
    "updated_at": "2018-07-31T03:57:36.409+00:00",
    "created_at": "2018-07-31T03:57:36.409+00:00",
    "default_warehouse_id": "5ce0d084e388096bdb229a59",
    "identifier": "00222333",
    "phones": {
      "main": "0912345678"
    },
    "address": {
      "address_1": "1/F, Some Building",
      "city": "City",
      "state": "Perak",
      "postcode": "36500",
      "country": "Malaysia",
      "country_code": "MY"
    },
    "pin_codes": [
      {
        "scope": "switch_store"
      }
    ],
    "e_invoice_setting": {
      "invoice_type": "none"
    }
  },
  "tags": [
    "Tag A",
    "Tag B"
  ],
  "tier_expires_at": "2021-12-18T15:59:59.999+00:00",
  "confirmed_at": "2021-12-06T02:37:06.363+00:00",
  "utm_data": {
    "utm_source": "google",
    "utm_campaign": "spring_sale",
    "utm_medium": "cpc",
    "utm_content": "logolink",
    "utm_term": "running+shoes"
  },
  "offline_referral_registered_at": "2021-12-06T02:37:06.363+00:00",
  "offline_referral_channel_id": "5de6192b9a8b7900365abb5b",
  "offline_referral_agent_id": "5de6192b9a8b7900365abb5b",
  "membership_tier_gap": {
    "next_tier": {
      "id": "5de6192b9a8b7900365abb5b",
      "level": 2,
      "name_translations": {
        "zh-hant": "山竹會員"
      },
      "membership_tier_rules": [
        {
          "id": "61653d1ce250830024bc53de",
          "effect_type": "upgrade",
          "condition_interval": {
            "type": "single_purchase",
            "time_unit": "month",
            "time_value": 12
          },
          "effect_interval": {
            "type": "unlimited",
            "time_unit": "month",
            "time_value": 12
          },
          "total_spending": {
            "cents": 110,
            "currency_symbol": "HK$",
            "currency_iso": "HKD",
            "label": "HK$1.10",
            "dollars": 1.1
          },
          "created_at": "2021-10-12T07:45:32.383Z",
          "updated_at": "2021-10-12T07:45:32.383Z"
        }
      ]
    }
  },
  "current_membership_tier_info": {
    "_id": "5de6192b9a8b7900365abb5b",
    "level": 2,
    "name_translations": {
      "zh-hant": "山竹會員"
    },
    "merchant_id": "611cd8ade0f510001e130048",
    "promotion_count": 1,
    "valid_period": {
      "type": "unlimited",
      "time_unit": "month"
    },
    "membership_tier_rules": [
      {
        "id": "61653d1ce250830024bc53de",
        "effect_type": "upgrade",
        "condition_interval": {
          "type": "single_purchase",
          "time_unit": "month",
          "time_value": 12
        },
        "effect_interval": {
          "type": "unlimited",
          "time_unit": "month",
          "time_value": 12
        },
        "total_spending": {
          "cents": 110,
          "currency_symbol": "HK$",
          "currency_iso": "HKD",
          "label": "HK$1.10",
          "dollars": 1.1
        },
        "created_at": "2021-10-12T07:45:32.383Z",
        "updated_at": "2021-10-12T07:45:32.383Z"
      }
    ]
  },
  "metafields": {
    "namespace": {
      "key1": "value",
      "key2": 3,
      "key3": {
        "json": "object"
      }
    }
  },
  "customer_authentication_linkings": [
    {
      "_id": "6360c5e74835a50010314af9",
      "created_at": "2022-11-01T07:08:23.185Z",
      "customer_authentication_id": "6050398ea3546c0032a7ed32",
      "merchant_id": "6037452b4bf8b200305d7ed6",
      "platform": null,
      "ref_id": "739790",
      "ref_info": {
        "wmid": "739790",
        "email": "lowdown0619@gmail.com ",
        "name": "lowdown0619",
        "profile": "womany member"
      },
      "status": "active",
      "updated_at": "2022-11-01T07:08:23.185Z",
      "user_id": "6360c5e6b2c2bb0012d3e2a5"
    }
  ],
  "subscriptions": [
    {
      "platform": "sms"
    }
  ],
  "orders_totals": [
    {
      "id": "59e97965e388095314000010",
      "total": {
        "cents": 999999999,
        "currency_symbol": "NT$",
        "currency_iso": "TWD",
        "label": "NT$999,999,999",
        "dollars": 999999999
      },
      "platform": "mc"
    }
  ],
  "member_info_reward": {
    "custom_fields": [
      {
        "name_translations": {
          "zh-hant": "LINE ID"
        },
        "member_info_reward": true,
        "field_id": "64250e522e1b87003ed0286f"
      }
    ],
    "reward_on": [
      "name",
      "email",
      "mobile_phone",
      "gender",
      "birthday"
    ],
    "promotion_ids": [
      "promotion_id_1",
      "promotion_id_2"
    ],
    "user_credits": 20,
    "member_points": 100
  }
}