跳到主要内容
版本:202201

创建顾客

POST 

/openapi/2022-01/customers

使用提供的详情创建新顾客。

请求

请求体

    customer object
    contact_typestring必填

    Should be phone or email. If it's phone, the phone parameter is required, otherwise, the email parameter is required

    emailstring

    Email, it's required when contact_type is email, for example: [email protected]

    phonestring

    Phone number with area code, it's required when contact_type is phone, for example: +15052814445

    first_namestring

    First Name, for example: Peter

    last_namestring

    Last name, for example: Max

    accepts_marketingboolean

    Whether to subscribe marketing email campaign

    默认值: true
    accepts_sms_marketingboolean

    Whether to subscribe marketing sms campaign.

    默认值: true
    passwordstring

    Password, for example: 123456

    password_confirmationstring

    Password confirmation, for example: 123456

    tagsstring

    Tags, for example: New Customer,Repeat Customer

    registered_atstring必填

    Customer registration time. If this field is empty, you cannot login. The time format is ISO8601, for example: 2024-03-11T03:32:00Z

    addresses object[]
  • Array [
  • first_namestring必填

    First name of consignee.

    last_namestring必填

    Last name of consignee.

    emailstring
    address1string

    Street address, for example: 1 Rue des Carrieres

    address2string

    Apartment/floor/room number, for example: Suite 1234

    areastring

    Area, for example: Bay area

    citystring

    City, for example: SAN JOSE

    provincestring

    Province, for example: New Mexico

    province_codestring

    Province Code, for example: NM

    countrystring必填

    Country, for example: United States

    country_codestring必填

    Country code, for example: US

    companystring

    Company, for example: ABC Limited

    phonestring

    Phone number, for example: 5052814445

    phone_area_codestring

    Area code, for example: +86

    zipstring

    ZIP code, for example: 87036

    genderstring

    Gender, for example: male or female

    defaultboolean

    Default address or not

    默认值: true
  • ]

响应

200

数据结构
    customer object
    idstring
    示例: 2dd957e3-2051-4cdf-8584-9c0046b4d1ae
    first_namestring
    示例: ryan
    last_namestring
    示例: zhang
    namestring
    示例: ryan zhang
    emailstring
    phonestring
    示例: +8615014471143
    phone_area_code
    contact_typestring
    示例: email
    accepts_marketingboolean
    默认值: true
    示例: true
    source
    free_taxboolean
    默认值: true
    示例: false
    registeredboolean
    默认值: true
    示例: false
    orders_countinteger
    默认值: 0
    示例: 0
    last_order_at
    total_spentstring
    示例: 0.00
    tagsstring
    示例: New Customer
    created_atstring
    示例: 2024-04-17T11:10:33Z
    updated_atstring
    示例: 2024-04-17T11:10:33Z
    subscribed_flaginteger
    默认值: 0
    示例: 5
    sms_subscribed_flaginteger
    默认值: 0
    示例: 5
    accepts_sms_marketingboolean
    默认值: true
    示例: true
    default_address object
    idstring
    示例: 9ffa8dc0-25b8-4424-832e-bab46fcfeb20
    customer_idstring
    示例: 2dd957e3-2051-4cdf-8584-9c0046b4d1ae
    first_namestring
    示例: test
    last_namestring
    示例: test
    companystring
    示例:
    citystring
    示例: 深圳
    provincestring
    示例:
    countrystring
    示例: Aland lslands
    zipstring
    示例: 515300
    province_codestring
    示例:
    country_codestring
    示例: AX
    genderstring
    示例:
    phonestring
    示例: +86 150 1447 1143
    phone_area_code
    areastring
    示例:
    emailstring
    namestring
    示例: test test
    address1string
    示例: 6 三聖街
    address2string
    示例: 1111
    country_namestring
    示例: Aland lslands
    defaultboolean
    默认值: true
    示例: true
    addresses object[]
  • Array [
  • idstring
    示例: 9ffa8dc0-25b8-4424-832e-bab46fcfeb20
    customer_idstring
    示例: 2dd957e3-2051-4cdf-8584-9c0046b4d1ae
    first_namestring
    示例: test
    last_namestring
    示例: test
    companystring
    示例:
    citystring
    示例: 深圳
    provincestring
    示例:
    countrystring
    示例: Aland lslands
    zipstring
    示例: 515300
    province_codestring
    示例:
    country_codestring
    示例: AX
    genderstring
    示例:
    phonestring
    示例: +86 150 1447 1143
    phone_area_code
    areastring
    示例:
    emailstring
    namestring
    示例: test test
    address1string
    示例: 6 三聖街
    address2string
    示例: 1111
    country_namestring
    示例: Aland lslands
    defaultboolean
    默认值: true
    示例: true
  • ]