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/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
}
}
}
}Creates notification preferences for a user.
curl --request POST \
--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
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
Was this page helpful?