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