Skip to content

Set the checkout address of a cart

PUT
/carts/{url_key}/checkout-addresses/{checkout_address_id}
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.

url_key
required
string

The cart’s url_key, returned when the cart is created.

Example

k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7
checkout_address_id
required
integer

Id of one of the signed-in member’s checkout addresses.

Example

4242

The address was set.

Media typeapplication/json
object
status
string
message
string

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.

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}

The method is neither PUT nor PATCH.