Private Letter Tracking Detail

The Letter Tracking Detail API is a RESTful API.

This service provides external Compassion clients the ability to retrieve letter tracking information based on a sponsor id and child key.

The service returns JSON as default. The service will also return XML. This is controlled by the Accept parameter in the Message Header (i.e., for XML, it should be "Accept: application/xml" and for JSON, it should be "Accept: application/json").

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

Sample Request

This is an example only.

PROD:  https://api2.compassion.com/ci/v1/letters/sponsors/{sponsor-id}/children/{child-key}/lettertrackingdetail?ClientReferenceId=[string]&api_key=[string]


 

IPTEST: https://api2.compassion.com/iptest/ci/v1/letters/sponsors/{sponsor-id}/children/{child-key}/lettertrackingdetail?ClientReferenceId=[string]&api_key=[string]

Request Parameters

NameDescriptionRequiredData TypeConstraints
SponsorId SponsorId (Sponsor Id) is assigned by Compassion International to an individual or group. Yes String Max 10
childKey ChildKey (child key) is assigned by Compassion International to a child. Yes String Max 10
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
ConstituentId

ConstituentId (Constituent i.e. Sponsor Id) is assigned by Compassion International to an individual or group.

ChildKey

ChildKey (Child key) is assigned by Compassion International to a child.

LetterType

Type of Letter (Child Letter or Sponsor Letter).

LetterId

Id assigned to a letter.

TrackingSequence

Sequence assigned to a letter.

TrackingDescription

Description assigned to a letter (Arrive FO or Arrive GMC).

TrackingDate

Date this infromation was entered into Compass.

Sample Successful Response (an example run in 2021)

<LetterTrackingDetailCollection rowcount="1"xmlns="http://schemas.ci.org/ci/services/letter/2015/07/ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  <LetterTrackingDetail xmlns="http://schemas.ci.org/ci/services/letter/2015/07/>1234567</
  <ConstituentId>1234567</ConstituentId
  <ChildKey>XX1234567</ChildKey
  <LetterType>Child Letter</LetterType
  <LetterId>1234567</LetterId
  <TrackingSequence>1234567</TrackingSequence
  <TrackingDescription>1234567</TrackingDescription
  <TrackingDate>1234567</TrackingDate
 <LetterTrackingDetail>
 
<LetterTrackingDetailCollection> 

Sample Unsuccessful Response

The service operation will provide the following response when there is no letter for the SponsorId and ChildKey supplied.
Exception Returned: (HTTP Status Code ="404")

<Error xmlns="xmlns="http://schemas.ci.org/ci/services/common/2011/04/">
 <ID>48f0bb45-fd9c-4d81-b21f-b2f70e5e47c6</ID>
 <ExceptionMessage>The data does not exist.</ExceptionMessage> 
</Error>

Error Response Codes

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

HTTP Error ResponseHTTP 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 Referer
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