Authorizations
User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Query Parameters
Specify the fields you would like returned in the response body. More information.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account/addresses \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "11",
"type": "address",
"attributes": {
"firstname": "Tyler",
"lastname": "Durden",
"address1": "12312 Street",
"address2": "Basment Entrance",
"city": "LA",
"zipcode": "90210",
"phone": "08173762736",
"state_name": "California",
"company": "Paper Street Soap Co",
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": "Home",
"state_code": "CA"
}
},
{
"id": "28",
"type": "address",
"attributes": {
"firstname": "John",
"lastname": "Snow",
"address1": "7735 Old Georgetown Road",
"address2": "2nd Floor",
"city": "Bethesda",
"zipcode": "20814",
"phone": "3014445002",
"state_name": "Maryland",
"company": null,
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": null,
"state_code": "MD"
}
},
{
"id": "29",
"type": "address",
"attributes": {
"firstname": "Emma",
"lastname": "Carragher",
"address1": "775645 Old Georgetown Road",
"address2": "3rd Floor",
"city": "Qethesda",
"zipcode": "90210",
"phone": "3488545445002",
"state_name": "California",
"company": null,
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": "Work",
"state_code": "CA"
}
}
],
"meta": {
"count": 3,
"total_count": 3,
"total_pages": 1
},
"links": {
"self": "http://localhost:3000/api/v2/storefront/account/addresses",
"next": "http://localhost:3000/api/v2/storefront/account/addresses?page=1",
"prev": "http://localhost:3000/api/v2/storefront/account/addresses?page=1",
"last": "http://localhost:3000/api/v2/storefront/account/addresses?page=1",
"first": "http://localhost:3000/api/v2/storefront/account/addresses?page=1"
}
}
Returns a list of addresses for the current user.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account/addresses \
--header 'Authorization: Bearer <token>'
{
"data": [
{
"id": "11",
"type": "address",
"attributes": {
"firstname": "Tyler",
"lastname": "Durden",
"address1": "12312 Street",
"address2": "Basment Entrance",
"city": "LA",
"zipcode": "90210",
"phone": "08173762736",
"state_name": "California",
"company": "Paper Street Soap Co",
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": "Home",
"state_code": "CA"
}
},
{
"id": "28",
"type": "address",
"attributes": {
"firstname": "John",
"lastname": "Snow",
"address1": "7735 Old Georgetown Road",
"address2": "2nd Floor",
"city": "Bethesda",
"zipcode": "20814",
"phone": "3014445002",
"state_name": "Maryland",
"company": null,
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": null,
"state_code": "MD"
}
},
{
"id": "29",
"type": "address",
"attributes": {
"firstname": "Emma",
"lastname": "Carragher",
"address1": "775645 Old Georgetown Road",
"address2": "3rd Floor",
"city": "Qethesda",
"zipcode": "90210",
"phone": "3488545445002",
"state_name": "California",
"company": null,
"country_name": "United States",
"country_iso3": "USA",
"country_iso": "US",
"label": "Work",
"state_code": "CA"
}
}
],
"meta": {
"count": 3,
"total_count": 3,
"total_pages": 1
},
"links": {
"self": "http://localhost:3000/api/v2/storefront/account/addresses",
"next": "http://localhost:3000/api/v2/storefront/account/addresses?page=1",
"prev": "http://localhost:3000/api/v2/storefront/account/addresses?page=1",
"last": "http://localhost:3000/api/v2/storefront/account/addresses?page=1",
"first": "http://localhost:3000/api/v2/storefront/account/addresses?page=1"
}
}
User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Specify the fields you would like returned in the response body. More information.
Was this page helpful?