Update an address
const url = 'https://acme.mykreezalid.com/front_api/v1/account/checkout-addresses/4242';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"description":"Home","gender":"example","first_name":"Jane","last_name":"Doe","business_name":"example","address_line1":"12 rue de la Paix","address_line2":"example","address_zipcode":"75002","address_city":"Paris","address_state":"example","address_country":"FR","mobile":"+33612345678","phone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://acme.mykreezalid.com/front_api/v1/account/checkout-addresses/4242 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "description": "Home", "gender": "example", "first_name": "Jane", "last_name": "Doe", "business_name": "example", "address_line1": "12 rue de la Paix", "address_line2": "example", "address_zipcode": "75002", "address_city": "Paris", "address_state": "example", "address_country": "FR", "mobile": "+33612345678", "phone": "example" }'Updates the fields you send on one of the signed-in member’s addresses; fields you leave out keep their value. An empty value for description, gender, first_name, last_name, address_line1, address_zipcode, address_city, address_country or mobile also keeps the current value, whereas an empty business_name, address_line2, address_state or phone clears it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
4242Identifier of one of the signed-in member’s addresses.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Label of the address.
Example
HomeExample
JaneExample
DoeExample
12 rue de la PaixExample
75002Example
ParisCountry code.
Example
FRExample
+33612345678Responses
Section titled “Responses”The address is updated.
object
An address saved in the signed-in member’s address book, to reuse at checkout.
object
A saved address of the signed-in member.
Unique identifier of the address.
Label the member gives to the address.
Country code.
Example
{ "status": "success", "message": "address updated", "data": { "object": "CheckoutAddress", "id": 4242, "description": "Home", "first_name": "Jane", "last_name": "Doe", "address_line1": "12 rue de la Paix", "address_zipcode": "75002", "address_city": "Paris", "address_country": "FR", "mobile": "+33612345678" }}No valid access token was sent, the address does not exist or belongs to another member (no address with this id), or it could not be saved (can not save the entity).
Error body returned by the Front API when it refuses a request.
object
HTTP status code, repeated in the body.
Human-readable reason.
Example
{ "code": 403, "status": "error", "message": "Token not found in request"}