---
title: "客户创建"
description: "当客户被创建时触发。"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/webhook/customers/customer-add'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/webhook/customers/customer-add.md'
---
# 客户创建

当客户被创建时触发。

- **API Version:** v20270301
- **API Type:** Webhook
- **API Protocol:** RESTful

## Request

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `X-Shopline-Topic`

  string (required)

  事件的唯一标识。

* `X-Shopline-Hmac-Sha256`

  string (required)

  该请求的签名。收到请求后，你需要对该签名进行 [验签](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/generate-and-verify-signatures.md#post-请求操作步骤) 以验证数据的真实性和完整性。

* `X-Shopline-Shop-Domain`

  string (required)

  店铺的域名。

* `X-Shopline-Shop-Id`

  string (required)

  店铺 ID。

* `X-Shopline-Merchant-Id`

  string (required)

  商家 ID。

* `X-Shopline-API-Version`

  string (required)

  API 版本号。

* `X-Shopline-Webhook-Id`

  string (required)

  该 Webhook 事件的 ID。

### Request Body

* `accepts_marketing`

  boolean

  客户是否接受通过邮件订阅营销信息。
  * `true`：接受
  * `false`：不接受   
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::
  
    
  
  
  
  
  
  

* `accepts_marketing_updated_at`

  string

  客户邮件营销订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::
  

* `accepts_mobile_marketing`

  boolean

  客户是否接受通过短信订阅营销信息。 
  * `true`：接受
  * `false`：不接受  
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::

* `accepts_mobile_marketing_updated_at`

  string

  客户短信营销订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::

* `addresses`

  array<object>

  客户地址列表。

  * `address1`

    string

    客户地址第一行，通常是街道地址或邮政信箱编号等信息。

  * `address2`

    string

    客户地址的第二行，通常是公寓、套房或单元等信息。

  * `city`

    string

    地址中的城市。

  * `company`

    string

    客户所在的公司名称。

  * `country`

    string

    地址中的国家或地区。

  * `country_code`

    string

    地址中国家或地区的二位码，遵循 [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html)  国际标准。

  * `customer_id`

    string

    客户的唯一标识符 ID。

  * `default`

    boolean

    该地址是否被设置为默认地址。
    
    * `true`：默认地址
    * `false`：非默认地址

  * `first_name`

    string

    客户名。

  * `id`

    string

    地址的唯一标识符 ID。

  * `last_name`

    string

    客户姓。

  * `phone`

    string

    客户的手机号码。

  * `province`

    string

    地址中的省或州。

  * `province_code`

    string

    省份或州的编码。值为自定义编号或 [ISO 3166-2](https://www.iso.org/glossary-for-iso-3166.html) 国际编码中连字符（-）后的部分。例如，`US-RI` 中的 `RI` 或 `GB-ENG` 中的 `ENG`。

  * `zip`

    string

    地址的邮编信息。

* `asid`

  string

  客户通过 Facebook 授权登录后生成的应用级用户唯一 ID。

* `attributes`

  array<object>

  在注册时收集的客户的附加信息，属性以键值对的形式存储。

  * `key`

    string

    属性的键或名称。

  * `value`

    string

    属性的值。

* `birthday`

  string

  客户出生日期。格式：`yyyyMMdd`。

* `created_at`

  string

  客户创建的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

* `currency`

  string

  客户下单币种。该字段值为三位币种码，遵循 [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) 标准。

* `default_address`

  object

  默认地址。

  * `address1`

    string

    客户地址第一行，通常是街道地址或邮政信箱编号等信息。

  * `address2`

    string

    客户地址的第二行，通常是公寓、套房或单元等信息。

  * `city`

    string

    地址中的城市。

  * `company`

    string

    客户所在的公司名称。

  * `country`

    string

    地址中的国家或地区。

  * `country_code`

    string

    地址中国家或地区的二位码，遵循 [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html)  国际标准。

  * `customer_id`

    string

    客户的唯一标识符 ID。

  * `default`

    boolean

    该地址是否被设置为默认地址。
    
    * `true`：默认地址
    * `false`：非默认地址

  * `first_name`

    string

    客户名。

  * `id`

    string

    地址的唯一标识符 ID。

  * `last_name`

    string

    客户姓。
    

  * `phone`

    string

    客户的手机号码。

  * `province`

    string

    地址中的省或州。

  * `province_code`

    string

    省份或州的编码。值为自定义编号或 [ISO 3166-2](https://www.iso.org/glossary-for-iso-3166.html) 国际编码中连字符（-）后的部分。例如，`US-RI` 中的 `RI` 或 `GB-ENG` 中的 `ENG`。

  * `zip`

    string

    地址的邮编信息。

* `email`

  string

  客户邮箱。

* `email_marketing_consent`

  object

  邮件营销订阅信息。

  * `consent_collected_from`

    string

    订阅信息来源。

  * `consent_updated_at`

    string

    订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。 

  * `opt_in_level`

    integer

    订阅方式。有效枚举值包含：
    
    * `0`：未知
    * `1`：直接订阅
    * `2`：二次确认订阅
    
    默认值根据 SHOPLINE 商家后台中 **设置 > 客户账户 > 营销内容订阅** 下是否勾选 **默认勾选订阅选项** 而不同：
    * 勾选：默认值为 `2`。
    * 未勾选：默认值为 `1`。 

  * `state`

    integer

    邮件订阅状态。有效枚举值包含：
    
    * `0`：取消订阅
    * `1`：已订阅
    * `2`：未订阅

* `email_subscribe_flag`

  integer

  邮件营销最终的订阅状态。值需根据 `email_marketing_consent` 相关入参信息确定。有效枚举值包含：
  * `0`：取消订阅
  * `1`：已订阅
  * `2`：未订阅
  

* `first_name`

  string

  客户名。

* `gender`

  string

  客户性别。有效枚举值包含：
  
  * `0`：未设置
  * `1`：男
  * `2`：女
  * `3`：保密
  

* `id`

  string

  客户的唯一标识符 ID。

* `language`

  string

  客户所用语言。

* `last_name`

  string

  客户姓。

* `last_order_id`

  string

  最近一笔订单号。
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::

* `mobile_subscribe_flag`

  integer

  短信营销最终的订阅状态。值需根据 `sms_marketing_consent`  相关入参信息确定。有效枚举值包含：
  
  * `0`：取消订阅
  * `1`：已订阅
  * `2`：未订阅

* `multipass_identifier`

  string

  用于 [Multipass ](https://developer.shopline.com/zh-hans-cn/docs/apps/multipass.md?_highlight=multip) 登录的客户的唯一标识符。

* `nick_name`

  string

  客户的昵称。

* `note`

  string

  商家对客户的备注。

* `orders_count`

  long

  订单数量。
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::

* `phone`

  string

  客户的手机号码。

* `sms_marketing_consent`

  object

  短信营销订阅信息。

  * `consent_collected_from`

    string

    订阅信息来源。

  * `consent_updated_at`

    string

    订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。 

  * `opt_in_level`

    integer

    订阅方式。有效枚举值包含：
    
    * `0`：未知
    * `1`：直接订阅
    * `2`：二次确认订阅

  * `state`

    integer

    短信订阅状态。有效枚举值包含：
    
    * `0`：取消订阅
    * `1`：已订阅
    * `2`：未订阅
    

* `social_customer`

  string

  客户在社媒的唯一标识 ID。
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::

* `state`

  string

  客户状态。有效枚举值包含：
  
  * `0`：已禁用账户
  * `1`：待邀请账户
  * `2`：已邀请账户
  * `3`：已注册账户

* `tags`

  string

  为客户添加的标签，多个标签之间使用英文逗号分隔。

* `total_spent`

  string

  总花费金额。
  :::danger{title="废弃"}
  该字段自 API 版本 v20250601 起已废弃。
  :::

* `updated_at`

  string

  客户更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。

* `verified_email`

  boolean

  邮箱是否已验证。
  * `true`：已验证
  * `false`：未验证

## Response

### Status Codes

* `200`

  收到 SHOPLINE 发送的 Webhook 通知后，你需要按照如下 SHOPLINE 要求的格式进行响应。
  
  ``` HTTP/1.1 200 OK ``` 
  
  关于如何订阅 Webhooks 及更多 Webhook 响应规则说明，请参考 [Webhook 概述](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/webhooks/overview.md)。

### Response Body

#### 200

_No response body_

## OpenAPI Definition

```json
{
  "tags": [
    "客户创建"
  ],
  "description": "当客户被创建时触发。",
  "externalDocs": {
    "description": "| 事件分组 | 事件标识 |\n| :------: | :------: |\n|customers        |customers/create        |\n",
    "url": "",
    "errorTableDescription": ""
  },
  "operationId": "ew7v8rGE",
  "parameters": [
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "X-Shopline-Topic",
      "in": "header",
      "description": "事件的唯一标识。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-Topic",
        "description": "事件的唯一标识。",
        "type": "string",
        "example": "orders/edited"
      },
      "example": "orders/edited"
    },
    {
      "name": "X-Shopline-Hmac-Sha256",
      "in": "header",
      "description": "该请求的签名。收到请求后，你需要对该签名进行 [验签](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/generate-and-verify-signatures.md#post-请求操作步骤) 以验证数据的真实性和完整性。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-Hmac-Sha256",
        "description": "该请求的签名。收到请求后，你需要对该签名进行 [验签](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/generate-and-verify-signatures.md#post-请求操作步骤) 以验证数据的真实性和完整性。",
        "type": "string",
        "example": "XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM="
      },
      "example": "XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM="
    },
    {
      "name": "X-Shopline-Shop-Domain",
      "in": "header",
      "description": "店铺的域名。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-Shop-Domain",
        "description": "店铺的域名。",
        "type": "string",
        "example": "example.myshopline.com"
      },
      "example": "example.myshopline.com"
    },
    {
      "name": "X-Shopline-Shop-Id",
      "in": "header",
      "description": "店铺 ID。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-Shop-Id",
        "description": "店铺 ID。",
        "type": "string",
        "example": "1610418123456"
      },
      "example": "1610418123456"
    },
    {
      "name": "X-Shopline-Merchant-Id",
      "in": "header",
      "description": "商家 ID。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-Merchant-Id",
        "description": "商家 ID。",
        "type": "string",
        "example": "2000001234"
      },
      "example": "2000001234"
    },
    {
      "name": "X-Shopline-API-Version",
      "in": "header",
      "description": "API 版本号。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-API-Version",
        "description": "API 版本号。",
        "type": "string",
        "example": "v20250601"
      },
      "example": "v20250601"
    },
    {
      "name": "X-Shopline-Webhook-Id",
      "in": "header",
      "description": "该 Webhook 事件的 ID。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "X-Shopline-Webhook-Id",
        "description": "该 Webhook 事件的 ID。",
        "type": "string",
        "example": "b54557e48a5fbf7d70bcd043"
      },
      "example": "b54557e48a5fbf7d70bcd043"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "name": "body",
          "type": "object",
          "properties": {
            "accepts_marketing": {
              "name": "accepts_marketing",
              "description": "客户是否接受通过邮件订阅营销信息。\n* `true`：接受\n* `false`：不接受   \n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::\n\n  \n\n\n\n\n\n",
              "type": "boolean"
            },
            "accepts_marketing_updated_at": {
              "name": "accepts_marketing_updated_at",
              "description": "客户邮件营销订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::\n",
              "type": "string",
              "example": "2022-12-16T11:06:11+08:00"
            },
            "accepts_mobile_marketing": {
              "name": "accepts_mobile_marketing",
              "description": "客户是否接受通过短信订阅营销信息。 \n* `true`：接受\n* `false`：不接受  \n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::",
              "type": "boolean"
            },
            "accepts_mobile_marketing_updated_at": {
              "name": "accepts_mobile_marketing_updated_at",
              "description": "客户短信营销订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。\n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::",
              "type": "string",
              "example": "2022-12-16T11:06:11+08:00"
            },
            "addresses": {
              "name": "addresses",
              "description": "客户地址列表。",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "address1": {
                    "name": "address1",
                    "description": "客户地址第一行，通常是街道地址或邮政信箱编号等信息。",
                    "type": "string",
                    "example": "7720 Cherokee Road"
                  },
                  "address2": {
                    "name": "address2",
                    "description": "客户地址的第二行，通常是公寓、套房或单元等信息。",
                    "type": "string",
                    "example": "Apartment 2"
                  },
                  "city": {
                    "name": "city",
                    "description": "地址中的城市。",
                    "type": "string",
                    "example": "Hagerman"
                  },
                  "company": {
                    "name": "company",
                    "description": "客户所在的公司名称。",
                    "type": "string"
                  },
                  "country": {
                    "name": "country",
                    "description": "地址中的国家或地区。",
                    "type": "string",
                    "example": "United States"
                  },
                  "country_code": {
                    "name": "country_code",
                    "description": "地址中国家或地区的二位码，遵循 [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html)  国际标准。",
                    "type": "string",
                    "example": "US"
                  },
                  "customer_id": {
                    "name": "customer_id",
                    "description": "客户的唯一标识符 ID。",
                    "type": "string",
                    "example": "2007347234"
                  },
                  "default": {
                    "name": "default",
                    "description": "该地址是否被设置为默认地址。\n\n* `true`：默认地址\n* `false`：非默认地址",
                    "type": "boolean"
                  },
                  "first_name": {
                    "name": "first_name",
                    "description": "客户名。",
                    "type": "string",
                    "example": "Bob"
                  },
                  "id": {
                    "name": "id",
                    "description": "地址的唯一标识符 ID。",
                    "type": "string",
                    "example": "SL201UA4840334721187149827"
                  },
                  "last_name": {
                    "name": "last_name",
                    "description": "客户姓。",
                    "type": "string",
                    "example": "James"
                  },
                  "phone": {
                    "name": "phone",
                    "description": "客户的手机号码。",
                    "type": "string",
                    "example": "008613987985473"
                  },
                  "province": {
                    "name": "province",
                    "description": "地址中的省或州。",
                    "type": "string",
                    "example": "Kentucky"
                  },
                  "province_code": {
                    "name": "province_code",
                    "description": "省份或州的编码。值为自定义编号或 [ISO 3166-2](https://www.iso.org/glossary-for-iso-3166.html) 国际编码中连字符（-）后的部分。例如，`US-RI` 中的 `RI` 或 `GB-ENG` 中的 `ENG`。",
                    "type": "string"
                  },
                  "zip": {
                    "name": "zip",
                    "description": "地址的邮编信息。",
                    "type": "string",
                    "example": "40202"
                  }
                },
                "example": {
                  "address1": "7720 Cherokee Road",
                  "address2": "Apartment 2",
                  "city": "Hagerman",
                  "company": null,
                  "country": "United States",
                  "country_code": "US",
                  "customer_id": "2007347234",
                  "default": null,
                  "first_name": "Bob",
                  "id": "SL201UA4840334721187149827",
                  "last_name": "James",
                  "phone": "008613987985473",
                  "province": "Kentucky",
                  "province_code": null,
                  "zip": "40202"
                }
              }
            },
            "asid": {
              "name": "asid",
              "description": "客户通过 Facebook 授权登录后生成的应用级用户唯一 ID。",
              "type": "string"
            },
            "attributes": {
              "name": "attributes",
              "description": "在注册时收集的客户的附加信息，属性以键值对的形式存储。",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "name": "key",
                    "description": "属性的键或名称。",
                    "type": "string",
                    "example": "plugin.membership.invite_code"
                  },
                  "value": {
                    "name": "value",
                    "description": "属性的值。",
                    "type": "string",
                    "example": "WELCOME"
                  }
                },
                "example": {
                  "key": "plugin.membership.invite_code",
                  "value": "WELCOME"
                }
              }
            },
            "birthday": {
              "name": "birthday",
              "description": "客户出生日期。格式：`yyyyMMdd`。",
              "type": "string",
              "example": "20210831"
            },
            "created_at": {
              "name": "created_at",
              "description": "客户创建的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
              "type": "string",
              "example": "2022-12-16T11:06:11+08:00"
            },
            "currency": {
              "name": "currency",
              "description": "客户下单币种。该字段值为三位币种码，遵循 [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) 标准。",
              "type": "string",
              "example": "USD"
            },
            "default_address": {
              "name": "default_address",
              "description": "默认地址。",
              "type": "object",
              "properties": {
                "address1": {
                  "name": "address1",
                  "description": "客户地址第一行，通常是街道地址或邮政信箱编号等信息。",
                  "type": "string",
                  "example": "7720 Cherokee Road"
                },
                "address2": {
                  "name": "address2",
                  "description": "客户地址的第二行，通常是公寓、套房或单元等信息。",
                  "type": "string",
                  "example": "Apartment 2"
                },
                "city": {
                  "name": "city",
                  "description": "地址中的城市。",
                  "type": "string",
                  "example": "Hagerman"
                },
                "company": {
                  "name": "company",
                  "description": "客户所在的公司名称。",
                  "type": "string",
                  "example": "Joy"
                },
                "country": {
                  "name": "country",
                  "description": "地址中的国家或地区。",
                  "type": "string",
                  "example": "United States"
                },
                "country_code": {
                  "name": "country_code",
                  "description": "地址中国家或地区的二位码，遵循 [ISO 3166-1 (alpha 2)](https://www.iso.org/glossary-for-iso-3166.html)  国际标准。",
                  "type": "string",
                  "example": "US"
                },
                "customer_id": {
                  "name": "customer_id",
                  "description": "客户的唯一标识符 ID。",
                  "type": "string",
                  "example": "2007347234"
                },
                "default": {
                  "name": "default",
                  "description": "该地址是否被设置为默认地址。\n\n* `true`：默认地址\n* `false`：非默认地址",
                  "type": "boolean"
                },
                "first_name": {
                  "name": "first_name",
                  "description": "客户名。",
                  "type": "string",
                  "example": "Bob"
                },
                "id": {
                  "name": "id",
                  "description": "地址的唯一标识符 ID。",
                  "type": "string",
                  "example": "SL201UA4840334721187149827"
                },
                "last_name": {
                  "name": "last_name",
                  "description": "客户姓。\n",
                  "type": "string",
                  "example": "James"
                },
                "phone": {
                  "name": "phone",
                  "description": "客户的手机号码。",
                  "type": "string",
                  "example": "008613977865436"
                },
                "province": {
                  "name": "province",
                  "description": "地址中的省或州。",
                  "type": "string",
                  "example": "Kentucky"
                },
                "province_code": {
                  "name": "province_code",
                  "description": "省份或州的编码。值为自定义编号或 [ISO 3166-2](https://www.iso.org/glossary-for-iso-3166.html) 国际编码中连字符（-）后的部分。例如，`US-RI` 中的 `RI` 或 `GB-ENG` 中的 `ENG`。",
                  "type": "string"
                },
                "zip": {
                  "name": "zip",
                  "description": "地址的邮编信息。",
                  "type": "string",
                  "example": "40202"
                }
              },
              "example": {
                "address1": "7720 Cherokee Road",
                "address2": "Apartment 2",
                "city": "Hagerman",
                "company": "Joy",
                "country": "United States",
                "country_code": "US",
                "customer_id": "2007347234",
                "default": null,
                "first_name": "Bob",
                "id": "SL201UA4840334721187149827",
                "last_name": "James",
                "phone": "008613977865436",
                "province": "Kentucky",
                "province_code": null,
                "zip": "40202"
              }
            },
            "email": {
              "name": "email",
              "description": "客户邮箱。",
              "type": "string",
              "example": "steve@example.com"
            },
            "email_marketing_consent": {
              "name": "email_marketing_consent",
              "description": "邮件营销订阅信息。",
              "type": "object",
              "properties": {
                "consent_collected_from": {
                  "name": "consent_collected_from",
                  "description": "订阅信息来源。",
                  "type": "string",
                  "example": "extInfo"
                },
                "consent_updated_at": {
                  "name": "consent_updated_at",
                  "description": "订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。 ",
                  "type": "string",
                  "example": "2021-08-31T02:20:26+08:00"
                },
                "opt_in_level": {
                  "name": "opt_in_level",
                  "description": "订阅方式。有效枚举值包含：\n\n* `0`：未知\n* `1`：直接订阅\n* `2`：二次确认订阅\n\n默认值根据 SHOPLINE 商家后台中 **设置 > 客户账户 > 营销内容订阅** 下是否勾选 **默认勾选订阅选项** 而不同：\n* 勾选：默认值为 `2`。\n* 未勾选：默认值为 `1`。 ",
                  "type": "integer"
                },
                "state": {
                  "name": "state",
                  "description": "邮件订阅状态。有效枚举值包含：\n\n* `0`：取消订阅\n* `1`：已订阅\n* `2`：未订阅",
                  "type": "integer"
                }
              },
              "example": {
                "consent_collected_from": "extInfo",
                "consent_updated_at": "2021-08-31T02:20:26+08:00",
                "opt_in_level": null,
                "state": null
              }
            },
            "email_subscribe_flag": {
              "name": "email_subscribe_flag",
              "description": "邮件营销最终的订阅状态。值需根据 `email_marketing_consent` 相关入参信息确定。有效枚举值包含：\n* `0`：取消订阅\n* `1`：已订阅\n* `2`：未订阅\n",
              "type": "integer"
            },
            "first_name": {
              "name": "first_name",
              "description": "客户名。",
              "type": "string",
              "example": "Bob"
            },
            "gender": {
              "name": "gender",
              "description": "客户性别。有效枚举值包含：\n\n* `0`：未设置\n* `1`：男\n* `2`：女\n* `3`：保密\n",
              "type": "string"
            },
            "id": {
              "name": "id",
              "description": "客户的唯一标识符 ID。",
              "type": "string",
              "example": "2007347234"
            },
            "language": {
              "name": "language",
              "description": "客户所用语言。",
              "type": "string",
              "example": "en"
            },
            "last_name": {
              "name": "last_name",
              "description": "客户姓。",
              "type": "string",
              "example": "James"
            },
            "last_order_id": {
              "name": "last_order_id",
              "description": "最近一笔订单号。\n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::",
              "type": "string",
              "example": "200066283289389"
            },
            "mobile_subscribe_flag": {
              "name": "mobile_subscribe_flag",
              "description": "短信营销最终的订阅状态。值需根据 `sms_marketing_consent`  相关入参信息确定。有效枚举值包含：\n\n* `0`：取消订阅\n* `1`：已订阅\n* `2`：未订阅",
              "type": "integer"
            },
            "multipass_identifier": {
              "name": "multipass_identifier",
              "description": "用于 [Multipass ](https://developer.shopline.com/zh-hans-cn/docs/apps/multipass.md?_highlight=multip) 登录的客户的唯一标识符。",
              "type": "string",
              "example": "extInfo"
            },
            "nick_name": {
              "name": "nick_name",
              "description": "客户的昵称。",
              "type": "string",
              "example": "Bob James"
            },
            "note": {
              "name": "note",
              "description": "商家对客户的备注。",
              "type": "string"
            },
            "orders_count": {
              "name": "orders_count",
              "description": "订单数量。\n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::",
              "type": "long"
            },
            "phone": {
              "name": "phone",
              "description": "客户的手机号码。",
              "type": "string",
              "example": "008613987675435"
            },
            "sms_marketing_consent": {
              "name": "sms_marketing_consent",
              "description": "短信营销订阅信息。",
              "type": "object",
              "properties": {
                "consent_collected_from": {
                  "name": "consent_collected_from",
                  "description": "订阅信息来源。",
                  "type": "string",
                  "example": "extInfo"
                },
                "consent_updated_at": {
                  "name": "consent_updated_at",
                  "description": "订阅状态更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。 ",
                  "type": "string",
                  "example": "2022-12-16T11:06:11+08:00"
                },
                "opt_in_level": {
                  "name": "opt_in_level",
                  "description": "订阅方式。有效枚举值包含：\n\n* `0`：未知\n* `1`：直接订阅\n* `2`：二次确认订阅",
                  "type": "integer"
                },
                "state": {
                  "name": "state",
                  "description": "短信订阅状态。有效枚举值包含：\n\n* `0`：取消订阅\n* `1`：已订阅\n* `2`：未订阅\n",
                  "type": "integer"
                }
              },
              "example": {
                "consent_collected_from": "extInfo",
                "consent_updated_at": "2022-12-16T11:06:11+08:00",
                "opt_in_level": null,
                "state": null
              }
            },
            "social_customer": {
              "name": "social_customer",
              "description": "客户在社媒的唯一标识 ID。\n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::",
              "type": "string",
              "example": "7566553464365"
            },
            "state": {
              "name": "state",
              "description": "客户状态。有效枚举值包含：\n\n* `0`：已禁用账户\n* `1`：待邀请账户\n* `2`：已邀请账户\n* `3`：已注册账户",
              "type": "string"
            },
            "tags": {
              "name": "tags",
              "description": "为客户添加的标签，多个标签之间使用英文逗号分隔。",
              "type": "string"
            },
            "total_spent": {
              "name": "total_spent",
              "description": "总花费金额。\n:::danger{title=\"废弃\"}\n该字段自 API 版本 v20250601 起已废弃。\n:::",
              "type": "string"
            },
            "updated_at": {
              "name": "updated_at",
              "description": "客户更新的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。",
              "type": "string",
              "example": "2022-09-07T10:53:31+08:00"
            },
            "verified_email": {
              "name": "verified_email",
              "description": "邮箱是否已验证。\n* `true`：已验证\n* `false`：未验证",
              "type": "boolean"
            }
          },
          "example": {
            "accepts_marketing": null,
            "accepts_marketing_updated_at": "2022-12-16T11:06:11+08:00",
            "accepts_mobile_marketing": null,
            "accepts_mobile_marketing_updated_at": "2022-12-16T11:06:11+08:00",
            "addresses": null,
            "asid": null,
            "attributes": null,
            "birthday": "20210831",
            "created_at": "2022-12-16T11:06:11+08:00",
            "currency": "USD",
            "default_address": {
              "address1": "7720 Cherokee Road",
              "address2": "Apartment 2",
              "city": "Hagerman",
              "company": "Joy",
              "country": "United States",
              "country_code": "US",
              "customer_id": "2007347234",
              "default": null,
              "first_name": "Bob",
              "id": "SL201UA4840334721187149827",
              "last_name": "James",
              "phone": "008613977865436",
              "province": "Kentucky",
              "province_code": null,
              "zip": "40202"
            },
            "email": "steve@example.com",
            "email_marketing_consent": {
              "consent_collected_from": "extInfo",
              "consent_updated_at": "2021-08-31T02:20:26+08:00",
              "opt_in_level": null,
              "state": null
            },
            "email_subscribe_flag": null,
            "first_name": "Bob",
            "gender": null,
            "id": "2007347234",
            "language": "en",
            "last_name": "James",
            "last_order_id": "200066283289389",
            "mobile_subscribe_flag": null,
            "multipass_identifier": "extInfo",
            "nick_name": "Bob James",
            "note": null,
            "orders_count": null,
            "phone": "008613987675435",
            "sms_marketing_consent": {
              "consent_collected_from": "extInfo",
              "consent_updated_at": "2022-12-16T11:06:11+08:00",
              "opt_in_level": null,
              "state": null
            },
            "social_customer": "7566553464365",
            "state": null,
            "tags": null,
            "total_spent": null,
            "updated_at": "2022-09-07T10:53:31+08:00",
            "verified_email": null
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "收到 SHOPLINE 发送的 Webhook 通知后，你需要按照如下 SHOPLINE 要求的格式进行响应。\n\n``` HTTP/1.1 200 OK ``` \n\n关于如何订阅 Webhooks 及更多 Webhook 响应规则说明，请参考 [Webhook 概述](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/webhooks/overview.md)。"
    }
  },
  "method": "post",
  "info": {
    "title": "客户创建",
    "version": "v20270301"
  }
}
```