Customer
The Customer object
idstringoptionalPublic customer identifier.
address_idstringoptionalPublic ID of the customer's default place.
internal_idstringoptionalInternal customer reference.
namestringoptionalCustomer name.
titlestringoptionalCustomer title.
photo_urlstringoptionalCustomer photo URL.
emailstringoptionalCustomer email address.
phonestringoptionalCustomer phone number.
addressstringoptionalDefault address text.
addressesarray of objectsoptionalSaved customer places.
tokenstringoptionalAuth token returned by authentication and customer creation endpoints.
ordersintegeroptionalCount of customer orders for the current storefront or network context.
metaobjectoptionalArbitrary metadata stored with the customer.
slugstringoptionalURL-friendly customer slug.
created_attimestampoptionalTime the customer was created.
updated_attimestampoptionalTime the customer was last updated.
{
"id": "customer_5M8xQp2",
"address_id": "place_9eL2wA1",
"internal_id": null,
"name": "Alex Rivera",
"title": null,
"photo_url": null,
"email": "alex@example.com",
"phone": "+15555550100",
"address": "123 Market Street",
"addresses": [],
"token": "plain-text-token",
"orders": 4,
"meta": {},
"slug": "alex-rivera",
"created_at": "2026-05-07T09:30:00Z",
"updated_at": "2026-05-07T09:30:00Z"
}/v1/customers/loginAuthenticate a Customer ❗
Authenticates a storefront customer with an email or phone identity and password. The response includes the customer profile and an auth token.
identitystringrequiredCustomer email address or phone number.
passwordstringrequiredCustomer password.
namestringoptionalCustomer name used when a contact record must be created for the storefront.
phonestringoptionalCustomer phone used when a contact record must be created for the storefront.
emailstringoptionalCustomer email used when a contact record must be created for the storefront.
/v1/customers/logincurl -X POST https://api.fleetbase.io/v1/customers/login \
-H "Authorization: Bearer flb_live_…"/v1/customers/login-with-smsAuthenticate a Customer via SMS
Starts SMS authentication for an existing storefront customer. The customer receives a verification code that can be exchanged for an auth token.
phonestringrequiredCustomer phone number to receive the storefront login verification code.
/v1/customers/login-with-smscurl -X POST https://api.fleetbase.io/v1/customers/login-with-sms \
-H "Authorization: Bearer flb_live_…"/v1/customers/verify-codeVerify a SMS code
Verifies a storefront SMS or creation code. The response includes the customer profile and auth token when verification succeeds.
identitystringrequiredCustomer email address or phone number being verified.
codestringrequiredVerification code submitted by the customer.
forstringoptionalDefault: storefront_loginVerification purpose. Use storefront_create_customer to continue customer creation.
namestringoptionalCustomer name used when a contact record must be created.
phonestringoptionalCustomer phone used when a contact record must be created.
emailstringoptionalCustomer email used when a contact record must be created.
/v1/customers/verify-codecurl -X POST https://api.fleetbase.io/v1/customers/verify-code \
-H "Authorization: Bearer flb_live_…"/v1/customersRetrieve a Customer
Retrieves a storefront customer by ID.
/v1/customerscurl https://api.fleetbase.io/v1/customers \
-H "Authorization: Bearer flb_live_…"/v1/customers/request-creation-codeSetups a verification request to create a new storefront custome
Sends a verification code for storefront customer creation. The code is required when creating the customer account.
modeenumrequiredVerification delivery mode. One of email, sms.
identitystringrequiredEmail address or phone number receiving the customer creation code.
/v1/customers/request-creation-codecurl -X POST https://api.fleetbase.io/v1/customers/request-creation-code \
-H "Authorization: Bearer flb_live_…"/v1/customers/register-deviceRegister customer device
Registers a device token for the authenticated storefront customer. Use this to enable push notifications for the customer device.
tokenstringrequiredPush notification device token.
platformstringoptionalDevice platform. os is also accepted as an alias.
osstringoptionalDevice platform alias used when platform is not provided.
/v1/customers/register-devicecurl -X POST https://api.fleetbase.io/v1/customers/register-device \
-H "Authorization: Bearer flb_live_…" \
-H "customer-token: "/v1/customers/login-with-appleAuthenticate a Customer with Apple
Authenticates a storefront customer with Apple Sign-In. Fleetbase verifies the Apple identity token, creates or updates the user, and returns the storefront customer with an auth token.
identityTokenstringrequiredApple identity token to verify.
authorizationCodestringrequiredApple authorization code issued during sign-in.
emailstringoptionalCustomer email address provided by Apple.
phonestringoptionalCustomer phone number.
namestringoptionalCustomer display name.
appleUserIdstringoptionalStable Apple user identifier.
/v1/customers/login-with-applecurl -X POST https://api.fleetbase.io/v1/customers/login-with-apple \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"identityToken": "{{apple_identity_token}}",
"authorizationCode": "{{apple_authorization_code}}",
"email": "{{customer_email}}",
"phone": "{{customer_phone}}",
"name": "{{customer_name}}",
"appleUserId": "{{apple_user_id}}"
}'/v1/customers/login-with-facebookAuthenticate a Customer with Facebook
Authenticates a storefront customer with Facebook account data. Fleetbase creates or updates the matching user and returns the storefront customer with an auth token.
emailstringoptionalCustomer email address from Facebook.
namestringoptionalCustomer display name from Facebook.
facebookUserIdstringrequiredStable Facebook user identifier.
/v1/customers/login-with-facebookcurl -X POST https://api.fleetbase.io/v1/customers/login-with-facebook \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"email": "{{customer_email}}",
"name": "{{customer_name}}",
"facebookUserId": "{{facebook_user_id}}"
}'/v1/customers/login-with-googleAuthenticate a Customer with Google
Authenticates a storefront customer with Google Sign-In. Fleetbase verifies the Google ID token, creates or updates the user, and returns the storefront customer with an auth token.
idTokenstringrequiredGoogle ID token to verify.
clientIdstringrequiredGoogle OAuth client ID expected for the ID token.
/v1/customers/login-with-googlecurl -X POST https://api.fleetbase.io/v1/customers/login-with-google \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"idToken": "{{google_id_token}}",
"clientId": "{{google_client_id}}"
}'/v1/customersQuery customers
Returns storefront customers for the current company. Use query and pagination parameters to find matching customer records.
/v1/customerscurl https://api.fleetbase.io/v1/customers \
-H "Authorization: Bearer flb_live_…"/v1/customersCreate a Customer
Creates a storefront customer after verifying the supplied creation code. The response includes the customer profile and an auth token.
namestringrequiredDisplay name for the resource.
emailstringoptionalEmail address for the person or customer.
phonestringoptionalPhone number for the person or customer.
identitystringrequiredEmail address or phone number used for authentication.
passwordstringoptionalPassword used to authenticate the customer.
codestringrequiredVerification or status code.
/v1/customerscurl -X POST https://api.fleetbase.io/v1/customers \
-H "Authorization: Bearer flb_live_…"/v1/customers/stripe-ephemeral-keyGet Stripe Ephemeral Key
Creates a Stripe ephemeral key for the authenticated storefront customer. Fleetbase creates the Stripe customer first when the customer does not already have one.
/v1/customers/stripe-ephemeral-keycurl -X POST https://api.fleetbase.io/v1/customers/stripe-ephemeral-key \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{}'/v1/customers/stripe-setup-intentGet Stripe Setup Intent
Creates a Stripe SetupIntent for the authenticated storefront customer. Use the returned client secret to collect or update a saved payment method.
/v1/customers/stripe-setup-intentcurl -X POST https://api.fleetbase.io/v1/customers/stripe-setup-intent \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{}'/v1/customers/account-closureStart Account Closure
Starts storefront account closure for the authenticated customer. Fleetbase sends a verification code to the linked phone number or email address.
/v1/customers/account-closurecurl -X POST https://api.fleetbase.io/v1/customers/account-closure \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{}'/v1/customers/{id}Update a Customer
Updates a storefront customer profile. The response returns the customer with the new values applied.
namestringoptionalDisplay name for the resource.
emailstringoptionalEmail address for the person or customer.
phonestringoptionalPhone number for the person or customer.
identitystringoptionalEmail address or phone number used for authentication.
passwordstringoptionalPassword used to authenticate the customer.
codestringoptionalVerification or status code.
/v1/customers/{id}curl -X PUT https://api.fleetbase.io/v1/customers/{id} \
-H "Authorization: Bearer flb_live_…"/v1/customers/confirm-account-closureConfirm Account Closure
Confirms storefront account closure using the verification code sent to the customer. Fleetbase deletes the customer contact and, for customer users, the linked user account.
codestringrequiredAccount closure verification code sent to the customer.
/v1/customers/confirm-account-closurecurl -X POST https://api.fleetbase.io/v1/customers/confirm-account-closure \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"code": "{{verification_code}}"
}'/v1/customers/request-phone-verificationRequest Phone Verification
Sends a verification code to a new phone number for the authenticated storefront customer. Fleetbase rejects numbers already assigned to another user.
phonestringrequiredPhone number to verify for the authenticated customer.
/v1/customers/request-phone-verificationcurl -X POST https://api.fleetbase.io/v1/customers/request-phone-verification \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"phone": "{{customer_phone}}"
}'/v1/customers/verify-phone-numberVerify Phone Number
Verifies the customer's pending phone number with the code sent by the phone verification request.
codestringrequiredVerification code sent to the pending phone number.
/v1/customers/verify-phone-numbercurl -X POST https://api.fleetbase.io/v1/customers/verify-phone-number \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"phone": "{{customer_phone}}",
"code": "{{verification_code}}"
}'/v1/customers/placesList a customer saved places
Returns saved places for the authenticated storefront customer. Use these places for delivery addresses and checkout defaults.
/v1/customers/placescurl https://api.fleetbase.io/v1/customers/places \
-H "Authorization: Bearer flb_live_…"/v1/contactsUpdate Contact Customer Alias
Updates a storefront customer through the legacy contact alias route. The request is handled by the same customer update controller as /customers/{id}.
namestringoptionalDisplay name for the resource.
emailstringoptionalEmail address for the person or customer.
phonestringoptionalPhone number for the person or customer.
identitystringoptionalEmail address or phone number used for authentication.
passwordstringoptionalPassword used to authenticate the customer.
codestringoptionalVerification or status code.
/v1/contactscurl -X PUT https://api.fleetbase.io/v1/contacts \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "{{customer_name}}",
"email": "{{customer_email}}",
"phone": "{{customer_phone}}"
}'/v1/customers/ordersList a customer orders
Returns orders that belong to the authenticated storefront customer. Use pagination and filters to browse the customer order history.
/v1/customers/orderscurl https://api.fleetbase.io/v1/customers/orders \
-H "Authorization: Bearer flb_live_…"