Version: 202201
Update Address
PUT/openapi/2022-01/customers/:customer_id/addresses/:address_id
Update the details of an existing address using its unique identifier.
Request
Path Parameters
customer_id stringrequired
Cusomer's ID
address_id stringrequired
Address's ID
- application/json
- Body
- Example
Body
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
}
Responses
- 200
- 404
- 422
200
- application/json
- Schema
- Example
- Result
Schema
address object
idstring
Example:
2490dc6a-d511-4e5e-bbcb-d58e913243adcustomer_idstring
Example:
2dd957e3-2051-4cdf-8584-9c0046b4d1aefirst_namestring
Example:
Ryanlast_namestring
Example:
zhangcompanystring
Example:
ABC Limitedcitystring
Example:
SAN JOSEprovincestring
Example:
New Mexicocountrystring
Example:
United Stateszipstring
Example:
87036province_codestring
Example:
NMcountry_codestring
Example:
USgenderstring
Example:
malephonestring
Example:
+8615015570043phone_area_codestring
Example:
+86areastring
Example:
Bay areaemailstring
Example:
[email protected]namestring
Example:
Ryan zhangaddress1string
Example:
1 Rue des Carrieresaddress2string
Example:
Suite 1234country_namestring
Example:
United Statesdefaultboolean
Default value:
trueExample:
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
No schema
422
- application/json
- Schema
- Example
- Result
Schema
errorsstring[]
{
"errors": [
"Gender is not included in the list"
]
}
{
"errors": [
"Gender is not included in the list",
"Email is invalid"
]
}