Skip to main content
POST
Register customer
Creates a customer in Fire spark for the user identified by the access token. Call this endpoint after token exchange when the customer signs in for the first time. The id in the request body must match the sub claim from the customer’s OIDC ID token (the same value bound to the access token).
Requires a Fire spark access token obtained through token exchange.

Request body

* Required for non-anonymous customers.

Delivery address

Billing profile

Request

Response

Returns the created customer in data. The shape matches get customer.

Anonymous customers

For guest checkout, send only id and is_anonymous: true. Fire spark uses the id as the display name when no name is provided.

Error responses

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Schema for registering a new customer. For anonymous customers, only id and is_anonymous: true are required. For regular customers, id, name, and email are required. registration_date is optional and defaults to the current time.

id
string
required

Your customer unique identifier. Must match the sub claim from the customer's OIDC ID token.

is_anonymous
boolean
default:false

Set to true to create an anonymous customer. When true, name and email are not required.

name
string

The full name of the customer. Required unless is_anonymous is true.

Example:

"John Smith"

email
string<email>

The email of the customer. Required unless is_anonymous is true.

status
enum<string>
default:ACTIVE

The status of the customer

Available options:
ACTIVE,
INACTIVE
gender
enum<string> | null

The gender of the customer

Available options:
MALE,
FEMALE,
OTHER
dob
string<date-time> | null

The date of birth of the customer

document_type
string | null

The document type of the customer

document_number
string | null

The document number of the customer

Maximum string length: 50
country
string | null

The country of the customer

Maximum string length: 100
phone
string | null

The customer's phone number in international format

Example:

"+593 99 123 4567"

registration_date
string<date-time>

The date when the customer was registered. Defaults to the current time when omitted.

devices
object[]

Optional device payloads on registration. Use PATCH /customers/{id} with a devices array to manage structured push devices after registration.

delivery_addresses
object[]
Maximum array length: 10
billing_profiles
object[]
Maximum array length: 10

The customer's consent preferences

metadata
object

Custom metadata for the customer. Must serialize to 1MB or less.

Response

Customer created

data
object

Customer profile returned by Storefront API endpoints. Omits internal fields such as birthday.