**版本：202601**

# 创建地址

**POST** `/openapi/2026-01/customers/:customer_id/addresses`

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

## 请求

**Path参数**

- `customer_id` string (required)

  顾客 ID

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `address` object (required)

  地址

  - `country` string (required)

    地址所在国家名称，至少 1 个字符，如 "China"
  - `country_code` string (required)

    ISO 国家代码，至少 1 个字符，如中国为 "CN"
  - `first_name` string

    收件人的名
  - `last_name` string

    收件人的姓
  - `address1` string

    地址，如门牌号和街道名称，用于指定地址的主要位置
  - `address2` string

    附加地址，如公寓号或套房号，用于提供更具体的地址信息
  - `area` string

    地址所在区域或地区
  - `city` string

    地址所在城市，指定城市或乡镇的名称
  - `province` string

    地址所在省份或州，指定国家内的行政区划或地区
  - `province_code` string

    地址所在省份代码，指定省份或州的简称或标准化代码
  - `company` string

    与地址关联的公司名称
  - `phone` string

    收件人的电话号码
  - `phone_area_code` string

    电话号码区号，用于标识特定地理区域的电话代码
  - `zip` string

    地址的邮政编码，用于标识特定地理区域的邮件投递代码
  - `gender` string

    人员性别，可选字段。可接受值为 "male" 和 "female"
  - `email` string

    收件人的电子邮件地址，用于指定收件人的邮箱
  - `default` boolean

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

```json
{
  "address": {
    "country": "string",
    "country_code": "string",
    "first_name": "string",
    "last_name": "string",
    "address1": "string",
    "address2": "string",
    "area": "string",
    "city": "string",
    "province": "string",
    "province_code": "string",
    "company": "string",
    "phone": "string",
    "phone_area_code": "string",
    "zip": "string",
    "gender": "string",
    "email": "string",
    "default": true
  }
}
```

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `address` object

    地址

    - `id` string

      地址的唯一标识
    - `customer_id` string

      顾客 ID
    - `first_name` string

      收件人的名
    - `last_name` string

      收件人的姓
    - `company` string

      公司名称
    - `city` string

      地址所在城市
    - `province` string

      地址所在省份或州
    - `country` string

      地址所在国家名称
    - `zip` string

      邮政编码
    - `province_code` string

      省份代码
    - `country_code` string

      ISO 国家代码
    - `gender` string

      收件人的性别
    - `phone` string

      与地址关联的电话号码
    - `phone_area_code` string

      电话号码的区号
    - `area` string

      地址所在区域或地区
    - `email` string

      与地址关联的电子邮件
    - `name` string

      收件人的全名
    - `address1` string

      地址1
    - `address2` string

      地址2
    - `country_name` string

      国家全称
    - `default` boolean

      是否为默认地址

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "address": {
      "id": "string",
      "customer_id": "string",
      "first_name": "string",
      "last_name": "string",
      "company": "string",
      "city": "string",
      "province": "string",
      "country": "string",
      "zip": "string",
      "province_code": "string",
      "country_code": "string",
      "gender": "string",
      "phone": "string",
      "phone_area_code": "string",
      "area": "string",
      "email": "string",
      "name": "string",
      "address1": "string",
      "address2": "string",
      "country_name": "string",
      "default": true
    }
  }
}
```
