Commerce Engine is now in beta. We're working hard to make it better for you.
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>"
}
}This API’s focus is on anonymous users who have not undergone the formal account creation process. These anonymous users are associated with a unique ID, ensuring that even in the absence of a fully realized account, there is a distinct and trackable identity for each user. To interact with the system, each anonymous user is issued an access token. This access token plays a dual role in the system: it serves as a means of authenticating the user and it also acts as a tool for authorization, determining what actions the authenticated user is permitted to perform.
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?