GET
/
api
/
v2
/
storefront
/
account
curl --request GET \
  --url https://demo.spreecommerce.org/api/v2/storefront/account \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "1",
    "type": "user",
    "attributes": {
      "email": "spree@example.com",
      "first_name": "John",
      "last_name": "Snow",
      "selected_locale": "en",
      "store_credits": 0,
      "completed_orders": 0,
      "public_metadata": {
        "user_segment": "supplier"
      }
    },
    "relationships": {
      "default_billing_address": {
        "data": {
          "id": "2",
          "type": "address"
        }
      },
      "default_shipping_address": {
        "data": {
          "id": "1",
          "type": "address"
        }
      }
    }
  }
}

Authorizations

Authorization
string
headerrequired

User token to authorize Cart and Checkout requests.

It is required to associate Cart with the User.

Query Parameters

include
string

Pass default_billing_address and/or default_shipping_address as value to include selected addresses information

fields[user]
string

Specify the fields you would like returned in the response body. More information.

Response

200 - application/vnd.api+json
data
object
required
included
object[]