• Register

Public Country Information

The Country Information API is a RESTful API.

The service provides various types of information on a country.

One of the following parameters are required:

  • Country Id
  • ISO Country Code
  • Legacy Country Code

Sample Requests
Request Parameters
Response Parameters
Sample Successful Response
Sample Unsuccessful Response
Error Response Codes

Sample Requests

The actual request requires soft-authentication.
This is an example only.

https://api2.compassion.com/us/1/country/information? CountryId= [string]& ClientReferenceId= [string]& api_key= [string]

Request Parameters

Name Description Required Data Type Constraints
CountryId Three-digit code assigned to a country by the International Organization for Standardization (ISO). This is an integer and can have a leading zero. Conditional Numeric Max 3
ISOCountryCode Two-character code assigned to a country by the International Organization for Standardization (ISO) as defined in the ISO 3166-1 standard. Conditional String Max 2
LegacyCountryCode Two-character legacy country code that is used to identify field offices within Compassion International. Conditional String Max 2
ClientReferenceId Uniquely represents the transaction in the client's system. Optional String Max 100
api_key Your Mashery supplied key for an application running Compassion International services. Yes String  

Response Parameters

Name Description
CountryId Code assigned to a country by the International Organization for Standardization (ISO).
ISOCountryName Name for a country as recorded by the International Organization for Standardization (ISO) in the ISO 3166-1 standard.
ISOCountryCode Two-character code assigned to a country by the International Organization for Standardization (ISO) as defined in the ISO 3166-1 standard.
CountryCommonName Common name of a country as used by Compassion International.
CountryDescription Description of the country.
CountryInternationalPhoneCode Telephone code for international dialing.
CountryPopulation Population of the country.
GovernmentType Government type of the country.
OfficialReligion Predominate religion of the country.
OfficialLanguage Official language of the country.
OfficialCurrency Official currency of the country.
LifeExpectancy Life expectancy of person in the country.
PerCapitaIncomeinUSDollars Per capita income of individuals in the country.
InfantMortalityRate Number of infants that die per 1000 born. Formula to obtain a percentage: (InfantMortalityRate/1000)
Under5MortalityRate Number of children under five years of age that die per 1000 that are born. Formula to obtain a percentage: (Under5MortalityRate/1000)*100
PercentOfChildrenThatReachUS5thGradeEquivalent Percent of children that reach US equivalent of a fifth grade education.
AverageYearstoCompletePrimarySchool Average years it takes a child to complete primary education.
ExpectedYearstoCompletePrimarySchool Expected number of years it takes a child to complete primary education.
PercentofPopulationHindu Percentage of population that is Hindu.
PercentofPopulationAnimist Percent of population that is Animist.
PercentofPopulationBuddhist Percentage of population that is Buddhist.
PercentofPopulationCatholic Percent of population that is Catholic.
PercentofPopulationProtestant Percentage of population that is Protestant.
PercentofPopulationMuslim Percent of population that is Muslim.

Sample Successful Response

Sample Successful Response

Sample Unsuccessful Response

The service operation will provide the following response when there are missing required parameters.
Exception Returned: (ResponseCode = "1", HTTP Status Code ="404")

Sample Unsuccessful Response

Error Response Codes

For ResponseCode = 1, the table below indicates the HTTP error response and HTTP Error message.

HTTP Error Response HTTP Error Message
HTTP 400 Service Parameter Failure
HTTP 401 Not Authenticated / Authorized for Service Data
HTTP 403 Not Authorized
HTTP 403 Account Inactive
HTTP 403 Over Queries Per Second Limit
HTTP 403 Over Rate Limit
HTTP 403 Unknown Referrer
HTTP 404 Requested Resource Not Found
HTTP 408 Request Timeout
HTTP 414 Request URI Too Long
HTTP 500 Internal Server Error
HTTP 502 Bad Gateway
HTTP 503 API Maintenance / Service Unavailable
HTTP 504 Gateway Timeout

0 Comments

New comments are not being accepted at this time.

Docs Navigation