Get Countries

https://staging2.services3.transglobalexpress.co.uk/Country/V2/GetCountries
https://services3.transglobalexpress.co.uk/Country/V2/GetCountries
POST
xmlns="http://www.transglobalexpress.co.uk/API/V2"

Purpose

The GetCountries method returns a list of countries that can be booked on the Transglobal Express API. The response contains a list of countries along with data that can be used as part of your quote/book requests.

The main benefit of retrieving the country information via this method is you get access to the CountryID values for your request. When specifying a country when quoting or booking you can specify a CountryID or CountryCode:

"Country": {
        "CountryID": 231,
        "CountryCode": "GB"
}

<Country>
    <CountryID>231</CountryID>
    <CountryCode>GB</CountryCode>
</Country>

While in 95% of cases a country code (ISO) will have a one to one mapping to a country, this is not the case in all scenarios. This is because some carriers have different rates for territories of countries that are still under the ISO code (eg Spain Mainland and Canary Islands both have country code ES), or will have different rates for regions within the same country (eg United Kingdom Mainland, Scottish Highlands, Northern Ireland all have country code GB). In order to quote and bill accurately we have had to split these up into separate countries, and therefore a country code of "ES" is ambiguous. While we make efforts to map requests to the correct country in these cases it is safer to use the CountryID when specifying a country in order to avoid potential billing complications.

The Request

JSON (Success)
{
  "Credentials": {
    "APIKey": "[API KEY HERE]",
    "Password": "[API PASSWORD HERE]"
  }
}
XML
<GetCountriesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.transglobalexpress.co.uk/API/V2">
    <Credentials>
        <APIKey>[API KEY HERE]</APIKey>
        <Password>[API PASSWORD HERE]</Password>
    </Credentials>
</GetCountriesRequest>
Property Name Data Type Parent M Comment Example
GetCountriesRequest Container   M The root container for the request.  
Credentials
Credentials Container GetCountriesRequest M The api credentials container.  
APIKey string Credentials M The api key. Th6fLmTxBv
Password string Credentials M The api password.
Please note this is NOT the password used to log into the website.
rGf3!lmT4dA

The Response

JSON (Success)
{
    "Status": "SUCCESS",
    "Notifications": [],
    "Countries": [
        {
            "CountryID": 1,
            "Title": "Afghanistan",
            "CountryCode": "AF"
        },
        {
            "CountryID": 2,
            "Title": "Albania",
            "CountryCode": "AL"
        },
        {
            "CountryID": 38,
            "Title": "Canada",
            "CountryCode": "CA"
        },
        {
            "CountryID": 248,
            "Title": "Canary Islands",
            "CountryCode": "ES"
        },
        {
            "CountryID": 39,
            "Title": "Cape Verde",
            "CountryCode": "CV"
        },
        {
            "CountryID": 205,
            "Title": "Spain (Mainland)",
            "CountryCode": "ES"
        },
        {
            "CountryID": 212,
            "Title": "Switzerland",
            "CountryCode": "CH"
        },
        {
            "CountryID": 230,
            "Title": "United Arab Emirates",
            "CountryCode": "AE"
        },
        {
            "CountryID": 231,
            "Title": "United Kingdom (Mainland)",
            "CountryCode": "GB"
        },
        {
            "CountryID": 247,
            "Title": "United Kingdom (Northern Ireland)",
            "CountryCode": "GB"
        },
        {
            "CountryID": 272,
            "Title": "United Kingdom (Offshore Isles)",
            "CountryCode": "GB"
        },
        {
            "CountryID": 271,
            "Title": "United Kingdom (Scottish Highlands)",
            "CountryCode": "GB"
        },
        {
            "CountryID": 232,
            "Title": "United States",
            "CountryCode": "US"
        },
        {
            "CountryID": 244,
            "Title": "Zambia",
            "CountryCode": "ZM"
        },
        {
            "CountryID": 245,
            "Title": "Zimbabwe",
            "CountryCode": "ZW"
        }
    ]
}
XML (Success)
<GetCountriesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.transglobalexpress.co.uk/API/V2">
    <Status>SUCCESS</Status>
    <Notifications />
    <Countries>
        <Country>
            <CountryID>1</CountryID>
            <Title>Afghanistan</Title>
            <CountryCode>AF</CountryCode>
        </Country>
        <Country>
            <CountryID>2</CountryID>
            <Title>Albania</Title>
            <CountryCode>AL</CountryCode>
        </Country>
        <Country>
            <CountryID>38</CountryID>
            <Title>Canada</Title>
            <CountryCode>CA</CountryCode>
        </Country>
        <Country>
            <CountryID>248</CountryID>
            <Title>Canary Islands</Title>
            <CountryCode>ES</CountryCode>
        </Country>
        <Country>
            <CountryID>39</CountryID>
            <Title>Cape Verde</Title>
            <CountryCode>CV</CountryCode>
        </Country>
        <Country>
            <CountryID>205</CountryID>
            <Title>Spain (Mainland)</Title>
            <CountryCode>ES</CountryCode>
        </Country>
        <Country>
            <CountryID>212</CountryID>
            <Title>Switzerland</Title>
            <CountryCode>CH</CountryCode>
        </Country>
        <Country>
            <CountryID>230</CountryID>
            <Title>United Arab Emirates</Title>
            <CountryCode>AE</CountryCode>
        </Country>
        <Country>
            <CountryID>231</CountryID>
            <Title>United Kingdom (Mainland)</Title>
            <CountryCode>GB</CountryCode>
        </Country>
        <Country>
            <CountryID>247</CountryID>
            <Title>United Kingdom (Northern Ireland)</Title>
            <CountryCode>GB</CountryCode>
        </Country>
        <Country>
            <CountryID>272</CountryID>
            <Title>United Kingdom (Offshore Isles)</Title>
            <CountryCode>GB</CountryCode>
        </Country>
        <Country>
            <CountryID>271</CountryID>
            <Title>United Kingdom (Scottish Highlands)</Title>
            <CountryCode>GB</CountryCode>
        </Country>
        <Country>
            <CountryID>232</CountryID>
            <Title>United States</Title>
            <CountryCode>US</CountryCode>
        </Country>
        <Country>
            <CountryID>244</CountryID>
            <Title>Zambia</Title>
            <CountryCode>ZM</CountryCode>
        </Country>
        <Country>
            <CountryID>245</CountryID>
            <Title>Zimbabwe</Title>
            <CountryCode>ZW</CountryCode>
        </Country>
    </Countries>
</GetCountriesResponse>
JSON (Fail)
{
    "Status": "ERROR",
    "Notifications": [
        {
            "Message": "Authentication Failed",
            "Severity": "ERROR"
        }
    ]
}
XML (Fail)
<GetCountriesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.transglobalexpress.co.uk/API/V2">
    <Status>ERROR</Status>
    <Notifications>
        <Notification>
            <Message>Authentication Failed</Message>
            <Severity>ERROR</Severity>
        </Notification>
    </Notifications>
</GetCountriesResponse>
Property Name Data Type Parent M Comment Example
GetCountriesResponse string   M The root element of the response.
When returning JSON this is not explicitly named but is instead the object container of the response.
 
Status string GetCountriesResponse M The status indicating whe success of the request.
Possible values are: SUCCESS, PARTIAL, FAIL, ERROR
SUCCESS
Notifications Container GetCountriesResponse M The container for list of notifications.
Can be empty.
 
Notification
Notification Container Notifications M The container for notifications information.
When using JSON this element is not explicitly named, instead the Notifications property is a list of anonymous objects containing the notification data.
 
Message string Notification M The notification message. Authentication Failed
Severity string Notification M The notification severity level. ERROR
Countries
Countries Container GetCountriesResponse M The container for the list of countries.  
Country Container Countries M The container for the country information.
When using JSON this element is not explicitly named, instead the Countries property is a list of anonymous objects containing the country data.
 
CountryID integer Country M The country ID 231
Title string Country M The country name. United Kingdom (Mainland)
CountryCode string Country M The country code. GB