Set the checkout address of a cart
const url = 'https://acme.mykreezalid.com/front_api/v1/carts/k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7/checkout-addresses/4242';const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
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/carts/k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7/checkout-addresses/4242 \ --header 'Authorization: Bearer <token>'Uses one of the signed-in member’s checkout addresses as both the billing and the shipping address of the cart and of every order in it. PATCH on the same path does the same. Requires a token. When you send a token and the cart is a guest cart, the cart (and the guest’s other carts and orders) is attached to the signed-in member first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The cart’s url_key, returned when the cart is created.
Example
k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7Id of one of the signed-in member’s checkout addresses.
Example
4242Responses
Section titled “Responses”The address was set.
object
Example
{ "status": "success", "message": "checkout address updated"}No token or an invalid one, no cart has this key, the address is not one of the member’s, or the cart or one of its orders could not be updated.
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"}The method is neither PUT nor PATCH.