GET
/
api
/
v1
/
customer
Get Customer Data
curl --request GET \
  --url https://api.cravejs.com/api/v1/customer \
  --header 'X-API-Key: <api-key>'
{
  "id": "687a1eac1907e7930c347c81",
  "profilePicture": "https://example.com/profile/customer-photo.jpg",
  "customerEmail": "customer@example.com",
  "customerName": "John Smith",
  "phoneNumber": "+1234567890"
}

Headers

Authorization
string
required
Bearer token from OTP verification
Format: Bearer {jwt_token}
X-API-Key
string
required
Storefront API key for authentication
{
  "id": "687a1eac1907e7930c347c81",
  "profilePicture": "https://example.com/profile/customer-photo.jpg",
  "customerEmail": "customer@example.com",
  "customerName": "John Smith",
  "phoneNumber": "+1234567890"
}
This endpoint returns the customer profile information associated with the authenticated session. The JWT token is validated using Stytch’s session authentication, and the customer data is retrieved from the database using the customer ID stored in the token’s custom claims.The phoneNumber field is only included in the response if the customer has a phone number on file. The profilePicture field may be an empty string if no profile picture is set.

Authorizations

X-API-Key
string
header
required

Response

200
application/json

Customer data retrieved successfully.

The response is of type object.