POST
/
api
/
v2
/
storefront
/
account
curl --request POST \
  --url https://demo.spreecommerce.org/api/v2/storefront/account \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "user": {
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Snow",
    "selected_locale": "en",
    "password": "spree123",
    "password_confirmation": "spree123",
    "public_metadata": {
      "user_segment": "supplier"
    },
    "private_metadata": {
      "has_abandoned_cart": false
    }
  }
}'
{
  "data": {
    "id": "1",
    "type": "user",
    "attributes": {
      "email": "[email protected]",
      "first_name": "John",
      "last_name": "Snow",
      "selected_locale": "en",
      "store_credits": 0,
      "completed_orders": 0,
      "tags": [
        "VIP",
        "supplier"
      ],
      "public_metadata": {
        "user_segment": "supplier"
      }
    },
    "relationships": {
      "default_billing_address": {
        "data": {
          "id": "2",
          "type": "address"
        }
      },
      "default_shipping_address": {
        "data": {
          "id": "1",
          "type": "address"
        }
      }
    }
  }
}

Body

application/vnd.api+json
user
object

Response

200
application/vnd.api+json
200 Success - Returns the `user` object.
data
object
required
included
object[]