Commerce Engine is now in early preview. Please report any issues or feedback to support@commercengine.io
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/anonymous \
--header 'X-Api-Key: <api-key>'{
"message": "<string>",
"success": true,
"content": {
"user": {
"id": "<string>",
"is_anonymous": true,
"is_logged_in": true,
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "<string>",
"is_email_verified": false,
"is_phone_verified": false,
"profile_image_url": "<string>",
"created_at": "<string>",
"modified_at": "<string>"
},
"access_token": "<string>",
"refresh_token": "<string>"
}
}Creates an anonymous user session with a persistent user_id for analytics and cart tracking. Returns an AnonymousUser object with access_token and refresh_token. Call this before any other authenticated endpoint for guest users.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/anonymous \
--header 'X-Api-Key: <api-key>'{
"message": "<string>",
"success": true,
"content": {
"user": {
"id": "<string>",
"is_anonymous": true,
"is_logged_in": true,
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"email": "<string>",
"is_email_verified": false,
"is_phone_verified": false,
"profile_image_url": "<string>",
"created_at": "<string>",
"modified_at": "<string>"
},
"access_token": "<string>",
"refresh_token": "<string>"
}
}API key for your store
OK
A string containing a descriptive message related to the success or failure of the anonymous user creation or authentication.
A boolean value indicates the success or failure of the anonymous user operation.true for success false for failure.
An object containing the response content.
Show child attributes
Was this page helpful?