Public Country Image

The Country Image API is a RESTful API.

The service provides a country map image formatted according to the customer's specifications.

Customers can manipulate the following parameters:

  • File type (.jpeg, .gif or .bmp)
  • Width and height
  • Resolution
  • Quality

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

Sample Request

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

https://api2.compassion.com/us/1/country/image? LegacyCompassionCountryCode= [string]& CountryImageType= MAP& Dpi= [string]& Quality= [string]& ImageFormat= [string]& Width= [string]& height= [string]& ClientReferenceId= [string]& api_key= [string]

Request Parameters

Name Description Required Data Type Constraints
LegacyCompassionCountryCode Two-character legacy country code that is used to identify field offices within Compassion International. Yes String  
CountryImageType Type of image requested. Yes String Valid Value MAP
Height Image height in pixels. Optional Numeric

Default 600

Value between 1 and 5000, inclusive

Width Image width in pixels. Optional Numeric

Default 400

Value between 1 and 5000, inclusive

DPI Image dots per inch. Optional Numeric

Default 72

Value between 1 and 1200, inclusive

Quality Image quality (a lower number is poorer quality). Optional Numeric

Default 100

Value between 1 and 100, inclusive

ImageFormat Type of image format. Optional String

Default jpeg

Valid Values
jpeg | bmp | gif

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
LegacyCompassionCountryCode Two-character legacy country code that is used to identify field offices within Compassion International.
ImageFormat Type of image format.
CountryImageType Type of image requested.
ImageData Image

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