Transport Service¶
A Transport Service is a booked instance of a transport product.
These services are to be created when one wishes to have transfer services from airport to hotel, or vice versa for a particular booking.
To book a transport service, you’ll want to ensure the following:
The booking must have a non-
Cancelled
(orExpired
)departure_service
and that departure service must share at least one customer with those of the new transport service.The
product
(transport) you are booking must be referenced as anaddons
for the booked departure.
Additionally, you must ensure the transport is being booked on or near the beginning of the tour. Each transport
has specific rules around how far from the start_date
or finish_date
of a tour it can be booked. Any such rules that are
not met will be returned as part of an error response via the G API.
XML Schema:
POST: Create a Transport Service
PATCH: Update a Transport Service
Fields
Name |
Type |
Description |
---|---|---|
id read-only |
String |
|
href read-only |
Field |
|
name read-only |
String |
The name of this service. |
status |
String |
The current status of the service:
Active service status transitions:
|
status_transitions read-only |
List |
A list of status values to which this service can transition. |
type read-only |
String |
The type of this resource. |
sub_type read-only |
String |
A brief description of this service type. |
start_date read-only |
Date |
The start date of this service. |
finish_date read-only |
Date |
The finish date of this service. |
customers |
Field |
|
|
String |
|
|
Field |
|
|
Nested Object |
|
|
String |
Legal first name as it appears on a passport. |
|
String |
Legal middle name as it appears on a passport. |
|
String |
Legal last name as it appears on a passport. |
|
String |
The name this person likes to be called if different from their legal name. |
|
String |
The title. Valid values are: Mr, Mrs, Ms, and Miss |
date_created read-only |
Datetime |
The date/time this service was created, in the standard Dates & Times. |
date_confirmed read-only |
Datetime |
The date/time this service had its service status set to Confirmed, in the standard Dates & Times. |
date_cancelled read-only |
Datetime |
The date/time this service had its service status set to Cancelled, in the standard Dates & Times. |
option_expiry_date read-only |
Datetime |
The date/time when an Option service status will automatically be set to Expired, in the standard Dates & Times. |
purchase_price read-only |
Decimal |
The currency-specific purchase price this service was Confirmed at, in the standard Currencies & Prices. The price reflected includes any promotions applied. The price is not locked until the service has its service status set to Confirmed (i.e. the price could change when the service status is on Option). |
commission read-only |
Decimal |
The currency-specific commission amount that the booking agent will receive for this service, in the standard Currencies & Prices. |
applied_promotion |
Nested Object |
|
|
String |
|
|
Field |
|
|
String |
The name of the promotion used. |
|
String |
A unique code for this promotion. |
|
Decimal |
The currency-specific amount that has been discounted from the purchase_price. Add the discount_amount and purchase_price to see the original non-discounted price. |
|
Integer |
The commission rate for this promotion. |
|
String |
|
flags read-only |
List |
A list of codes that, when present, require special considerations for a booked service. The list of departure service flags related to the current status of a request to hike the Inca Trail, or the option booked for services on these special departures: Service Status Flags
Inca Trail Flags
|
booking read-only |
Reference Object |
|
documents read-only |
Field |
|
|
String |
|
|
Field |
|
|
Datetime |
The time when the resource was created, in the standard Dates & Times. |
|
String |
The document type, currently: INVOICE, ATOL_CERTIFICATE, VOUCHER. |
|
String |
The intended audience of this document. Either |
|
Reference Object |
The related booking resource. |
|
String |
The Internet media type. |
declined_reason read-only |
Reference Object |
The related declined reason resource. |
pickup_time read-only |
Time |
The local pickup time for the transport service. |
flight_number read-only |
String |
For a transport of |
product read-only |
Reference Object |
A reference to the product itself |
associated_services |
List |
Get a Transport Service¶
- GET /transport_services/(string: service_id)/¶
Create a Transport Service¶
- POST /transport_services/¶
Example request:
POST /transport_services/ HTTP/1.1 Host: rest.gadventures.com Accept: application/json Content-Type: application/json { "start_date": "2013-12-25", "customers": [ { "id": "1322812" } ], "booking": { "id": "628072" }, "product": { "id": "553" }, }Example response:
HTTP/1.1 201 CREATED Content-Type: application/json { "id": "1161864", "href": "/transport_services/1161864", "name": "Airport to Hotel Transfer (Havana)", "status": "Option", "type": "transport_services", "sub_type": "Transfer", "start_date": "2013-10-05", "finish_date": "2013-10-05", "customers": [ { "id": "1322812", "href": "/customers/1322812", "name": { "legal_first_name": "Aerolite", "legal_last_name": "Cowboyed", "legal_middle_name": null, "common_name": null, "title": "Mr" }, } ], "date_created": "2013-08-01T16:32:41Z", "date_confirmed": null, "date_cancelled": null, "option_expiry_date": "2013-08-05T16:29:45Z", "purchase_price": "65.00", "commission": "0.00", "applied_promotion": null, "flags": [], "booking": { "id": "628072", "href": "/bookings/628072" }, "documents": null, "product": { "id": 553, "href": "/transports/553", "name": "Airport to Hotel Transfer (Havana)" }, "pickup_time": "11:21", "flight_number": "AC1234" }
Update a Transport Service¶
- PATCH /transport_services/(string: service_id)/¶
Example request:
PATCH /transport_services/1161864/ HTTP/1.1 Host: rest.gadventures.com Accept: application/json Content-Type:application/json { "status": "Request Cancellation", }Example response:
HTTP/1.1 200 OK Content-Type: application/json { "id": "1161864", "href": "/transport_services/1161864", "name": "Airport to Hotel Transfer (Havana)", "status": "Request Cancellation", "type": "transport_services", "sub_type": "Transfer", "start_date": "2013-10-05", "finish_date": "2013-10-05", "customers": [ { "id": "1322812", "href": "/customers/1322812", "name": { "legal_first_name": "Aerlite", "legal_last_name": "Cowboyed", "legal_middle_name": null, "common_name": null, "title": "Mr" }, } ], "date_created": "2013-08-01T16:32:41Z", "date_confirmed": null, "date_cancelled": null, "option_expiry_date": "2013-08-05T16:29:45Z", "purchase_price": "65.00", "commission": "0.00", "applied_promotion": null, "flags": [], "booking": { "id": "628072", "href": "/bookings/628072" }, "documents": null, "product": { "id": 553, "href": "/transports/553", "name": "Airport to Hotel Transfer (Havana)" }, "pickup_time": "11:21", "flight_number": "AC1234" }