Update an Customer Address
PUT/v2/customers/:customerID/addresses/:addressID
Update an Customer Address
Request
Path Parameters
The ID of the customer you want to create an address for.
The ID of the customer you want to update.
- application/json
Body
data Addressrequired
Default value: address
Specifies the the type of object. Set this value to address
.
The first name of the recipient on this address.
The last name of the recipient on this address.
The name for the address saved, such as home
, work
or wife’s office
.
A phone number for this address.
Any delivery instructions for this address.
The company name at this address.
The first portion of the address, usually the street address.
The second portion of the address, usually an apartment or unit number.
The city for this address.
The county for this address.
The state, province, territory, etc. for this address.
The ZIP Code, Postcode, or other postal reference string for this delivery address.
A two digit code for the country this address is in, expressed as per the ISO 3166-2 standard.
Responses
- 200
- 400
- 404
OK
- application/json
- Schema
- Example (from schema)
Schema
data object
Default value: address
Specifies the the type of object. Set this value to address
.
The first name of the recipient on this address.
The last name of the recipient on this address.
The name for the address saved, such as home
, work
or wife’s office
.
A phone number for this address.
Any delivery instructions for this address.
The company name at this address.
The first portion of the address, usually the street address.
The second portion of the address, usually an apartment or unit number.
The city for this address.
The county for this address.
The state, province, territory, etc. for this address.
The ZIP Code, Postcode, or other postal reference string for this delivery address.
A two digit code for the country this address is in, expressed as per the ISO 3166-2 standard.
The unique identifier for an Address.
meta object
timestamps object
The date the address is created.
The date the address is updated.
links object
A URL to the specific resource.
relationships object
customer object
The ID of the customer.
The type of object being returned.
{
"data": {
"type": "address",
"first_name": "Ron",
"last_name": "Swanson",
"name": "Home",
"phone_number": "(555) 555-1234",
"instructions": "Leave behind bin",
"company_name": "Ron Swanson Enterprises",
"line_1": "1 Sunny Street",
"line_2": "Unit 101",
"city": "Sunny Town",
"county": "Sunnyville",
"region": "acc-legal-name",
"postcode": "SU33 1YY",
"country": "GB",
"id": "5f8da740-6680-463e-b31c-190b2db4bf9d",
"meta": {
"timestamps": {
"created_at": "2021-02-23T09:40:33.882Z",
"updated_at": "2021-02-23T09:40:33.882Z"
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/customers/deb6b25f-8451-4211-9a22-95610333df23/addresses"
},
"relationships": {
"customer": {
"id": "11afcf9b-971b-4fdb-8e10-f2ecf970718e",
"type": "customer"
}
}
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
- bad-request-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
{
"errors": [
{
"status": "string",
"title": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "Validation failed: field 'Name' on the 'min' tag."
}
]
}
Not Found
- application/json
- Schema
- Example (from schema)
- not-found-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
{
"errors": [
{
"status": "string",
"title": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"status": "404",
"title": "Not Found",
"detail": "customer not found"
}
]
}