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-agency

PATCH: update-agency

Fields

Name Type Description
id read-only String  
href read-only Field  
name required String The name of this agency.
transactional_email required String The transactional email address of this agency, Modifiable on PATCH
agency_chain required Nested 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.
  • id read-only
String  
  • href read-only
Field  
date_created required Datetime The time when the resource was created, in the standard dates-time.
booking_currencies required List A list of currencies for which the promotion is applicable, The currency ISO code, in the standard currencies.
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.
  • street
String The street of the billing address.
  • city
String The city of the billing address.
  • state
Nested Object The state of the billing address.
    • id read-only
String  
    • href read-only
Field  
    • name
String  
  • country
Nested Object The country of the billing address.
    • id read-only
String  
    • href read-only
Field  
    • name
String  
  • postal_zip
String The postal/zip code of the billing address.
bookings read-only Nested Object A list of bookings associated with this agency.
agents read-only Nested Object A list of agents associated with this agency.
promotions read-only Nested Object A list of promotions associated with this agency.
latitude String Latitude of the agency
longitude String Longitude of the agency
documents Field The data file.
  • type required
String Document type.
  • file required
Nested Object The file for this document
    • data required
Field base64-encoded representation of the image.
    • mime_type required
String Mime-type as identified by extension.
    • name required
String The name of the file.
emails required Field Emails
  • type required
String Email type
  • address required
String Email address
agency_chains required Field All |agency_chains| this agency is a part of. Each Agency Chain reflects a different set of configuration, and potentially, contractual differences for this agency.
  • id read-only
String  
  • name required
String Name of the Agency Chain record
  • href read-only
Field  
booking_companies required Field All booking companies that are associated with the agency chains of this agency. Basically all the booking companies that this agency has a contract with.
  • id read-only
String  
  • href read-only
Field  
  • name required
String Name of the booking company.
override_agency_secondary required Boolean Flag that indicates if the communication_preferences need to be overriden by the agency chain (if true) or not (if false).
communication_preferences required Field A list of agency booleans that are related to communication_preferences:ATTACH_INVOICES, ATTACH_VOUCHERS, ATTACH_TRAVELLER_INVOICES, ATTACH_TRAVELLER_VOUCHERS, 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": None,
            "name": None
        },
        "street": "19 Charlotte St"}
    }
    ...
}

‘’‘