- Previous: Validate URL
- Up: Introduction
- Next: Address lookup
Country code lookup
Page and account creation APIs are now unavailable so please consider your use of our APIs and how this affects you. All other APIs will be available until 18 February. If you have any questions please take a look at our Q&A.
Documentation
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
https://api.virginmoneygiving.com/fundraisers/v1/countries?api_key={your API key}
Parameter | Required | Data type | Description |
---|---|---|---|
api_key | True | Varchar (24) | This is your key that allows you access to the VMG APIs. |
Response
Outcome | Further information |
---|---|
Success |
This API will return the following fields:
Country details in the following format:
|
Error |
Sample error: If no country codes can be found the following is returned:
Click here for a full list of API error codes. |
Response description
Paramter | Data type | Description |
---|---|---|
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" },
- Previous: Validate URL
- Up: Introduction
- Next: Address lookup
Docs Navigation
- Introduction
- Getting started
- Fundraiser search
- Fundraiser details
- Fundraiser details V2
- Fundraising page details
- Fundraising page details V2
- Charity search
- Validate URL
- Country code lookup
- Address lookup
- Account Exists
- Create fundraiser account
- Activity lookup
- Event search
- Create fundraiser page
- Event summary
- Event fundraisers
- Event Fundraisers V2
- Event fundraisers 2
- Event fundraisers 2 V2
- Charity fundraisers
- Charity fundraisers V2
- Charity details
- Authentication
- Useful information
- Error codes
- Glossary
- Software development kit