Fetch a Booking with booking reference
You can use this method to fetch a single booking using booking reference.
| Method | URL |
|---|---|
| GET | api/v3/transfers/bookings/<bref> |
<bref> refers to the ‘booking_reference’ returned in the booking response.
Error Codes
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 404 | 5121 | Booking not found |
| 200 | 2002 | Invalid Booking Reference |
Fetch Bookings List
You can use this method to fetch all bookings and cancellations.
| Method | URL |
|---|---|
| GET | api/v3/transfers/bookings |
Parameters
| Attribute | Type | Required | Description |
|---|---|---|---|
| filter_type | string | OPTIONAL | ‘booking_date’ to fetch bookings based on booking date ‘checkin_date’ to fetch bookings based on check-in date Defaults to ‘booking_date’ |
| start | date | OPTIONAL | The starting date for the given filter type |
| end | date | OPTIONAL, REQUIRED if ‘start’ is given. |
The end date for the given filter type |
| from | string | OPTIONAL | Booking reference of the starting item |
| count | integer | OPTIONAL REQUIRED if ‘from’ is given |
Number of bookings to fetch. Maximum value is 100. Defaults to 30 |
| direction | string | OPTIONAL REQUIRED if ‘from’ is given |
‘next’ to fetch the next ‘count’ bookings ‘prev’ to fetch the previous ‘count’ bookings |
| type | string | OPTIONAL | Type of the booking ‘B’ to fetch bookings ‘C’ to fetch cancellations When type is not specified, both types are fetched |
- Note: ‘start’ and ‘end’ date duration cannot exceed 30 days When no options are given, recent 30 bookings will be fetched (both types)
Sample Response
{
"total": 16,
"count": 16,
"bookings": [{
"transfer": {
"transfer_code": "T!000323487006",
"paxes": [{
"type": "AD",
"surname": "Patrick",
"pax_id": 2,
"name": "Henry"
},
{
"type": "AD",
"surname": "Patrick",
"pax_id": 1,
"name": "James"
}
],
"name": "London Gatwick Airport to a station in London with a Driver speaking the Local Language only",
"booking_items": [{
"vehicles": [{
"vehicle_name": "Standard Car",
"vehicle_code": "SA",
"preferred_language": "E",
"max_vehicle_occupancy": {
"max_pax": 2
},
"max_luggage": "2"
}],
"rate_comments": {
"transfer_conditions": "IMPORTANT: All infants and children must ride in an age and size appropriate child safety seat or booster seat. Customers are responsible for providing their own safety seats."
},
"price": 7650,
"pickup_details": {
"pickup_type": "A",
"pickup_code": "A!LGW",
"flight_number": "AI-123",
"arrival_time": "13.00",
"airport_name": "London Gatwick Airport"
},
"non_refundable": false,
"drop_details": {
"train_name": "test train",
"station_name": "Kings Cross/St Pancras Train Stations",
"dropoff_type": "S",
"dropoff_code": "S!000434",
"departure_time": "23.00"
},
"currency": "INR",
"cancellation_policy": {
"under_cancellation": false,
"details": [{
"from": "2017-10-08T00:00:00",
"flat_fee": 8500,
"currency": "INR"
}],
"cancel_by_date": "2017-10-07T23:59:59",
"amount_type": "value"
}
}]
},
"supports_cancellation": true,
"supports_amendment": false,
"search_id": "ueapctj5punmjdtopv3m3vncdi",
"price": {
"total": 7650,
"breakdown": {
"net": [{
"name": "Total",
"included": true,
"currency": "INR",
"amount_type": "value",
"amount": 7650
},
{
"name": "SupplierPrice",
"included": true,
"currency": "INR",
"amount_type": "value",
"amount": 7650
}
]
}
},
"pickup_time": "13:15:00",
"pickup_date": "2017-10-12",
"payment_type": "AT_WEB",
"payment_status": "pending",
"non_refundable": false,
"no_of_infants": 0,
"no_of_children": 0,
"no_of_adults": 2,
"nationality": "IN",
"holder": {
"title": "Mrs.",
"surname": "James",
"phone_number": "8801622227333",
"name": "Patrick",
"email": "jamie@abc.com"
},
"currency": "INR",
"booking_type": "B",
"booking_status": "",
"booking_reference": "ph2okd6bgzyvaeky23bu2n5lga",
"booking_name": "Booking Test",
"booking_id": "GRN-T-201707-000025",
"booking_date": "2017-07-06T01:39:12"
}]
}
Error Codes
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 200 | 2005 | Internal server error |
| 200 | 5128 | Field(type_1) is required when Field(type_2) is given |
| 200 | 5129 | Field(name) dates must be valid, and in ISO8601 format (YYYY-MM-DD) |
| 200 | 5130 | start and end date duration cannot exceed 30 days |
| 200 | 5131 | a maximum of 100 bookings can be viewed at a time |
| 200 | 5132 | type must be either B or C (Booking, Cancelled) |
| 200 | 5133 | filter_type type must be either booking_date or checkin_date |