Booking Modified & Booking Status Change

The Booking Modified webhook event is triggered whenever a booking is created or modified, and the Booking Status Change webhook event is triggered whenever a booking status is altered. These events may occur simultaneously in some circumstances, and both are triggered whenever a booking status is changed. Using both of these events on the same webhook endpoint URL is discouraged.

A JSON, XML, or x-www-form-urlencoded object containing the following export fields can be found in directly in the raw body of the POST request to your server:

booking

Field

Type

Description

status

string

The current status code of the booking

code

string

A unique booking code used to refer to the booking

created_date

timestamp

The date on which the booking was created

staff_id

integer

Account ID of the staff account used to create the booking

source_ip

string

The IP address used to create the booking

start_date

timestamp

The start date/time of the booking, based on order items

end_date

timestamp

The end date/time of the booking, based on order items

customer

array

Customer details attached to the booking (See booking.customer below)

meta

array

A set of fields containing your custom parameters and other info

order

array

Details on booking items and payment. See booking.order below

tid

string

Details on the Tracking ID used for referral & campaign tracking

booking.customer

Field

Type

Description

code

string

The customer’s unique account code

customer_name

string

The customer’s full name

customer_email

string

The customer’s email address

customer_address

string

The customer’s street address

customer_region

string

The customer’s province or state

customer_country

string

The customer’s country of residence

customer_postal_zip

string

The customer’s postal or zip code

customer_phone

string

The customer’s phone number

booking.fields

Contains each of the form fields associated with a booking.

booking.order

Field

Type

Description

sub_total

float

The sub-total of all charges added to the order

paid_total

float

The total amount the customer has paid on the order

total

float

The total of all charges and taxes added to the order

tax_total

float

The sum of all taxes applied to the order

taxes

array

Individual taxes that have been applied to the order, their names, and amounts

discount

float

The amount that has been discounted from the order total (if applicable)

items

array

Details on items included in the order (See booking.order.items.item below)

booking.order.items.item

An entry for each item in the booking will contain following fields:

Field

Type

Description

start_date

timestamp

The start date of the booking item

end_date

timestamp

The end date of the booking item

sku

string

The unique stock keeping unit of the item

slip

string

The booking slip attached to the item

package

integer

The package the item belongs to (if applicable)

status

string

The booking status of the item

total

float

The total price of the booking item

tax_total

float

The sum of taxes applied to this item

qty

integer

The quantity of this item in the booking

Sample Booking Notification

JSON

 1{
 2    "@attributes": {
 3        "version": "3.0",
 4        "host": "your-company.checkfront.com"
 5    },
 6    "booking": {
 7        "@attributes": {
 8            "booking_id": "157"
 9        },
10        "status": "HOLD",
11        "code": "KMVQ-060314",
12        "tid": {},
13        "created_date": "1394156618",
14        "staff_id": "1",
15        "source_ip": "66.228.55.142",
16        "start_date": "1394128800",
17        "end_date": "1394128800",
18        "customer": {
19            "code": "BT5-386-579",
20            "name": "Your Customer",
21            "email": "support@checkfront.com",
22            "region": "BC",
23            "address": "170-422 Richards Street",
24            "city": "Vancouver",
25            "country": "CA",
26            "phone": "1 (800) 559-0985",
27            "postal_zip": "V6B 2Z4"
28        },
29        "fields": {
30            "customer_name": "Your Customer",
31            "customer_email": "support@checkfront.com",
32            "customer_region": "BC",
33            "customer_address": "170-422 Richards Street",
34            "customer_city": "Vancouver",
35            "customer_country": "CA",
36            "customer_phone": "1 (800) 559-0985",
37            "customer_postal_zip": "V6B 2Z4",
38            "request": "Blue paddleboard if available, please."
39        },
40        "meta": {
41            "note": "Free icecream!",
42            "mobile_device": {}
43        },
44        "order": {
45            "@attributes": {
46                "currency_id": "CAD"
47            },
48            "sub_total": "46.00",
49            "tax_total": "2.30",
50            "paid_total": "0.00",
51            "total": "48.30",
52            "taxes": {
53                "tax": {
54                    "@attributes": {
55                        "tax_id": "6"
56                    },
57                    "name": "GST",
58                    "amount": "2.30"
59                }
60            },
61            "items": {
62                "item": [
63                    {
64                        "@attributes": {
65                            "line_id": "1",
66                            "item_id": "6"
67                        },
68                        "start_date": "1394128800",
69                        "end_date": "1394128800",
70                        "sku": "paddle",
71                        "slip": {},
72                        "package_id": "1",
73                        "status": "HOLD",
74                        "total": "6.30",
75                        "tax_total": "0.30",
76                        "qty": "2"
77                    },
78                    {
79                        "@attributes": {
80                            "line_id": "2",
81                            "item_id": "8"
82                        },
83                        "start_date": "1394092800",
84                        "end_date": "1394092800",
85                        "sku": "paddleboard",
86                        "slip": {},
87                        "package_id": "1",
88                        "status": "HOLD",
89                        "total": "42.00",
90                        "tax_total": "2.00",
91                        "qty": "2"
92                    }
93                ]
94            }
95        }
96    }
97}

XML

 1<?xml version="1.0" ?>
 2<checkfront-notify version="3.0" host="your-company.checkfront.com">
 3    <booking booking_id="157">
 4        <status>HOLD</status>
 5        <code>KMVQ-060314</code>
 6        <tid/>
 7        <created_date>1394156618</created_date>
 8        <staff_id>1</staff_id>
 9        <source_ip>66.228.55.142</source_ip>
10        <start_date>1394128800</start_date>
11        <end_date>1394128800</end_date>
12        <customer>
13            <code>BT5-386-579</code>
14            <name>Your Customer</name>
15            <email>support@checkfront.com</email>
16            <region>BC</region>
17            <address>170-422 Richards Street</address>
18            <city>Vancouver</city>
19            <country>CA</country>
20            <phone>1 (800) 559-0985</phone>
21            <postal_zip>V6B 2Z4</postal_zip>
22        </customer>
23        <fields>
24            <customer_name>Your Customer</customer_name>
25            <customer_email>support@checkfront.com</customer_email>
26            <customer_region>BC</customer_region>
27            <customer_address>170-422 Richards Street</customer_address>
28            <customer_city>Vancouver</customer_city>
29            <customer_country>CA</customer_country>
30            <customer_phone>1 (800) 559-0985</customer_phone>
31            <customer_postal_zip>V6B 2Z4</customer_postal_zip>
32            <request>Blue paddleboard if available, please.</request>
33        </fields>
34        <meta>
35            <note>Free icecream!</note>
36            <mobile_device></mobile_device>
37        </meta>
38        <order currency_id="CAD">
39            <sub_total>46.00</sub_total>
40            <tax_total>2.30</tax_total>
41            <paid_total>0.00</paid_total>
42            <total>48.30</total>
43            <taxes>
44                <tax tax_id="6">
45                    <name>GST</name>
46                    <amount>2.30</amount>
47                </tax>
48            </taxes>
49            <discount>0.00</discount>
50            <items>
51                <item line_id="1" item_id="6">
52                    <start_date>1394128800</start_date>
53                    <end_date>1394128800</end_date>
54                    <sku>paddle</sku>
55                    <slip/>
56                    <package_id>1</package_id>
57                    <status>HOLD</status>
58                    <total>6.30</total>
59                    <tax_total>0.30</tax_total>
60                    <qty>2</qty>
61                </item>
62                <item line_id="2" item_id="8">
63                    <start_date>1394092800</start_date>
64                    <end_date>1394092800</end_date>
65                    <sku>paddleboard</sku>
66                    <slip/>
67                    <package_id>1</package_id>
68                    <status>HOLD</status>
69                    <total>42.00</total>
70                    <tax_total>2.00</tax_total>
71                    <qty>2</qty>
72                </item>
73            </items>
74        </order>
75    </booking>
76</checkfront-notify>