The Booking object
| Attribute | Type | Description |
|---|---|---|
| id | string | The unique identifier for the booking. |
| modified | string | The time this booking was last modified. |
| start | string | The start time of the booking (e.g. earliest departure). |
| end | string | The end time of the booking (e.g. latest arrival). |
| type | string | The service type of the booking.
|
| status | string | The status of the booking.
|
| trip_id | string | The id of the trip this booking belongs to. |
| references | array[object] | References to this booking used by external entities. Check table below for more information. |
| location | object | The service location. Populated when type is hotel or car. Check Booking Location Object below. |
| drop_off_location | object | Only for Car Bookings, null otherwise. The drop off location for the car. Check Booking Location Object below. |
| legs | array[object] | The transport legs. Populated when type is flight or train. Check table below for more information. |
Booking reference object
The JSON examples below contain all potential references that may be present, dependent on Booking type.
| Attribute | Type | Description |
|---|---|---|
| type | string | How to interpret the reference value.
|
| value | string | Reference value. |
Booking location object
| Attribute | Type | Description |
|---|---|---|
| latitude | string | Latitude in degrees. |
| longitude | string | Longitude in degrees. |
| iata_code | string | IATA airport code if applicable, null otherwise. |
| name | string | Name of the location |
| address | string | Address information |
Booking leg objects
| Attribute | Type | Description |
|---|---|---|
| segments | array[object] | Array of segments. Check table below for more information. |
Booking segment object
A journey in a single vehicle
| Attribute | Type | Description |
|---|---|---|
| origin | object | A waypoint. Check table below for more information. |
| destination | object | A waypoint. Check table below for more information. |
| external_id | string | The journey identifier, such as a flight number. |
Booking waypoint (origin or destination) object
origin or destination) object| Attribute | Type | Description |
|---|---|---|
| location | object | Check table describing Booking location above for more information. |
| time | string | Departure or arrival time in the local time with offset. |
{
"id":"71",
"start":"2021-03-06T00:00:00+00:00",
"end":"2021-03-09T00:00:00+00:00",
"type":"hotel",
"status":"ticketed",
"modified":"2021-02-22T11:11:20.714987+00:00",
"trip_id":"51",
"references":[
{
"type":"confirmation_number",
"value":"4636"
}
],
"location":{
"name": "hotel name",
"address": "hotel address",
"latitude":"59.5468062",
"longitude":"113.9913155",
"iata_code":null
},
"drop_off_location":null,
"legs":null
}{
"id":"73",
"start":"2021-03-06T00:00:00+00:00",
"end":"2021-03-09T00:00:00+00:00",
"type":"car",
"status":"ticketed",
"modified":"2021-02-22T11:11:20.714987+00:00",
"trip_id":"51",
"references":[
{
"type":"voucher_code",
"value":"voucher_12"
},
{
"type":"confirmation_number",
"value":"cn_17"
}
],
"location":{
"latitude":-56.0,
"longitude":-62.0,
"iata_code":null,
"name": "station name",
"address": "station address"
},
"drop_off_location":{
"latitude":-66.0,
"longitude":-72.0,
"iata_code":null,
"name": "drop off station name",
"address": "drop off station address"
},
"legs":null
}{
"id":"70",
"start":"2021-03-06T00:00:00+00:00",
"end":"2021-03-09T00:00:00+00:00",
"type":"flight",
"status":"ticketed",
"modified":"2021-02-22T11:11:20.714987+00:00",
"trip_id":"51",
"references":[
{
"type":"PNR",
"value":"HNTCEBSMPO"
}
],
"location":null,
"drop_off_location":null,
"legs":[
{
"segments":[
{
"origin":{
"location":{
"latitude":"85.5975436",
"longitude":"18.7959996",
"iata_code":"UYM",
"name": "Airport name",
"address": null
},
"time":"2021-03-06T00:00:00+01:00"
},
"destination":{
"location":{
"latitude":"-54.3854772",
"longitude":"81.6402173",
"iata_code":"EKD",
"name": "Airport name",
"address": null
},
"time":"2021-03-07T12:00:00+01:00"
},
"external_id":"XX1234"
},
{
"origin":{
"location":{
"latitude":"67.1291014",
"longitude":"21.1347543",
"iata_code":"IWP",
"name": "Airport name",
"address": null
},
"time":"2021-03-08T00:00:00+01:00"
},
"destination":{
"location":{
"latitude":"8.6677113",
"longitude":"-13.9691879",
"iata_code":"TMQ",
"name": "Airport name",
"address": null
},
"time":"2021-03-09T12:00:00+01:00"
},
"external_id":"XX1234"
}
]
},
{
"segments":[
{
"origin":{
"location":{
"latitude":"23.5841460",
"longitude":"-141.9148137",
"iata_code":"UJH",
"name": "Airport name",
"address": null
},
"time":"2021-03-10T12:00:00+01:00"
},
"destination":{
"location":{
"latitude":"-6.0933315",
"longitude":"-7.6775088",
"iata_code":"ZVO",
"name": "Airport name",
"address": null
},
"time":"2021-03-11T00:00:00+01:00"
},
"external_id":"XX1234"
},
{
"origin":{
"location":{
"latitude":"78.4132615",
"longitude":"-156.7342795",
"iata_code":"OJR",
"name": "Airport name",
"address": null
},
"time":"2021-03-12T12:00:00+01:00"
},
"destination":{
"location":{
"latitude":"-44.6617225",
"longitude":"163.2773819",
"iata_code":"YNX",
"name": "Airport name",
"address": null
},
"time":"2021-03-13T00:00:00+01:00"
},
"external_id":"XX1234"
}
]
}
]
}{
"id":"72",
"start":"2021-03-06T00:00:00+00:00",
"end":"2021-03-09T00:00:00+00:00",
"type":"train",
"status":"ticketed",
"modified":"2021-02-22T11:11:20.714987+00:00",
"trip_id":"51",
"references":[
{
"type":"ticket_collection_reference",
"value":"PMXFIQ"
}
],
"location":null,
"drop_off_location":null,
"legs":[
{
"segments":[
{
"origin":{
"location":{
"latitude":"-73.000000000",
"longitude":"-26.000000000",
"iata_code":null,
"name": "Train station name",
"address": "Train station address"
},
"time":"2021-03-06T00:00:00+00:00"
},
"destination":{
"location":{
"latitude":"-30.000000000",
"longitude":"83.000000000",
"iata_code":null,
"name": "Train station name",
"address": "Train station address"
},
"time":"2021-03-09T00:00:00+00:00"
},
"external_id":"XX1234"
}
]
}
]
}Our spectacular Customer Care team may book a service that is not automated in the Perk platform, such as an airport transfer. In these cases, the Booking type will be other. Note that unlike Trip, when a Booking is cancelled, start and end will retain their values.
{
"id":"118",
"start":"2021-03-06T00:00:00+00:00",
"end":"2021-03-07T00:00:00+00:00",
"type":"other",
"status":"cancelled",
"modified":"2021-03-06T11:12:12.071963+00:00",
"trip_id":"63",
"references":[
],
"location":null,
"drop_off_location":null,
"legs":null
}
