curl https://api.thanxsandbox.com/communication_settings/550e8400-e29b-41d4-a716-446655440000 \
-X PATCH \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "X-ClientId: ${client_id}"
-d '{
"communication_setting": {
"reward_earned": {
"notification": false,
"email": false
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": false
}
}
}'
curl https://api.thanxsandbox.com/communication_settings/woerihfslkwer \
-X PATCH \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"communication_setting": {
"reward_earned": {
"notification": false,
"email": false
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": false
}
}
}'
{
"communication_setting": {
"id": "weoruoisdhf",
"merchant_id": "owierywtwt",
"merchant_handle": "example-merchant",
"user_id": "woerushfwe",
"reward_earned": {
"notification": true,
"email": true
},
"reward_unused": {
"notification": true,
"email": true
},
"reward_progress": {
"notification": true,
"email": true
},
"reward_offer": {
"notification": true,
"email": true
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": true
}
}
}
Communication Settings
Update Communication Settings
This endpoint allows the update of a user’s notification / email settings.
PATCH
/
communication_settings
/
:id
curl https://api.thanxsandbox.com/communication_settings/550e8400-e29b-41d4-a716-446655440000 \
-X PATCH \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "X-ClientId: ${client_id}"
-d '{
"communication_setting": {
"reward_earned": {
"notification": false,
"email": false
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": false
}
}
}'
curl https://api.thanxsandbox.com/communication_settings/woerihfslkwer \
-X PATCH \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"communication_setting": {
"reward_earned": {
"notification": false,
"email": false
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": false
}
}
}'
{
"communication_setting": {
"id": "weoruoisdhf",
"merchant_id": "owierywtwt",
"merchant_handle": "example-merchant",
"user_id": "woerushfwe",
"reward_earned": {
"notification": true,
"email": true
},
"reward_unused": {
"notification": true,
"email": true
},
"reward_progress": {
"notification": true,
"email": true
},
"reward_offer": {
"notification": true,
"email": true
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": true
}
}
}
Parameters
string
The ID of the settings record. Can be either a UID (SecureRandom.uuid) for unauthenticated access or an ID for authenticated access.
hash
hash
hash
hash
hash
Settings for when a user has the opportunity to leave feedback for a purchase
Show feedback_available
Show feedback_available
boolean
app notification setting
hash
Response
string
The ID of the settings record
string
The ID of the merchant
string
The handle of the merchant
string
The ID of the user
hash
hash
hash
hash
hash
Settings for when a user has the opportunity to leave feedback for a purchase
Show feedback_available
Show feedback_available
boolean
app notification setting
hash
Authentication
This endpoint supports two authentication modes:- Unauthenticated: Use the setting’s UID to update preferences without authentication
- Authenticated: Use the setting’s hashid with OAuth bearer token for authenticated access
curl https://api.thanxsandbox.com/communication_settings/550e8400-e29b-41d4-a716-446655440000 \
-X PATCH \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "X-ClientId: ${client_id}"
-d '{
"communication_setting": {
"reward_earned": {
"notification": false,
"email": false
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": false
}
}
}'
curl https://api.thanxsandbox.com/communication_settings/woerihfslkwer \
-X PATCH \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
-d '{
"communication_setting": {
"reward_earned": {
"notification": false,
"email": false
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": false
}
}
}'
{
"communication_setting": {
"id": "weoruoisdhf",
"merchant_id": "owierywtwt",
"merchant_handle": "example-merchant",
"user_id": "woerushfwe",
"reward_earned": {
"notification": true,
"email": true
},
"reward_unused": {
"notification": true,
"email": true
},
"reward_progress": {
"notification": true,
"email": true
},
"reward_offer": {
"notification": true,
"email": true
},
"feedback_available": {
"notification": true
},
"marketing_general": {
"email": true,
"sms": true
}
}
}