Append booking data

Overview

Airship can store full table booking history for each contact.
Having booking data attached to contacts is useful to measure and target recent or lapsed visitors based on their last visit.

Storing bookings

To store booking history, simply append a bookings object to your contact as you send it to us.
Field
Notes
source_id
1 = Website
9 = In House
10 = Third Party
etc.
You can also retrieve booking source IDs from the /booking/sources endpoint.
stage_value
1 = New
100 = Complete
550 = Cancelled
You can also retrieve stage values from `booking/stage_values` endpoint. We use ranges to represent more granular booking stages, though the three values above satisfy most requirements.
unit_id
The unit_id representing the physical location for which this booking relates.
type_id
13 = General Booking
You can also map more granular booking types using a type retrieved from the booking_types endpoint.
1
"account_id": 3,
2
"email: "[email protected].com",
3
//...etc...
4
5
"bookings" : [
6
{
7
"source_id" : 1, // Website, In-house etc.
8
"party_size" : 10, // how many guests in this booking
9
"stage_value" : 1, // New, complete, cancelled etc
10
"type_id" : 2, // General booking, Birthday etc.
11
"unit_id" : 67,
12
"party_datetime" : "2021-04-27 20:30:00", // seated date
13
"party_enquirytime" : "2021-04-27 21:00:06", // enquiry date
14
"deposit_paid" : 0, // if applicable
15
"hpbr_drink" : 0, // deposit split against drink
16
"hpbr_food" : 0, // deposit split against food
17
"hpbr_entertainment" : 0, // deposit split against entertainment
18
"data_element_01" : "4355-GH3TG-AERA", // custom field - e.g. booking reference
19
"notes" : [ // optional notes
20
{
21
"note" : "Test note on bookingID 5",
22
"time : "2021-04-27 21:00:06"
23
}
24
]
25
}
26
]
Copied!

What are data_elements?

Data elements can store any alphanumeric string, so are, in effect, placeholders for any custom data you wish to store. The most common use-case is to use one to store an external booking reference from your booking system, as shown in the example above.