MobiariDocs

Create a customer account

POST
/storefront-api/{store_slug}/customers/register

Starts a registration: e-mails the shopper a link, valid 15 minutes, that finishes it (POST .../customers/verify with the token and a password). Nothing is signed in and no password is stored until then, so nobody can take over an e-mail they do not control; a customer the store already knows from an order or import (no password yet) is adopted at that point, keeping its order history. The answer is the same whether or not the e-mail already has an account.

Path Parameters

store_slug*string

Store slug

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/storefront-api/string/customers/register" \  -H "Content-Type: application/json" \  -d '{    "email": "string",    "password": "string"  }'
{
  "message": "string",
  "verification_required": true
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}