Checkout
Save billing and shipping addresses for checkout
Saves billing and shipping addresses to the current cart. Use useForShipping: true to copy billing as shipping, or provide shipping fields for a different shipping address.
post/checkout-addresses
Request
- Base URLhttp://localhost:8000/api/shop
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
X-STOREFRONT-KEYstring required
Storefront API Key for authentication. Required for all shop/storefront API requests.
X-Localestring
Example:en
Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.
X-Channelstring
Example:default
Channel code (e.g. "default"). Defaults to the current channel.
X-Currencystring
Example:USD
Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.
Request body
Example request
{
"billingFirstName": "John",
"billingLastName": "Doe",
"billingEmail": "john@example.com",
"billingAddress": "123 Main St",
"billingCity": "Los Angeles",
"billingCountry": "US",
"billingState": "CA",
"billingPostcode": "90001",
"billingPhoneNumber": "2125551234",
"useForShipping": true,
"shippingFirstName": "Jane",
"shippingLastName": "Doe",
"shippingEmail": "jane@example.com",
"shippingAddress": "456 Oak Ave",
"shippingCity": "San Francisco",
"shippingCountry": "US",
"shippingState": "CA",
"shippingPostcode": "94102",
"shippingPhoneNumber": "4155559876"
}Response
Addresses saved successfully.
Changes
No recorded changes to this operation across all 13 revisions of this API.