Webhooks

There are currently a few types of webhooks supported including NEW_ORDER, NEW_CONTACT, UPDATED_ORDER, CANCELED_ORDER. THe webhook are send to the configured endpoint with the specified content type as HTTP POST calls. Webhooks payload is using the same model as Rezdy Public API. The request body is either a booking object for order webhooks or a customer object for contact webhooks.

NEW_ORDER

The webhook is fired whenever a new order is created regardless of the source - if it's API, Internal or Online order

UPDATE_ORDER

The webhook is fired whenever an existing order is updated regardless of the change.

Rezdy does not calculate any differences between the previous and the current order model, nor provides any indication what kind of update fired the webhook, therefore this has to be calculated by the webhook listener. Furthermore, the payload of the updated order does not necessarily need to be different than the previous one, since not every order change will cause a modification of the exposed public model.

CANCELED_ORDER

The webhook is fired whenever an order is cancelled regardless of the cancellation source - if the status change has been done internally by the supplier or by the reseller.

NEW_CONTACT

The webhook is fired whenever a new contact is created regardless of the source - internally or by a new order.

A new order can trigger both NEW_ORDER and NEW_CONTACT webhook in case of a new customer which is not matched among the existing contacts.

Webhook listener response

A webhook listener has to respond to a webhook with a successful HTTP response code including 200, 201, 202 or 204, otherwise the webhook call will be retried for a multiple times (currently 5 times) until its suspended.

For each configured webhook, if an execution fails consequently more than 30 times (be aware this limit can be reached by 6 webhook calls, which are 5 times retried), the webhook will be be disabled and alert e-mail will be send to the company e-mail address. The webhook has to be then manually activated via the Webhook configuration screen.

NEW_CONTACT sample payload

Request JSON format

POST [configured endpoint] 

Headers:

Accept: application/json,application/xml
Content-Type: application/json

Body:

{
    "id": 9873,
    "firstName": "Homer",
    "middleName": "",
    "lastName": "Simpson",
    "name": "Homer Simpson",
    "email": "homersimpson.3@rezdy.com",
    "companyName": "",
    "phone": "+61484123456",
    "mobile": "",
    "fax": "",
    "skype": "",
    "preferredLanguage": "",
    "marketing": false,
    "aboutUs": "",
    "addressLine": "",
    "postCode": "",
    "city": "",
    "state": "",
    "countryCode": ""
}

Response

Headers (Content-Type application/json or application/xml):

Content-Type: application/json

HTTP response code (any of 200, 201, 202, 204):

200 OK

Body (arbitrary):

{}

Request XML format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customer
    xmlns="https://api.rezdy.com/v1">
    <id>9872</id>
    <firstName>Homer</firstName>
    <middleName></middleName>
    <lastName>Simpson</lastName>
    <name>Homer Simpson</name>
    <email>homersimpson.2@rezdy.com</email>
    <companyName></companyName>
    <phone>+61484123456</phone>
    <mobile></mobile>
    <fax></fax>
    <skype></skype>
    <preferredLanguage></preferredLanguage>
    <marketing>false</marketing>
    <aboutUs></aboutUs>
    <addressLine></addressLine>
    <postCode></postCode>
    <city></city>
    <state></state>
    <countryCode></countryCode>
</customer>

NEW_ORDER, UPDATE_ORDER, CANCELED_ORDER sample payload

Request JSON format

POST [configured endpoint] 

Headers:

Accept: application/json,application/xml
Content-Type: application/json

Body:

{
    "orderNumber": "DU000157",
    "status": "PENDING_SUPPLIER",
    "supplierId": 9401,
    "supplierName": "Homer",
    "resellerId": 1075,
    "resellerName": "Rezdy Demo",
    "customer": {
        "id": 9870,
        "firstName": "Homer",
        "lastName": "Simpson",
        "name": "Homer Simpson",
        "email": "homersimpson@rezdy.com",
        "mobile": "+61484123456"
    },
    "items": [
        {
            "productName": "AnyDate",
            "productCode": "PZJFH4",
            "startTime": "2017-08-16T09:00:00Z",
            "startTimeLocal": "2017-08-16 19:00:00",
            "quantities": [
                {
                    "optionLabel": "Group from 1 to 2",
                    "optionPrice": 100,
                    "value": 1
                }
            ],
            "totalQuantity": 1,
            "amount": 100,
            "extras": [],
            "participants": [
                {
                    "fields": [
                        {
                            "label": "First Name",
                            "value": "Homer"
                        },
                        {
                            "label": "Last Name",
                            "value": "Simpson"
                        },
                        {
                            "label": "Gender",
                            "value": ""
                        }
                    ]
                }
            ],
            "transferReturn": false,
            "subtotal": 107,
            "vouchers": [],
            "totalItemTax": 7
        }
    ],
    "totalAmount": 109.14,
    "totalCurrency": "AUD",
    "totalPaid": 107,
    "totalDue": 2.1399994,
    "dateCreated": "2018-07-31T00:02:39Z",
    "dateUpdated": "2018-07-31T02:22:44Z",
    "datePaid": "2018-07-31T00:02:42Z",
    "dateReconciled": "2018-07-31T00:02:39Z",
    "comments": "",
    "internalNotes": "",
    "payments": [
        {
            "type": "REZDY_PAYOUTS",
            "amount": 10,
            "currency": "AUD",
            "date": "2018-07-31T00:02:42Z",
            "label": "STRIPE Application Fee: ch_1CtlK0IQxFAfFTHyKDGRlqd5",
            "recipient": "REZDY"
        },
        {
            "type": "REZDY_PAYOUTS",
            "amount": 97,
            "currency": "AUD",
            "date": "2018-07-31T00:02:42Z",
            "label": "STRIPE: ch_1CtlK0IQxFAfFTHyKDGRlqd5",
            "recipient": "SUPPLIER"
        }
    ],
    "fields": [
        {
            "label": "How did you hear about us?",
            "value": "Internet"
        }
    ],
    "source": "MARKETPLACE_PREF_RATE",
    "resellerSource": "API",
    "sourceChannel": "REZDYDEMO",
    "resellerComments": "REZDYDEMO order",
    "surcharge": 2.14,
    "commission": 10,
    "vouchers": [],
    "paymentOption": "CREDITCARD",
    "resellerReference": ""
}

Response

Headers (Content-Type application/json or application/xml):

Content-Type: application/json

HTTP response code (any of 200, 201, 202, 204):

200 OK

Body (arbitrary):

{}

Request XML format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<booking
    xmlns="https://api.rezdy.com/v1">
    <orderNumber>DU000157</orderNumber>
    <status>PENDING_SUPPLIER</status>
    <supplierId>9401</supplierId>
    <supplierName>Dusan</supplierName>
    <resellerId>1075</resellerId>
    <resellerName>Rezdy Demo</resellerName>
    <customer>
        <id>9870</id>
        <firstName>Homer</firstName>
        <lastName>Simpson</lastName>
        <name>Homer Simpson</name>
        <email>homersimpson@rezdy.com</email>
        <mobile>+61484123456</mobile>
    </customer>
    <items>
        <item>
            <productName>AnyDate</productName>
            <productCode>PZJFH4</productCode>
            <startTime>2017-08-16T09:00:00Z</startTime>
            <startTimeLocal>2017-08-16 19:00:00</startTimeLocal>
            <quantities>
                <quantity>
                    <optionLabel>Group from 1 to 2</optionLabel>
                    <optionPrice>100.0</optionPrice>
                    <value>1</value>
                </quantity>
            </quantities>
            <totalQuantity>1</totalQuantity>
            <amount>100.0</amount>
            <extras/>
            <participants>
                <participant>
                    <fields>
                        <field>
                            <label>First Name</label>
                            <value>Homer</value>
                        </field>
                        <field>
                            <label>Last Name</label>
                            <value>Simpson</value>
                        </field>
                        <field>
                            <label>Gender</label>
                            <value></value>
                        </field>
                    </fields>
                </participant>
            </participants>
            <transferReturn>false</transferReturn>
            <subtotal>107.0</subtotal>
            <vouchers/>
            <totalItemTax>7.0</totalItemTax>
        </item>
    </items>
    <totalAmount>109.14</totalAmount>
    <totalCurrency>AUD</totalCurrency>
    <totalPaid>107.0</totalPaid>
    <totalDue>2.1399994</totalDue>
    <dateCreated>2018-07-31T00:02:39Z</dateCreated>
    <dateUpdated>2018-07-31T02:28:18Z</dateUpdated>
    <datePaid>2018-07-31T00:02:42Z</datePaid>
    <dateReconciled>2018-07-31T00:02:39Z</dateReconciled>
    <comments></comments>
    <internalNotes></internalNotes>
    <payments>
        <payment>
            <type>REZDY_PAYOUTS</type>
            <amount>10.0</amount>
            <currency>AUD</currency>
            <date>2018-07-31T00:02:42Z</date>
            <label>STRIPE Application Fee: ch_1CtlK0IQxFAfFTHyKDGRlqd5</label>
            <recipient>REZDY</recipient>
        </payment>
        <payment>
            <type>REZDY_PAYOUTS</type>
            <amount>97.0</amount>
            <currency>AUD</currency>
            <date>2018-07-31T00:02:42Z</date>
            <label>STRIPE: ch_1CtlK0IQxFAfFTHyKDGRlqd5</label>
            <recipient>SUPPLIER</recipient>
        </payment>
    </payments>
    <fields>
        <field>
            <label>How did you hear about us?</label>
            <value>Internet</value>
        </field>
    </fields>
    <source>MARKETPLACE_PREF_RATE</source>
    <resellerSource>API</resellerSource>
    <sourceChannel>REZDYDEMO</sourceChannel>
    <resellerComments>REZDYDEMO order</resellerComments>
    <surcharge>2.14</surcharge>
    <commission>10.0</commission>
    <vouchers/>
    <paymentOption>CREDITCARD</paymentOption>
    <resellerReference></resellerReference>
</booking>