PATCH
/
api
/
v2
/
storefront
/
account
curl --request PATCH \
  --url https://demo.spreecommerce.org/api/v2/storefront/account \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "user": {
    "email": "john@snow.org",
    "first_name": "John",
    "last_name": "Snow",
    "selected_locale": "fr",
    "bill_address_id": "1",
    "ship_address_id": "1",
    "password": "spree123",
    "password_confirmation": "spree123"
  }
}'
{
"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
header
required

User token to authorize Cart and Checkout requests.

It is required to associate Cart with the User.

Body

application/vnd.api+json

Response

200
application/vnd.api+json

200 Success - Returns the user object.

The response is of type object.