Commerce Engine is now in beta. We're working hard to make it better for you.
curl --request PUT \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/user/{id}/notification-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
}
}
'{
"message": "<string>",
"success": true,
"content": {
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
}
}
}Update Notification Preferences API allows clients to update a userโs notification preferences based on their unique user identifier (user_id).
curl --request PUT \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/user/{id}/notification-preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
}
}
'{
"message": "<string>",
"success": true,
"content": {
"notification_preferences": {
"transactional": {
"email": true,
"sms": true,
"whatsapp": true
},
"promotional": {
"email": true,
"sms": true,
"whatsapp": true
},
"newsletter": {
"email": true,
"sms": true,
"whatsapp": true
}
}
}
}Access token
user id
An object containing the user's notification preferences.
Show child attributes
These notifications are typically critical for user engagement, providing updates, confirmations, or alerts related to their account activities.
Show child attributes
Indicates whether the user has opted to receive notifications via email.
Indicates whether the user has opted to receive notifications via SMS.
Indicates whether the user has opted to receive notifications via WhatsApp.
These notifications aim to engage users with promotional content and enhance their overall experience with the platform.
Show child attributes
Indicates whether the user has opted to receive notifications via email.
Indicates whether the user has opted to receive notifications via SMS.
Indicates whether the user has opted to receive notifications via WhatsApp.
These notifications are often sent periodically as part of a subscription service.
Show child attributes
Indicates whether the user has opted to receive notifications via email.
Indicates whether the user has opted to receive notifications via SMS.
Indicates whether the user has opted to receive notifications via WhatsApp.
OK
A descriptive message confirming the success or failure of the operation.
Indicates whether the request was successful or failure (true for success, false for failure).
An object containing the response content.
Show child attributes
An object containing the user's notification preferences.
Show child attributes
These notifications are typically critical for user engagement, providing updates, confirmations, or alerts related to their account activities.
Show child attributes
Indicates whether the user has opted to receive notifications via email.
Indicates whether the user has opted to receive notifications via SMS.
Indicates whether the user has opted to receive notifications via WhatsApp.
These notifications aim to engage users with promotional content and enhance their overall experience with the platform.
Show child attributes
Indicates whether the user has opted to receive notifications via email.
Indicates whether the user has opted to receive notifications via SMS.
Indicates whether the user has opted to receive notifications via WhatsApp.
These notifications are often sent periodically as part of a subscription service.
Show child attributes
Indicates whether the user has opted to receive notifications via email.
Indicates whether the user has opted to receive notifications via SMS.
Indicates whether the user has opted to receive notifications via WhatsApp.
Was this page helpful?