Skip to content

Save Cart Addresses

Saves the billing (and optionally a separate shipping) address on the draft cart. CamelCase keys (firstName, useForShipping) are accepted and normalised to snake_case before being saved.

Endpoint

EndpointMethod
/api/admin/carts/{id}/addressesPOST

If billing.useForShipping is true, the shipping block is optional and the billing address is reused for shipping.

Required fields

Each address (billing always; shipping too when useForShipping is false) must include every one of these fields, otherwise the request is rejected with 422:

firstName, lastName, email, address (a non-empty array of street lines), city, country, state, postcode, phone. companyName is optional.

Released under the MIT License.