Departure Services¶
A Departure Service is a booked instance of a departure product. If you are doing transactions via the G API, you’ll need to be creating departure services among other things.
We recommend reading Creating Your First Booking as it goes over the functions involved in building out a simple booking with services and customers.
References:
XML Schema:
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. |
product read-only |
Reference Object |
|
itinerary read-only |
Nested Object |
The itineraries for the departure of this service |
|
String |
|
|
String |
The unique identifier of a specific variation of this itinerary |
|
Field |
|
rooms |
Field |
A list of objects containing per customer rooming data for this service. |
|
String |
A unique code for this room that is used when creating a booking. This code will never change and can be used as an identifier. |
|
String |
The name of this room. |
|
Field |
A list of travellers that are booked on the service. Each service on a booking may have a different list of travellers. The list of travellers on a booking is the aggregate of the travellers on each service associated with the booking. |
|
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 |
deposit read-only |
String |
This is the entire deposit needed to confirm this service. The deposit can vary by each departure and is at times, dependent on the region of the customer. |
incomplete_requirements read-only |
Field |
A list of requirements that are not yet met on this service. A list of requirements can be found here: Booking Requirements |
|
String |
The requirement category. ‘CHECKIN’ means the requirement must be met before a voucher document resource can be generated for a booked service on this product. ‘CONFIRMATION’ means the requirement must be met in order to confirm a booked service. |
|
String |
The name of this requirement. |
|
String |
A unique code for this requirement. This code will never change and can be used as an identifier. |
|
String |
A unique code for the set which contains this requirements. This code will never change and can be used as an identifier. |
|
String |
A message describing that data needed to fulfill this requirement. |
|
List |
A brief description of this detail. |
|
Field |
A list of informational details for this requirement. This is information that should be given to the customer when booking a service on this product. |
|
String |
A brief description of this detail. |
|
String |
A full description of this detail. |
|
Nested Object |
A type of this detail. |
|
String |
A unique code for this detail type. Possible values are: ‘CONFIRMATION_ONLY’, ‘ANY’. CONFIRMATION_ONLY means this detail is relevant for confirmations. ANY means this detail is relevant for any type of communication. |
|
Nested Object |
|
|
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 |
arrival_flight_details read-only |
Field |
A list of arrival flight data objects for this service, per customer. |
|
String |
Arrival flight airline code and number, using the standard International Air Transport Association (IATA) airport codes. |
|
Datetime |
(‘Arrival flight datetime in the local timezone and in the standard Dates & Times.’,) |
|
Nested Object |
|
|
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 |
departure_flight_details read-only |
Field |
A list of departure flight data objects for this service, per customer. |
|
String |
Departure flight airline code and number, using the standard International Air Transport Association (IATA) airport codes. |
|
Datetime |
(‘Departure flight datetime in the local timezone and in the standard Dates & Times.’,) |
|
Nested Object |
|
|
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 |
international_ticket_numbers read-only |
Field |
A list of international ticket number objects for this service, per customer. |
|
String |
13 digit ticket number |
|
Nested Object |
|
|
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 |
traveller_heights |
Field |
|
|
Integer |
Height in centimeters (cm). |
|
Nested Object |
|
|
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 |
components read-only |
Field |
Components for this departure service that detail the included accommodations, activities, and transports. |
original_departure_service read-only |
Reference Object |
The original departure service for this service. |
arriving_flights read-only |
Field |
The set of arriving flights associated with the departure service. |
|
Reference Object |
|
|
Field |
A list of objects containing per customer rooming data for this service. |
departing_flights read-only |
Field |
The set of departing flights associated with the departure service. |
|
Reference Object |
|
|
Field |
A list of objects containing per customer rooming data for this service. |
requirements read-only |
Nested Object |
A list of requirements associated with the departure service. This is similar to the set referenced on a booking, but scoped to the single service. |
Get a Departure Service¶
- GET /departure_services/(string: service_id)/¶
Create a Departure Service¶
- POST /departure_services/¶
Example request:
POST /departure_services/ HTTP/1.1
Host: rest.gadventures.com
Accept: application/json
Content-Type:application/json
{
"booking": { "id": "628209" },
"product": { "id": "548112" },
"customers": [
{ "id" : "1322952" }
]
}
Example response:
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"id": "1162093",
"href": "/departure_services/1162093",
"name": "Essential Vietnam and Cambodia",
"status": "Option",
"type": "departure_services",
"sub_type": "Tour",
"start_date": "2013-12-13",
"finish_date": "2013-12-29",
"customers": [
{
"id": "1322952",
"href": "/customers/1322952",
"name": {
"legal_first_name": "Hangouts",
"legal_last_name": "Overbets",
"legal_middle_name": null,
"common_name": null,
"title": "Mr"
}
}
],
"date_created": "2013-08-28T16:10:31Z",
"date_confirmed": null,
"date_cancelled": null,
"option_expiry_date": "2013-09-01T16:04:36Z",
"purchase_price": "1899.00",
"commission": "0.00",
"applied_promotion": null,
"flags": [],
"booking": {
"id": "628209",
"href": "/bookings/628209"
},
"documents": null,
"product": {
"id": "548112",
"href": "/departures/548112",
"name": "Essential Vietnam and Cambodia"
}
}
Create a Departure Service with Room Code¶
Every departure has an array of rooms
, and for the majority of trips,
the room is standard. For trips with multiple rooms
, you must be
explicit about the room code you wish to book, as each room will have
different pricing.
- POST /departure_services/¶
Example request:
POST /departure_services/ HTTP/1.1
Host: rest.gadventures.com
Accept: application/json
Content-Type:application/json
{
"booking": { "id": "628209" },
"product": { "id": "548112" },
"rooms": {"code": "8 - 2"},
"customers": [
{ "id" : "1322952" }
]
}
Update a Departure Service¶
Example request:
The request below expires an Optioned service and provides a reason.
PATCH /departure_services/1161864/ HTTP/1.1
Host: rest.gadventures.com
Accept: application/json
Content-Type: application/json
{
"status": "Expired"
}