Webhook output

Contents

    If an event has occurred in a field, the data is sent. This applies to both standard and custom fields. See the examples below.

    Please note that our webhooks can be configured as raw JSON or as a data element containing a webhook.

    Further down, you can see examples of our JSON objects. You can choose whether to use raw JSON or a data element:

    "data": "{"member_id":"0a2737..." more info from your list ".....72c"}"

    Sign Up Example with Custom Fields


    {"member_id":"aacd0c54-fb21-46c5-823c-a1bb1703d713","list_id":1,"type":"subscribe","signature":"a96cb5a5d8e45af7310adbfe14aab9e0","member":{"list_id":1,"status":{"status":"active","email":null,"mobile":null},"fields":{"firstname":"John","lastname":"Doe","email":"johndoe@loyalitetsbureuet.dk","mobile":"000000","birthdate":"1973-06-26T00:00:00+0000","address":"Loyalitetsvej 1","postalcode":8200,"country":{"id":53,"value":"Danmark"},"sko":[{"id":5835,"value":"43"}],"bluse":[{"id":2,"value":"L"},{"id":4,"value":"s"}],"sent_mail":0,"sent_sms":0,"open_rate":0,"imported":false,"created_at":"2015-03-04T06:46:45+0000","updated_at":"2015-03-04T06:46:45+0000","created_by":null,"created_from":{"type":"internal"},"_id":"aacd0c54-fb21-46c5-823c-a1bb1703d713"}}}

    Update Member Example with Custom Fields


    {"member_id":"aacd0c54-fb21-46c5-823c-a1bb1703d713","list_id":1,"type":"update","signature":"a96cb5a5d8e45af7310adbfe14aab9e0","member":{"list_id":1,"status":{"status":"active","email":null,"mobile":null},"fields":{"postalcode":8260,"email":"johndoe@loyalitetsbureauet.dk","address":"loyaltyvej","birthdate":"1973-06-26T00:00:00+0000","lastname":"Jensen","firstname":"John","mobile":"00000000","country":{"value":"Danmark","id":53},"sko":[{"id":5835,"value":"43"}],"bluse":[{"id":2,"value":"L"},{"id":4,"value":"s"}],"sent_mail":0,"sent_sms":0,"open_rate":0,"imported":false,"created_at":"2015-03-04T06:46:45+0000","updated_at":"2015-03-04T07:36:36+0000","created_by":null,"created_from":{"type":"internal"},"_id":"aacd0c54-fb21-46c5-823c-a1bb1703d713","updated_from":[{"type":"internal","updated_at":"2015-03-04T07:36:36+0000"}]}}}

    Update example with a store


    {"member_id":"e8760a00-18de-437b-8b31-0539ccd3ea41","list_id":1,"type":"update","signature":"4ae32890ce58e23492f1e12e348e0dd2","member":{"list_id":1,"status":{"status":"active","email":null,"mobile":null},"fields":{"shop":[{"value":"Min butik","id":1}],"postalcode":8200,"address":"loyalitetsvej","email":"johndoe@loyalitetsbureauet.dk","lastname":"Doe","firstname":"John","mobile":"00000000"},"sent_mail":0,"sent_sms":0,"open_rate":0,"imported":true,"created_at":"2015-03-02T09:04:25+0000","updated_at":"2015-03-04T07:55:51+0000","created_by":null,"_id":"e8760a00-18de-437b-8b31-0539ccd3ea41","created_from":{"type":"import"},"updated_from":[{"type":"internal","updated_at":"2015-03-04T07:55:51+0000"}]}}

    Example of a membership cancellation


    {"member_id":"aacd0c54-fb21-46c5-823c-a1bb1703d713","list_id":1,"type":"unsubscribe","signature":"a96cb5a5d8e45af7310adbfe14aab9e0","member":{"list_id":1,"status":{"status":"removed","email":null,"mobile":null},"fields":{"postalcode":8200,"email":"Johndoe@loyalitetsbureauet.dk","address":"Loyaltyvej","birthdate":"1973-06-26T00:00:00+0000","lastname":"Jensen","firstname":"John","mobile":"52335040","country":{"value":"Danmark","id":53},"sko":[{"id":5835,"value":"43"}],"bluse":[{"id":2,"value":"L"},{"id":4,"value":"s"}]},"sent_mail":0,"sent_sms":0,"open_rate":0,"imported":false,"created_at":"2015-03-04T06:46:45+0000","updated_at":"2015-03-04T07:41:40+0000","created_by":null,"created_from":{"type":"internal"},"_id":"aacd0c54-fb21-46c5-823c-a1bb1703d713","updated_from":[{"type":"internal","updated_at":"2015-03-04T07:36:36+0000"}],"deleted_from":{"type":"internal"}}}

    To save you the trouble of testing spam complaints and hard bounces, we’ve created a sample example where you can see what the data looks like for these events.

    Example of a spam complaint:

    {"member_id": "e8760a00-18de-437b-8b31-0539ccd3ea41", "list_id": "1", "ref_id": "AutoresponderID/campaignId", "message_type": "Autoresponder/Campaign", "name": "AutoresponderName/campaignName", "type": "spamComplaint",  "signature": "37dafeb256992064429a6c6e6ac83617", "member": {"list_id": 1, "status": {"status": "active", "email": "complaint", "mobile": null}, "fields": {"email": "example@heyloyalty.com",
    "sent_mail": 0, "sent_sms": 0, "open_rate": 0, "imported": false, "created_at": "2016-08-30T13:18:58+0000", "updated_at": "2016-08-30T13:18:58+0000", "created_by": null, "updated_fields": [], "current_fields": [], "created_from": {"type": "internal"}, "_id": "2"}}}

    Hard bounce example:

    {"member_id": "e8760a00-18de-437b-8b31-0539ccd3ea41", "list_id": "1", "ref_id": "AutoresponderID/campaignId", "message_type": "Autoresponder/Campaign", "name": "AutoresponderName/campaignName", "type": "hardbounce",  "signature": "37dafeb256992064429a6c6e6ac83617", "member": {"list_id": 1, "status": {"status": "active", "email": "complaint", "mobile": null}, "fields": {"email": "example@heyloyalty.com",
    "sent_mail": 0, "sent_sms": 0, "open_rate": 0, "imported": false, "created_at": "2016-08-30T13:18:58+0000", "updated_at": "2016-08-30T13:18:58+0000", "created_by": null, "updated_fields": [], "current_fields": [], "created_from": {"type": "internal"}, "_id": "2"}}}

    Webhook Test

    For each webhook, you can send a test request that takes a member ID and returns sample events for “create,” “update,” and “delete.”

    When you do this, the event will include an additional field, “isAdvancedTest,” which may have the value “test.”
    You should filter this out so that hooks with this value are not processed.