Webhooks

Introduction

Webhooks are "user-defined HTTP callbacks".They are triggered by some event, such as form submit or a some other user action. When that event occurs, our system makes an HTTP request to the URI configured for the webhook. All requests use POST URI.


For now we support :

Form submit event - occurs when a contact form was submitted

Loyalty program user signup - occurs when a new user is registered in the loyalty program

Loyalty program transaction - occurs when a loyalty program transaction has happened (points were submitted, a reward was redeemed, etc)

Loyalty program member information changed - occurs when a member information has changed

Basic account created - occurs when a basic account was created



Form Submit event request information

Body Parameters

Name Description Type Additional information
PageId

Page ID

integer

None.

DomainId

Domain ID

integer

None.

PageName

Page name

string

None.

DomainName

Domain name

string

None.

Fields

Form field list

Collection of ContactFormField

None.

SubmitDateUtc

Submit form date in UTC

datetime

None.

EventTypeCode

Event type code

char

For that webhook it always will be "F"

EventTypeDescription

Event type code description

string

For that webhook it always will be "Form submit"

Sample request:

Request method : POST
            
                {
                    "PageId": -1,
                    "DomainId": -1,
                    "PageName": "test page name",
                    "DomainName": "test domain name",
                    "Fields": [
                        {
                            "Name": "test field 1",
                            "Value": "test field 1 value"
                        },
                        {
                            "Name": "test field 2",
                            "Value": "test field 2 value"
                        }
                    ],
                    "SubmitDateUtc": "2014-09-19T20:01:42.1566603Z",
                    "EventTypeCode": "F",
                    "EventTypeDescription": "Form submit"
                }
            
        

Loyalty Program User Signup event request information

Body Parameters

Name Description Type Additional information
FirstName

First Name

string

None.

LastName

Last Name

string

None.

Phone

Phone

string

None.

Email

Email

string

None.

RegistrationSourceCode

Registration source code

string

Can be :

- "S" (Self-registration)

- "A" (API)

- "C" (Registered via control panel)

RegistrationSourceCodeDescription

Registration source code description

char

Can be :

- "Self-registration"

- "API"

- "Registered via control panel"

LoyaltyProgramId

Loyalty program ID

integer

None.

ExternalAccountId

And Id for the member in your external platform. Same as the "Member ID" field on the member registration screen.

string

None.

Birthday

Birthday

datetime

Can be null.

BirthdayYear

Birthday year

int

Can be null.

Gender

Gender

char

Can be :

- null

- "M" (Male)

- "F" (Female)

- "N" (Not Applicable)

GenderDescription

Gender description

string

Can be null

EventTypeCode

Event type code

char

For that webhook it always will be "S"

EventTypeDescription

Event type code description

string

For that webhook it always will be "Loyalty program user signup"

Sample request:

Request method : POST
            
            {
                "FirstName": "test firstname",
                "LastName": "test lastname",
                "Phone": "test phone",
                "Email": "test email",
                "RegistrationSourceCode": "S",
                "RegistrationSourceCodeDescription": "Self-registration",
                "LoyaltyProgramId": -1,
                "EventTypeCode": "S",
                "EventTypeDescription": "Loyalty program user signup",
                "Birthday": "2014-10-01T11:20:40.2131887Z",
                "BirthdayYear": 2014,
                "Gender": "M",
                "GenderDescription": "Male",
                "ExternalAccountId": "external Id"
            }
            
        

Loyalty Program Member Information Changed event request information

Body Parameters

Name Description Type Additional information
UpdatedMember

Updated member info

WebHookLoyaltyProgramMember

None.

PreviousMemberInfo

Previous member info

WebHookLoyaltyProgramMember

None.

EventTypeCode

Event type code

char

For that webhook it always will be "P"

EventTypeDescription

Event type code description

string

For that webhook it always will be "Loyalty program member information changed"

Sample request:

Request method : POST
            
                	
                
                    {
                        "UpdatedMember": {
                            "Id": "00000000-0000-0000-0000-000000000000",
                            "FirstName": "test firstname changed",
                            "LastName": "test lastname changed",
                            "Phone": "test phone changed",
                            "Email": "test email changed",
                            "Birthday": "2014-10-02T09:44:55.7846751Z",
                            "BirthdayYear": 2014,
                            "Gender": "M",
                            "GenderDescription": "Male",
                            "Notes": "test notes changed",
                            "StatusCode": "D",
                            "StatusCodeDescription": "Disabled",
                            "ExternalAccountId": "external Id"
                        },
                        "PreviousMemberInfo": {
                            "Id": "00000000-0000-0000-0000-000000000000",
                            "FirstName": "test firstname",
                            "LastName": "test lastname",
                            "Phone": "test phone",
                            "Email": "test email",
                            "Birthday": "2014-10-01T09:44:55.7806731Z",
                            "BirthdayYear": 2014,
                            "Gender": "M",
                            "GenderDescription": "Male",
                            "Notes": "test notes",
                            "StatusCode": "A",
                            "StatusCodeDescription": "Active",
                            "ExternalAccountId": "external Id changed"
                        },
                        "LoyaltyProgramId": -1,
                        "EventTypeCode": "P",
                        "EventTypeDescription": "Loyalty program member information changed"
                    }
                
            
        

Loyalty Program Transaction event request information

Body Parameters

Name Description Type Additional information
LoyaltyProgramId

Loyalty program ID

integer

None.

Amount

Amount

double

None.

TransactionDateTimeUTC

Transaction create datetime in UTC

datetime

None.

TransactionTypeCode

Transaction type code

char

Can be :

- "P" - Points Submission

- "R" - Redemption

- "C" - Correction

- "M" - Member Bonus

TransactionTypeCodeDescription

Transaction type code description

string

Can be :

- "Points Submission"

- "Redemption"

- "Correction"

- "Member Bonus"

StoreNumber

Store Number

string

None.

Invoice

Invoice #

string

None.

Reward

Reward info

Reward

None.

Member

Member info

Member

None.

Employee

Employee info

Employee

None.

Action

Action info

Action

None.

EventTypeCode

Event type code

char

For that webhook it always will be "T"

EventTypeDescription

Event type code description

string

For that webhook it always will be "Loyalty program transaction"

Sample request:

Request method : POST
            
                	
                {
                    "LoyaltyProgramId": -1,
                    "Amount": 200,
                    "Points": 100,
                    "TransactionDateTimeUTC": "2014-09-19T20:01:42.1766614Z",
                    "TransactionTypeCode": "C",
                    "TransactionTypeCodeDescription": "Correction",
                    "StoreNumber": "StoreNumber",
                    "Invoice": "Invoice #",
                    "Reward": {
                        "Id": 100,
                        "LoyaltyProgramId": 1,
                        "Name": "Reward name",
                        "Description": "Reward Description",
                        "Expired": "2014-09-19T23:01:42.1756614+03:00",
                        "Points": 100,
                        "RedeemCount": 100,
                        "StatusCode": "A",
                        "StatusCodeDescription": "Active"
                    },
                    "Member": {
                        "MemberStatus": {
                            "Id": -1,
                            "Name": "test member"
                        },
                        "PointBalance": 100,
                        "PointsTotalEarned": 100,
                        "Id": "00000000-0000-0000-0000-000000000000",
                        "FirstName": "test firstname",
                        "LastName": "test lastname",
                        "Email": 'test@test.com',
                        "Phone": "test phone",
                        "ExternalAccountID": null,
                        "Birthday": "2014-09-19T20:01:42.1736613Z",
                        "BirthdayYear": 2014,
                        "Gender": "M",
                        "GenderDescription": "Male",
                        "Notes": "test notes",
                        "StatusCode": "A",
                        "StatusCodeDescription": "Active"
                    },
                    "Employee": {
                        "Id": "00000000-0000-0000-0000-000000000000",
                        "FirstName": "test firstname",
                        "LastName": "test lastname",
                        "Email": 'test@test.com',
                        "Phone": "test phone",
                        "ExternalAccountID": null,
                        "Notes": "test notes",
                        "StatusCode": "A",
                        "StatusCodeDescription": "Active"
                    },
                    "Action": {
                        "ActionId": 200,
                        "Name": "Action name",
                        "Description": "Action description"
                    },
                    "EventTypeCode": "T",
                    "EventTypeDescription": "Loyalty program transaction"
                }
            
        

Basic Account Created event request information

Body Parameters

Name Description Type Additional information
Id

Account Id

globally unique identifier

None.

ExternalId

Id for this account in your system (if you keep a list of accounts in your own system)

integer

None.

FirstName

First name

string

None.

LastName

Last name

string

None.

Email

Email

string

None.

AccountPlanId

Account plan id

integer

None.

EventTypeCode

Event type code

char

For that webhook it always will be "C"

EventTypeDescription

Event type code description

string

For that webhook it always will be "Basic account created"

Sample request:

Request method : POST
            
                {
                    "Id": "fa516117-9d6a-4eb0-b5c1-0ca80db618c4",
                    "ExternalId": "externalid",
                    "FirstName": "First name",
                    "LastName": "Last name",
                    "Email": "Email",
                    "AccountPlanId": 1,
                    "EventTypeCode": "C",
                    "EventTypeDescription": "Basic account created"
                }