App-level and store-level webhooks
Each event is characterized by a tenant type, which signifies the proprietor of the event data. Events that occur at the store level, such as the accumulation of loyalty points or the dispatch of an SMS, are linked with the store tenant type. Partners can subscribe to store events for the stores that have installed their apps.
Events pertaining to the disconnection of the application fall under the application tenant type. Only the application itself can subscribe to its own application events.
This structure ensures the accuracy and relevance of the event data.
- When you subscribe to app-level webhooks, you need to insert only your application ID. The subscription is once per application ID.
- When you subscribe to store-level webhooks, you need to insert both the app ID and the specific store ID. You need to subscribe to each store separately.
Yotpo SMS & Email events
The following webhook events are available:
Tenant type | Trigger | Tenant type | Tenant ID |
---|---|---|---|
communication.sms.subscribe | Triggered when a user subscribes to SMS | Store | store_id |
communication.sms.unsubscribe | Triggered when a user unsubscribes from SMS | Store | store_id |
communication.lists.add | Triggered when a subscriber is added to a list | Store | store_id |
communication.lists.remove | Triggered when a subscriber is removed from a list | Store | store_id |
{
"first_name": "Tom",
"last_name": "Smith",
"phone": "+17264659389",
"email": "[email protected]",
"external_id": "12345",
"default_currency": "USD",
"account_status": "disabled",
"gender": "male",
"address": {
"zip": "12344",
"city": "Jerusalem",
"country_code": "IL",
"state": "Jerusalem"
},
"accepts_sms_marketing": true,
"accepts_email_marketing": false,
"sms_subscription_source": "Subscription form",
"email_subscription_source": "",
"tags": "vip, gold",
"lists": [
"4486472"
],
"timezone": "",
"created_at": "2023-08-14T13:20:11Z",
"timestamp": 1692019211000,
"channel": "sms",
"topic": "communication/sms/subscribe"
}
{
"first_name": "Tom",
"last_name": "Smith",
"phone": "+17264659389",
"email": "[email protected]",
"external_id": "12345",
"default_currency": "USD",
"account_status": "",
"gender": "male",
"address": {
"zip": "12344",
"city": "Jerusalem",
"country_code": "IL",
"state": "Jerusalem"
},
"accepts_sms_marketing": false,
"accepts_email_marketing": false,
"sms_subscription_source": "Subscription form",
"email_subscription_source": "",
"tags": "vip, gold",
"lists": [
"4486472"
],
"timezone": "",
"created_at": "2023-08-14T13:20:11Z",
"timestamp": 1692019211000,
"channel": "sms",
"topic": "communication/sms/unsubscribe"
}
{
"first_name": "Tom",
"last_name": "Smith",
"phone": "+17264659389",
"email": "[email protected]",
"external_id": "12345",
"default_currency": "USD",
"account_status": "disabled",
"gender": "male",
"address": {
"zip": "12344",
"city": "Jerusalem",
"country_code": "IL",
"state": "Jerusalem"
},
"accepts_sms_marketing": true,
"accepts_email_marketing": false,
"sms_subscription_source": "Subscription form",
"email_subscription_source": "",
"tags": "vip, gold",
"lists": [
"4486472"
],
"timezone": "",
"created_at": "2023-08-14T13:20:11Z",
"updated_list_id": 4486472,
"timestamp": 1692019211000,
"channel": "sms",
"topic": "communication/lists/add"
}
{
"first_name": "Tom",
"last_name": "Smith",
"phone": "+17264659389",
"email": "[email protected]",
"external_id": "12345",
"default_currency": "USD",
"account_status": "",
"gender": "male",
"address": {
"zip": "12344",
"city": "Jerusalem",
"country_code": "IL",
"state": "Jerusalem"
},
"accepts_sms_marketing": true,
"accepts_email_marketing": false,
"sms_subscription_source": "Subscription form",
"email_subscription_source": "",
"tags": "vip, gold",
"lists": [],
"timezone": "",
"created_at": "2023-08-14T13:20:11Z",
"updated_list_id": 4486472,
"timestamp": 1692019945000,
"channel": "sms",
"topic": "communication/lists/remove"
}
App uninstall
Webhook event name (topic) | Trigger | Tenant type | Tenant ID |
---|---|---|---|
integrations.applications.disconnected.v3 | Triggered when a merchant clicks on the "disconnect" button within the integration page in Yotpo or after they click uninstall within your product and you delete the access token using this endpoint. | application | application_id |
{
"topic": "integrations.applications.disconnected.v3",
"name": "Application disconnected",
"store": "STORE_APP_KEY",
"product_lines": "[Reviews]"
}
More events coming soon!
Additional events for Yotpo's products will soon be added.