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/logout \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"access_token": "<string>",
"refresh_token": "<string>",
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"is_email_verified": true,
"phone": "<string>",
"country_code": "<string>",
"is_phone_verified": true,
"profile_image_url": "<string>",
"is_anonymous": true,
"is_logged_in": true,
"login_methods": [
"email"
],
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
},
"created_at": "<string>",
"modified_at": "<string>"
}
}
}
The Logout User API initiate the logout process for a user. Upon a successful request, the API responds with a confirmation message. If the user is not found or there’s an issue with the request, an error response is returned with an appropriate message.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/logout \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"access_token": "<string>",
"refresh_token": "<string>",
"user": {
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "[email protected]",
"is_email_verified": true,
"phone": "<string>",
"country_code": "<string>",
"is_phone_verified": true,
"profile_image_url": "<string>",
"is_anonymous": true,
"is_logged_in": true,
"login_methods": [
"email"
],
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
},
"created_at": "<string>",
"modified_at": "<string>"
}
}
}
Access token
OK
The response is of type object
.
Was this page helpful?