Hvis der været en event i et felt, sendes dataene. Det gælder både standard- og customfelter.
Se eksempler herunder.
Vær opmærksom på at vores webhooks kan opsætte som rå json eller som både et data-element, med et webhook i.
længere nede kan du se eksempler på vores json-objekter. Du vælger om det skal være rå json eller som et data-element:
"data": "{"member_id":"0a2737..." mere info fra din liste ".....72c"}"
Tilmeld medlem eksempel med custom felter
{"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"}}}
Opdater medlem eksempel med custom felter
{"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"}]}}}
Opdater eksempel med shop
{"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"}]}}
Frameld medlem eksempel
{"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"}}}
For at du ikke skal teste spamklager og hardbounce har vi lavet et dummy eksempel, hvor du kan se hvordan data ser ud, ved disse event.
Spamklage eksempel
{"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"}}}
Hardbounce eksempel
{"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
Du kan ud for hvert webhook sende en test, som tager et medlemsID og sender dig event eksempler for "opret", "update" og "delete".
Når du gør det vil eventet komme med et ekstra felt "isAdvancedTest", som kan have værdien "test".
Du bør filtrere dette fra, så hooks med denne værdi ikke bliver behandlet
Stadig i tvivl?
Har du yderligere spørgsmål, er du som altid velkommen til at kontakte os.
Comments