Private Tax Years Available

The REST call Get Tax Years Available provides all years a Compassion tax statement is on file for a sponsor. The statements do not go any farther back than the 2013 tax statement. For example, a sponsor has statements from Compassion for the last four years. The service is run in 2014. Only the 2013 Compassion tax year will return.

The maximum number of years returned will be seven years.

This service runs in conjunction with Private Tax Year PDF, which retrieves a tax statement in PDF format.

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

Sample Request

This is an example only.

https://api2.compassion.com/US/1/constituent/taxreceipts?conid=[string]&ClientReferenceId=[string]&api_key=[string]

Request Parameters

Name Description Required Data Type Constraints
ConId ConId (Constituent Id) is assigned by Compassion International to an individual or group. 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
TaxYearCollection
TaxYear

One of more tax years associated with a ConId.

The statements do not go any farther back than the 2013 tax statement. Example: A sponsor has statements from Compassion for the last four years. The service is run in 2014. Only the 2013 Compassion tax year will return.

The maximum number of years returned will be seven years

Sample Successful Response (an example run in 2021)

<TaxYearCollection ResponseCode="0" xmlns="http://schemas.ci.org/ci/services/constituent/2011/06/"
  <TaxYear>2013</TaxYear
  <TaxYear>2014</TaxYear
  <TaxYear>2015</TaxYear
  <TaxYear>2016</TaxYear
  <TaxYear>2017</TaxYear
  <TaxYear>2018</TaxYear
  <TaxYear>2019</TaxYear
  <TaxYear>2020</TaxYear>
</TaxYearCollection> 

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")

<TaxYearCollection xmlns="http://schemas.ci.org/ci/services/constituent/2011/06/ResponseCode="1" SchemaVersion="1.0">
 <ExceptionMessage>Incorrect data type; sponsorid can only be numeric digits (0-9).</ExceptionMessage> 
</TaxYearCollection>

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

Docs Navigation