curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "1",
"type": "user",
"attributes": {
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"selected_locale": "fr",
"store_credits": 150.75,
"completed_orders": 3,
"tags": [
"<string>"
],
"public_metadata": {
"user_segment": "supplier"
}
},
"relationships": {
"default_billing_address": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"default_shipping_address": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
},
"included": [
{
"id": "1",
"type": "address",
"attributes": {
"firstname": "John",
"lastname": "Doe",
"address1": "1600 Amphitheatre Pkwy",
"address2": "Suite 1",
"city": "Mountain View",
"zipcode": "94043",
"phone": "(+1) 123 456 789",
"state_name": "California",
"state_code": "CA",
"country_name": "United States of America",
"country_iso3": "USA",
"company": "Google Inc.",
"label": "Home"
}
}
]
}Returns the current user details.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/account \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "1",
"type": "user",
"attributes": {
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"selected_locale": "fr",
"store_credits": 150.75,
"completed_orders": 3,
"tags": [
"<string>"
],
"public_metadata": {
"user_segment": "supplier"
}
},
"relationships": {
"default_billing_address": {
"data": {
"id": "<string>",
"type": "<string>"
}
},
"default_shipping_address": {
"data": {
"id": "<string>",
"type": "<string>"
}
}
}
},
"included": [
{
"id": "1",
"type": "address",
"attributes": {
"firstname": "John",
"lastname": "Doe",
"address1": "1600 Amphitheatre Pkwy",
"address2": "Suite 1",
"city": "Mountain View",
"zipcode": "94043",
"phone": "(+1) 123 456 789",
"state_name": "California",
"state_code": "CA",
"country_name": "United States of America",
"country_iso3": "USA",
"company": "Google Inc.",
"label": "Home"
}
}
]
}User token to authorize Cart and Checkout requests.
It is required to associate Cart with the User.
Pass default_billing_address and/or default_shipping_address as value to include selected addresses information
Specify the fields you would like returned in the response body. More information.
200 Success - Returns the user object.
Show child attributes
"1"
Show child attributes
"John"
"Doe"
"fr"
150.75
Number of placed Orders by this User
3
List of tags associated with the user
The public metadata for this User
{ "user_segment": "supplier" }
Show child attributes
Show child attributes
"1"
Show child attributes
"John"
"Doe"
"1600 Amphitheatre Pkwy"
"Suite 1"
"Mountain View"
"94043"
"(+1) 123 456 789"
"California"
State abbreviation
"CA"
"United States of America"
Country ISO3 code
"USA"
Company name
"Google Inc."
The internal name for this address (Work, Home)
"Home"
Was this page helpful?