跳到主要内容
版本:202506

创建地址

POST 

/openapi/2025-06/customers/:customer_id/addresses

使用提供的详情创建新地址。

请求

Path参数

    customer_id string必填

    顾客 ID

请求体必填

    address object必填

    地址

    countrystring必填

    地址所在国家名称,至少 1 个字符,如 "China"

    country_codestring必填

    ISO 国家代码,至少 1 个字符,如中国为 "CN"

    first_namestring

    收件人的名

    last_namestring

    收件人的姓

    address1string

    地址,如门牌号和街道名称,用于指定地址的主要位置

    address2string

    附加地址,如公寓号或套房号,用于提供更具体的地址信息

    areastring

    地址所在区域或地区

    citystring

    地址所在城市,指定城市或乡镇的名称

    provincestring

    地址所在省份或州,指定国家内的行政区划或地区

    province_codestring

    地址所在省份代码,指定省份或州的简称或标准化代码

    companystring

    与地址关联的公司名称

    phonestring

    收件人的电话号码

    phone_area_codestring

    电话号码区号,用于标识特定地理区域的电话代码

    zipstring

    地址的邮政编码,用于标识特定地理区域的邮件投递代码

    genderstring

    人员性别,可选字段。可接受值为 "male" 和 "female"

    emailstring

    收件人的电子邮件地址,用于指定收件人的邮箱

    defaultboolean

    是否为默认地址。若为用户创建的第一个地址则为 "true",否则为 "false"

响应

OK

数据结构
    codestring

    错误码

    messagestring

    错误信息

    data object
    address object

    地址

    idstring

    地址的唯一标识

    customer_idstring

    顾客 ID

    first_namestring

    收件人的名

    last_namestring

    收件人的姓

    companystring

    公司名称

    citystring

    地址所在城市

    provincestring

    地址所在省份或州

    countrystring

    地址所在国家名称

    zipstring

    邮政编码

    province_codestring

    省份代码

    country_codestring

    ISO 国家代码

    genderstring

    收件人的性别

    phonestring

    与地址关联的电话号码

    phone_area_codestring

    电话号码的区号

    areastring

    地址所在区域或地区

    emailstring

    与地址关联的电子邮件

    namestring

    收件人的全名

    address1string

    地址1

    address2string

    地址2

    country_namestring

    国家全称

    defaultboolean

    是否为默认地址