版本:202201
更新地址
PUT/openapi/2022-01/customers/:customer_id/addresses/:address_id
通过地址 ID 更新现有地址的详细信息。
请求
Path参数
customer_id string必填
顾客 ID。
address_id string必填
地址 ID。
- application/json
- 请求体
- 示例
请求体
first_namestring
First name of consignee.
last_namestring
Last name of consignee.
genderstring
Gender of consignee, acceptable value: female, male
emailstring
phonestring
Phone number, for example: +86 150 1447 1143
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: US-NM
countrystring
Country, for example: United States
country_codestring
Country code, for example: US
zipstring
ZIP code, for example: 87036
companystring
Company, for example: ABC Limited
defaultboolean
Default address or not
{
"first_name": "string",
"last_name": "string",
"gender": "string",
"email": "string",
"phone": "string",
"address1": "string",
"address2": "string",
"area": "string",
"city": "string",
"province": "string",
"province_code": "string",
"country": "string",
"country_code": "string",
"zip": "string",
"company": "string",
"default": true
}
响应
- 200
- 404
- 422
200
- application/json
- 数据结构
- 示例
- Result
数据结构
address object
idstring
示例:
2490dc6a-d511-4e5e-bbcb-d58e913243adcustomer_idstring
示例:
2dd957e3-2051-4cdf-8584-9c0046b4d1aefirst_namestring
示例:
Ryanlast_namestring
示例:
zhangcompanystring
示例:
ABC Limitedcitystring
示例:
SAN JOSEprovincestring
示例:
New Mexicocountrystring
示例:
United Stateszipstring
示例:
87036province_codestring
示例:
NMcountry_codestring
示例:
USgenderstring
示例:
malephonestring
示例:
+8615015570043phone_area_codestring
示例:
+86areastring
示例:
Bay areaemailstring
namestring
示例:
Ryan zhangaddress1string
示例:
1 Rue des Carrieresaddress2string
示例:
Suite 1234country_namestring
示例:
United Statesdefaultboolean
默认值:
true示例:
true{
"address": {
"id": "2490dc6a-d511-4e5e-bbcb-d58e913243ad",
"customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
"first_name": "Ryan",
"last_name": "zhang",
"company": "ABC Limited",
"city": "SAN JOSE",
"province": "New Mexico",
"country": "United States",
"zip": "87036",
"province_code": "NM",
"country_code": "US",
"gender": "male",
"phone": "+8615015570043",
"phone_area_code": "+86",
"area": "Bay area",
"name": "Ryan zhang",
"address1": "1 Rue des Carrieres",
"address2": "Suite 1234",
"country_name": "United States",
"default": true
}
}
{
"address": {
"id": "2490dc6a-d511-4e5e-bbcb-d58e913243ad",
"customer_id": "2dd957e3-2051-4cdf-8584-9c0046b4d1ae",
"first_name": "Ryan",
"last_name": "zhang",
"company": "ABC Limited",
"city": "SAN JOSE",
"province": "New Mexico",
"country": "United States",
"zip": "87036",
"province_code": "NM",
"country_code": "US",
"gender": "male",
"phone": "+8615015570043",
"phone_area_code": "+86",
"area": "Bay area",
"name": "Ryan zhang",
"address1": "1 Rue des Carrieres",
"address2": "Suite 1234",
"country_name": "United States",
"default": true
}
}
404
- application/json
无 Schema
422
- application/json
- 数据结构
- 示例
- Result
数据结构
errorsstring[]
{
"errors": [
"Gender is not included in the list"
]
}
{
"errors": [
"Gender is not included in the list",
"Email is invalid"
]
}