- Previous: Private IPG Child Case Study
- Up: Private IPG APIs
- Next: Private IPG Child Information
Private IPG Child Image
The Child Image API is a RESTful API.
The service provides the most recent image of a child based on an active child key. The image is formatted to input specifications.
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.
Sample Request
This is an example only.
https://api2.compassion.com/us/1/child/image?ChildKey=[string]&Height=[number]&Width=[number]&ImageType=[string]&Dpi=[number]&Quality=[number]&ImageFormat=[string]&ClientReferenceId=[string]&api_key=[string]
Request Parameters
Name | Description | Required | Data Type | Constraints |
---|---|---|---|---|
ChildKey | Code assigned by Compassion International when the child is registered in the Child Sponsorship Program or the Leadership Development Program. | Yes | String | Fixed 9 |
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 |
ImageType | Type of image that can be returned. | Optional | String |
Default Headshot Valid Values |
ClientReferenceId | Uniquely represents the transaction in the client's system. Commonly used for client correlation. | Optional | String | Max 100 |
api_key | Your Mashery supplied key for an application running Compassion International services. | Yes | String |
Response Parameters
Name | Description |
---|---|
ChildKey | Same value that was in the request. |
ImageFormat | Image format chosen by the customer or the default (jpeg) if none was chosen. |
ImageType | Image Type chosen by the customer or the default (headshot) if none was chosen. |
Image | Child image data. |
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")
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 |
- Previous: Private IPG Child Case Study
- Up: Private IPG APIs
- Next: Private IPG Child Information
Docs Navigation
- Compassion API Library
- Standards Documents
- Legacy APIs (Deprecating)
- Web Services Handshake (Legacy) - Notification and Command Messages
- Public API
- Private IPG APIs
- Private REST Services
- REST Get CDSP Implementor V1
- REST Get Child Case Study V1
- REST Get Child Exit Details V1
- REST Get Child Image V1
- REST Get Child Information V1
- REST Get Community V1
- REST Get Country V1
- REST Get CSP Implementor V1
- REST Get Local Church Partner V1
- REST Get Program Implementor V1
- REST Get Project Age Groups V1
- REST Get Child Image V1 - 2015/03
- Private Messaging APIs
- Quick Start Guide
- OffRamp Prerequisites and Setup
- IP OnRamp Service Configuration
- Available Message Types
- Message and Service Relationships
- Troubleshooting
- General Error Messages from Compass Party Host
- EsdMessageErrorMOE Sample
- Sample REST End-To-End Test Plan
- SOAP Wrapper Sample for Messages to GMC
- Allocate Child Message
- Cancel Commitment Message
- Commitment Canceled Message
- Commitment Created Message
- Constituent Created Message
- Constituent Updated Message
- Constituent Upserted Message
- Create Commitment Message
- Create Constituent Message
- Create Email Message
- Create Gift Message
- Deallocate Child Message
- Depart Child Message
- Email Created Message
- Email Updated Message
- Gift Created Message
- Update Child Message
- Update Constituent Message
- Update Email Message
- Upsert Constituent Message
- Update Project Message
- Private SOAP Services
- SOAP Get Child Exit Detail 201211
- SOAP Get Child Exit Detail 201310
- SOAP Get CDSP Implementor 201309
- SOAP Get Child Image 201211
- SOAP Get Child Case Study 201310
- SOAP Get Child Case Study 201412
- SOAP Get Child Information 201211
- SOAP Get Child Information 201310
- SOAP Get Community 201309
- SOAP Get Country Information 201104
- SOAP Get Local Church Partner 201309
- SOAP Get Program Implementor 201303
- SOAP Get Program Implementor 201309
- SOAP Get Project Age Group 201309
- Service Overview
- SOAP Get CSP Implementor 201309
- SOAP Get Child Image 201503
- Private USA APIs
- Private USA Web APIs
- private cornerstone connect messaging
- private cornerstone test
- public api
0 Comments
New comments are not being accepted at this time.