Country code lookup

Country code lookup

This API returns a list of country descriptions and their code. When entering an address for a new fundraising account, the country code is a required entry.

As this data rarely changes you may wish to retrieve the list from the IO Docs.

URL

Operation type: GET

Parameter Required Data type Description
api_key True Varchar (24) This is your key that allows you access to the VMG APIs.

Response

OutcomeFurther information
Success

This API will return the following fields:

  • Status 200: OK

Country details in the following format:

  • Country code
  • Country name
Error

Sample error:

If no country codes can be found the following is returned:

  • Error Code: 001.02.005
  • Error message: Could not retrieve country code details.

Click here for a full list of API error codes.

Response description

ParamterData typeDescription
countryCode Varchar10) This is the country code which needs to be provided by the fundraiser account creation API.
countryName Varchar(50) This is the name of the country associated with the country code.

XML response example



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<countries>
    <country>
        <countryCode>AF</countryCode>
        <countryName>Afghanistan</countryName>
    </country>
    <country>
        <countryCode>AL</countryCode>
        <countryName>Albania</countryName>
    </country>
    <country>

JSON response example

{
    "countries": [{
        "countryCode": "AF",
        "countryName": "Afghanistan"
    }, {
        "countryCode": "AL",
        "countryName": "Albania"
    },