Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Update an Address
Updates the specified address for the current user.
curl --request PATCH \
--url https://demo.spreecommerce.org/api/v2/storefront/account/addresses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"address": {
"firstname": "Stephen",
"lastname": "Smith",
"company": "Woodbank School",
"address1": "234 Old Georgetown Road",
"address2": "1st Floor",
"city": "Aethesda",
"phone": "34885493845002",
"zipcode": "90211",
"state_name": "CA",
"country_iso": "US",
"label": "Office"
}
}'
{
"data": {
"id": "29",
"type": "address",
"attributes": {
"firstname": "Mark",
"lastname": "Winterburn",
"address1": "775645 Old Georgetown Road",
"address2": "3rd Floor",
"city": "Qethesda",
"zipcode": "90210",
"phone": "3488545445002",
"state_name": "California",
"company": "Paper Street Soap Co.",
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": "Work",
"state_code": "CA"
}
}
}
Authorizations
User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Path Parameters
The ID of the specified address
.
Query Parameters
Specify the fields you would like returned in the response body. More information.
Body
Street address
City, town
Country ISO (2-chars) or ISO3 (3-chars) code. List of all codes
Additional address information, floor no etc
Valid zipcode, will be validated against the selected Country
State/region/province 2 letter abbreviation
Company name
The internal name for this address (Work, Home)
Response
The Address model holds the customer details, such as name, address, and phone number.
State abbreviation
Country ISO3 code
Company name
The internal name for this address (Work, Home)
Was this page helpful?
curl --request PATCH \
--url https://demo.spreecommerce.org/api/v2/storefront/account/addresses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '{
"address": {
"firstname": "Stephen",
"lastname": "Smith",
"company": "Woodbank School",
"address1": "234 Old Georgetown Road",
"address2": "1st Floor",
"city": "Aethesda",
"phone": "34885493845002",
"zipcode": "90211",
"state_name": "CA",
"country_iso": "US",
"label": "Office"
}
}'
{
"data": {
"id": "29",
"type": "address",
"attributes": {
"firstname": "Mark",
"lastname": "Winterburn",
"address1": "775645 Old Georgetown Road",
"address2": "3rd Floor",
"city": "Qethesda",
"zipcode": "90210",
"phone": "3488545445002",
"state_name": "California",
"company": "Paper Street Soap Co.",
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": "Work",
"state_code": "CA"
}
}
}