User webhook
Spaaza can call external webhooks for certain user events, including:
- when the opt-in status of a user changes
- when the user is created or updated
An example of a user webhook
{
"id": "user3813431",
"type": "shopper.opted-in",
"chain_id": 1743,
"created": "2022-05-23T20:18:52Z",
"data": {
"address_housenumber": "22",
"address_housenumber_extension": "A",
"address_latitude": 52.37276,
"address_line_2": null,
"address_line_3": null,
"address_longitude": 4.893604,
"address_postalcode": "1000 SJ",
"address_regionstate": "Noord-Holland",
"address_streetname": "Anystraat",
"address_towncity": "Amsterdam",
"authentication_point": null,
"authentication_point_identifier": null,
"auxiliary_identifier": "TEST_4002",
"average_basket_value": "73.12",
"birthday": "1987-09-09T00:00:00+00:00",
"country_code": "NL",
"days_since_last_purchase": 83,
"first_name": "Jane",
"frequency": 5,
"gender": "F",
"home_store": {
"home_store_id": 1409,
"home_store_name": "Rembrandthuis Museum store"
},
"id": 3813431,
"is_employee": false,
"is_influencer": false,
"language": null,
"last_name": "Seymour",
"loyalty_status": null,
"mailing_list": {
"mailing_list_sub_offered": false,
"mailing_list_subscribed": true,
"printed_mailing_list_subscribed": false
},
"member_number": {
"code": "3813431",
"type": "regular"
},
"monetary": 2,
"number_of_purchases": 14,
"obfuscated": false,
"offline_shopper": true,
"online_shopper": true,
"opt_in_programme": {
"join_date": "2021-11-26T20:09:43+00:00",
"programme_opted_in": true
},
"opt_in_secondary": false,
"overall": 452,
"phone_number": "+31205555555",
"push_notification_subscription": {
"subscribed": false,
"subscriptions": []
},
"recency": 4,
"referral_channel": "store",
"referral_code": "ptola9",
"referring_user": {
"authentication_point_identifier": "2152416",
"campaign_id": 2067,
"id": 3593704,
"referral_channel": "webshop",
"referral_code": "b09zy7"
},
"registered": true,
"signup_channel": "spaaza-mobile-web",
"stores": "",
"user_id": 3813431,
"username": "seymour@spaaza.com"
}
}