v1

latestOpenAPI 3.0.02026-07-26318168886.7 KB
Customers

Search Customers

To search customers with specific conditions.<br>利用特殊條件搜尋顧客列表。

get/customers/search

Query parameters

pageinteger

Page<br>頁數<br>(Default: 1)

per_pageinteger

Numbers of Customers per page<br>每頁顯示 n 筆資料<br>(Default: 24, Max: 999)

querystring

Support searching fields below:<br>支援搜尋以下欄位:<br>name<br>email<br>phones<br>mobile_phone

search_fieldsstring[]

To specify searching fields <br>指定搜尋欄位:<br>name<br>email<br>phones<br>mobile_phone

[
  "phones"
]
id[]string[]

Customer's ID list<br>顧客編號列表

[
  "id[]=61d665768e511b67d7150d6a&id[]=61c5792eb8bf0b001c44b4cb"
]
namestring

Customer's Name<br>顧客姓名<br>-<br>*Support equal or not equal.<br>支援 等於 或 不等於

emailstring

Customer's Email<br>顧客Email<br>-<br>*Support equal or not equal.<br>支援 等於 或 不等於

phonestring

Customer's Phone<br>顧客電話<br>-<br>Support equal or not equal.<br>支援 等於 或 不等於

phonesstring

Customer's Phones<br>顧客電話<br>-<br>Support equal or not equal.<br>支援 等於 或 不等於

mobile_phonestring

Customer's Mobile Phone<br>顧客手機<br>-<br>Support equal or not equal.<br>支援 等於 或 不等於.

genderstring

Customer's Gender<br>顧客性別<br>-<br>Gender allows<br>male 男性<br>female 女性<br>other 其他<br><br>Support equal or not equal.<br>支援 等於 或 不等於.

membership_tier_idstring

Membership Tier<br>顧客等級<br>-<br>With blank will return customers without membership tier<br>當帶入空值,將回傳無會員等級之顧客<br><br>With not: will return customers with membership tier<br>當帶入not:,將回傳有會員等級之顧客<br><br>*Support equal or not equal.<br>支援 等於 或 不等於.

created_atstring

Filter customers by created time<br>以顧客創造時間作為搜尋依據<br>-<br>Support equal or not equal or less than or less than or equal or greater than or greater than or equal<br>支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於<br><br>Please fill in to the second level. Default value is 00:00:00 if only fill in dates.<br>請輸入至秒數,若只輸入日期,則會自動帶入當天00:00:00

updated_atstring

Filter customers by created time<br>以顧客更新時間作為搜尋依據<br>-<br>*Support equal or not equal or less than or less than or equal or greater than or greater than or equal<br>支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於

registered_atstring

Filter customers by registered time<br>以顧客註冊時間作為搜尋依據<br>-<br>*Support equal or not equal or less than or less than or equal or greater than or greater than or equal<br>支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於

birthdaystring

Filter customers by birthday<br>以顧客生日作為搜尋依據<br>-<br>*Support equal or not equal or less than or less than or equal or greater than or greater than or equal<br>支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於

birth_monthstring

Filter customers by birth month<br>以顧客生日月份作為搜尋依據<br>-<br> *Support equal or not equal or less than or less than or equal or not equal or greater than or greater than or equal<br> 支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於

credit_balancestring

Filter customers by credit balance<br>以購物金作為搜尋依據<br>-<br>*Support equal or not equal or less than or less than or equal or greater than or greater than or equal<br>支援 等於 或 不等於 或 小於 或 小於等於 或 大於 或 大於等於

is_memberboolean

Filter member customers.<br>搜尋是會員的顧客

is_blacklistedboolean

Filter Blacklisted Customers.<br>搜尋是黑名單的顧客

is_subscribed_marketing_emailboolean

Filter Customers by Marketing Acceptance.<br>搜尋接受優惠宣傳的顧客

ref_user_idstring

Third party custom customer id<br>第三方儲存之顧客ID

tagsstring

Custom tags<br>自定義標籤

Response

OK

Example response

{
  "items": [
    {
      "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
      }
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 24,
    "total_count": 1,
    "total_pages": 1
  }
}