Agencies¶
This resource represents the profile of a travel agency. It contains links to sub resources such as their agent roster, booking history, and available promotions. The promotions sub resource list view is in reverse chronological order based on creation date and only lists promotions active at time of consumption.
XML Schema:
GET: Get an Agency
PATCH: Update an Agency
Fields
Name |
Type |
Description |
---|---|---|
id read-only |
String |
|
href read-only |
Field |
|
name required |
String |
The name of this agency. |
date_created |
Datetime |
The time when the resource was created, in the standard Dates & Times. |
transactional_email required |
String |
The transactional email address of this agency. {DOC_PATCH}. |
agency_chain read-only |
Reference Object |
DEPRECATED The agency chain of this agency. This is deprecated in favour of agency chains, as an agency can belong to multiple chains through our booking_company model. |
booking_currencies required |
List |
A list of currencies for which the promotion is applicable, The currency ISO code, in the standard Currencies & Prices.. |
preferred_display_name required |
String |
This is the preferred name for use in emails sent to an Agency. When not provided the name will be used from the agency chain secondary. |
address required |
Nested Object |
The postal/zip code of the billing address, Modifiable on PATCH. |
|
String |
The street of the billing address. |
|
String |
The city of the billing address. |
|
Nested Object |
The state of the billing address. |
|
String |
|
|
Field |
|
|
String |
|
|
Nested Object |
The country of the billing address. |
|
String |
|
|
Field |
|
|
String |
|
|
String |
The postal/zip code of the billing address. |
bookings read-only |
Nested Object |
|
agents read-only |
Nested Object |
|
promotions read-only |
Nested Object |
A list of promotions associated with this agency. |
travel_credits read-only |
Nested Object |
A list of travel_credit associated with this agency. |
latitude |
String |
Latitude of this agency |
longitude |
String |
Longitude of this agency |
documents |
Field |
A list of data files available for this agency. |
|
String |
Document type. |
|
Nested Object |
The file for this document. |
|
Field |
base64-encoded representation of the file. |
|
String |
Mime-type as identified by extension. |
|
String |
The name of the file. |
emails required |
Field |
|
|
String |
|
|
String |
|
agency_chains required |
List |
All agency chains this agency is a part of. Each Agency Chain reflects a different set of configuration and contractual differences for this agency. |
booking_companies required |
List |
All booking_company that are associated with the agency chains of this agency. Basically all the booking_company that this agency has a contract with. |
agency_chain_configurations required |
Field |
All agency chains this agency is a part of. Each Agency Chain reflects a different set of configuration and contractual differences for this agency. |
|
Reference Object |
The agency chain that the agency is part of. |
|
Reference Object |
The booking_company of the agency chain. |
|
Field |
List of all active flags on the ABC record. |
override_agency_secondary required |
Boolean |
Indicates if the communication preferences should be overridden by the agency chain. |
communication_preferences required |
Field |
(‘A list of agency communication preference flags:n* ATTACH_INVOICESn’, ‘* ATTACH_VOUCHERSn’, ‘* ATTACH_TRAVELLER_INVOICESn’, ‘* ATTACH_TRAVELLER_VOUCHERSn’, ‘* ALLOW_GROUPS’) |
passenger_notifications required |
Field |
A list of notification email types to be sent to a passenger. |
agent_notifications required |
Field |
A list notification email types to be sent to an agent. |
Get an Agency¶
- GET /agencies/(string: agency_id)¶
Update an Agency¶
- PATCH /agencies/(string: agency_id)/¶
Example request:
PATCH /agencies/999/ HTTP/1.1
Host: rest.gadventures.com
Accept: application/json
Content-Type: application/json
{
"address": {
"street": "19 Charlotte St",
"city": "Toronto",
"state": "ON",
"country": "Canada",
"postal_zip": "M5V 2H5"
}
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"address": {
"city": "Toronto",
"country": {
"href": "/countries/CA",
"id": "CA",
"name": "Canada"
},
"postal_zip": "M5V 2H5",
"state": {
"href": "/states",
"id": null,
"name": null
},
"street": "19 Charlotte St"
}
}