Public Sponsor Child Image

The Sponsor Child Image API is a RESTful API.

The service provides the most recent child image on file for each active child sponsored that is enrolled in the Child Development Sponsorship Program (CDSP) and/or each active student sponsored which is enrolled in the Leadership Development Program LDP). Images can be formatted to customer specifications. All children returned in the response will have the same format.

Customers can manipulate the following parameters:

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

There are three parameters to use to get the required type of picture:

  • DPI (dots per inch)
  • Height (pixels)
  • Width (pixels)

A website example would be DPI=72, Height=400, Width=300.

A print example would be DPI=300, Height= (desired inches high x DPI), Width= (desired inches wide x DPI). A print picture of 4 inches high by 3 inches wide the settings would be:

  • DPI=300
  • Height=1200
  • Width=900

If you need a higher DPI, adjust the height and width accordingly, keeping in mind that the bigger the picture the bigger the payload and slower the response time.

CDSP connects one child with one sponsor to help that child develop into the extraordinary individual which God ordained.

LDP launches outstanding graduates from our Child Sponsorship Program into their full, God-given potential. They are equipped with a university degree, mentored in their Christian life and instilled with a passion to serve that transforms their communities and nations.

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 a example only. SponsorId=[string]& EmailAddress=[string]& Height=[string]& Width=[string]& Dpi=[string]& ImageType=[string]& Quality=[string]& ImageFormat=[string]& ClientReferenceId=[string] &api_key=[string]

Request Parameters

Name Description Required Data Type Constraints
SponsorId Sponsor Id is assigned by Compassion International to an individual or group when a child in the Child Development Sponsorship Program or a student in the Leadership Program is sponsored through them. Also known as Constituent Id or Supporter Id. Yes Numeric Max 10
EmailAddress Sponsor's preferred email address on file at Compassion International. Service client should pass in URL encoded value if the email address contains special characters. Yes String Max 60
ImageType Image Type of the picture Optional String

Default Headshot

Valid Values:
Headshot | Portrait | Fullshot

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
SponsorId Same value that was in the request.
The return can contain one or more child keys with the following parameters for each active child or student:
ChildKey Code assigned by Compassion International when the child is registered in the Child Sponsorship Program.
EntityKey The type of image returned. The value will be 'CS,' which indicates a child image.
ImageType Image Type chosen by the customer or the default (Headshot) if none was chosen. Other image types are Headshot, Portrait, Fullshot.
DPI Image dots per inch.
Width Image width in pixels.
Height Image height in pixels.
ImageFormat Image format chosen by the customer or the default (jpeg) if none was chosen.
Quality Image quality (a lower number is poorer quality).
Image Child image data.

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


New comments are not being accepted at this time.

Docs Navigation