SOAP Get Community 201309

Note: This service is not available in our interactive API option.

The SOAP Get Community provides information on a single community in which Compassion partners with a local church.

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

Sample Request

This is an example only.

Action<
http://services.ci.org/ci/community/2013/09/GetCommunity
URL
Prod:    https://api2.compassion.com/ci.services/community/2013/09/getcommunity?api_key=[string]
IPTest: https://api2.compassion.com/iptest/ci.services/community/2013/09/getcommunity?api_key=[string]

XML
<s:Envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
  <s:Header>
    <ClientReferenceId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</ClientReferenceId>
  </s:Header>
  <s:Body>
    <GetCommunityRequest SchemaVersion="1.0" xmlns="http://schemas.ci.org/ci/services/community/2013/09/">
      <RequestCriteria SchemaVersion="1.0" xmlns="http://schemas.ci.org/ci/services/common/2011/04/">
        <Criteria operator="And">
          <Field name="CommunityID" value="[string]" comparisonOperator="Equals"/>
        </Criteria>
      </RequestCriteria>
    </GetCommunityRequest>
  </s:Body>
</s:Envelope>

Request Parameters

Name Description Required Data Type Constraints
CommunityId Compassion system-generated identifier 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
CommunityId Compassion system-generated identifier for a community
CommunityName Name of the community
CountryId

Identifier of the country in which the community is located

LocationFromClosestCity Description that helps to locate the community on a map
DistanceFromClosestCity Textual description of the distance from the community to the closest major city
ClosestCityName Name of the major city that is closest to the community
UnemploymentRate Typical unemployment rate in the community
PrimaryDiet Description of the most common foods eaten in the community
ClimateId Identifier of the type of climate that affects the area in which the community is located
ClimateDescription Description of the type of climate in which the community is located
TerrainId Identifier of the type of terrain that exists in the area in which the community is located
TerrainDescription Description of the type of terrain in which the community is located
PrimaryOccupationId Identifier of the primary occupation within the community
PrimaryOccupationCode Three character code of the primary occupation
PrimaryOccupationTitle Title of the primary occupation
MainReligionId Identifier of the main religion within the community
MainReligionDescription Description of the main religion within the community
TypicalFloorBuildingMaterialId Identifier of the building material that is used for typical floors within the community
TypicalFloorBuildingMaterialDescription Description of the building material that is used for typical floors within the community
TypicalWallBuildingMaterialId Identifier of the building material that is used for typical walls within the community
TypicalWallBuildingMaterialDescription Description of the building material that is used for typical walls within the community
TypicalRoofBuildingMaterialId Identifier of the building material that is used for typical roofs within the community
TypicalRoofBuildingMaterialDescription Description of the building material that is used for typical roofs within the community
HighestEducationAvailable Description of the highest level of education available within the community
VocationalTrainingAvailable Description of the vocational training that is available within the community
RainyMonths Month(s) that are considered the rainy month(s) within the community
PlantingMonths Month(s) that are considered the planting month(s) within the community
HarvestMonths Month(s) that are considered the harvest month(s) within the community
HungerMonths Month(s) that are considered the hunger month(s) within the community
IllnessMonths Month(s) that are considered the illness month(s) within the community
FamilyMonthlyIncome Typical monthly income of a family in US Dollars
DistanceToMedicalAssistance Description of the distance to the nearest medical assistance - can be in kilometers, meters, minutes, hours
TypicalTransportationTimeToMedicalAssistance Time it takes to get to the nearest medical assistance
MedicalTransportationType Primary method of transportation used to reach medical help
CommunityPopulation Population of the community
WarmestMonth Month the average temperature is the hottest
WarmestMonthAverageTemperature Average temperature of the hottest month
CoolestMonth Month the average temperature is the coldest
CoolestMonthAverageTemperature Average temperature of the coldest month
DateOfLastReview Date the community information was last reviewed
DateofLastUpdate Date the community information was last updated
CommonHealthProblems Common health problems of a community
EconomicNeeds Typical economic needs of a community
EducationalNeeds Typical educational needs of a community
EnvironmentComment General comments about the environment in a community
NationalReligiousHolidays National and religious holidays celebrated in a community
PrimaryEthnicGroup Primary ethnic group(s) and language(s) spoken in a community
SocialNeeds Typical social needs of a community
SpiritualNeeds Typical spiritual needs of a community
TraditionsRitualsCustoms Traditions, rituals and customs that are typically practiced in a community
PercentageOfChildrenNotInSchool Percentage of children not in school in a community
PercentageChildrenCompletingElementary Percentage of children completeing elementary school in a community
PercentageChildrenCompletingSecondary Percentage of children completing secondary school in a community

Sample Successful Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
 <s:Header>
   <ClientReferenceId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">PubChldInfo_TC-002</ClientReferenceId>
   <SendingNode xmlns="http://schemas.ci.org/ci/services/common/2011/04/">PublicSimpleRequestReplySoapService</SendingNode>
   <MessageStreamId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</MessageStreamId>
   <EventSequenceNumber xmlns="http://schemas.ci.org/ci/services/common/2011/04/">8</EventSequenceNumber>
   <MessageId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</MessageId>
   <RelatesTo xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</RelatesTo>
   <SendersName xmlns="http://schemas.ci.org/ci/services/common/2011/04/">CI\esbservice</SendersName>
   <SendersAppName xmlns="http://schemas.ci.org/ci/services/common/2011/04/">PublicSimpleRequestReplySoapService</SendersAppName>

   <SendersTrackingId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</SendersTrackingId>
 </s:Header>
 <s:Body>
   <GetCommunityResponse ResponseCode="0" SchemaVersion="1.0" xmlns="http://schemas.ci.org/ci/services/community/2013/09/">
     <RequestCriteria SchemaVersion="1.0" xmlns="http://schemas.ci.org/ci/services/common/2011/04/">
       <Criteria operator="And">
         <Field name="CommunityId" value="[number]" comparisonOperator="Equals"/>
       </Criteria>
     </RequestCriteria>
     <CommunityCollection rowcount="1">
       <Community xmlns="http://schemas.ci.org/ci/common/eim/2013/09/">
         <CommunityID>[string]</CommunityID>
         <CommunityName>[string]</CommunityName>
         <CountryID>[string]</CountryID>
         <LocationFromClosestCity>[string]</LocationFromClosestCity>
         <DistanceFromClosestCity>[string]</DistanceFromClosestCity>
         <ClosestCityName>[string]</ClosestCityName>
         <UnemploymentRate>0.00</UnemploymentRate>
         <PrimaryDiet/>
         <ClimateID>1</ClimateID>
         <ClimateDescription>[string]</ClimateDescription>
         <TerrainID>1</TerrainID>
         <TerrainDescription>[string]</TerrainDescription>
         <PrimaryOccupationID>1</PrimaryOccupationID>
         <PrimaryOccupationCode/>
         <PrimaryOccupationTitle>[string]</PrimaryOccupationTitle>
         <MainReligionID>1</MainReligionID>
         <MainReligionDescription>[string]</MainReligionDescription>
         <TypicalFloorBuildingMaterialID/>
         <TypicalFloorBuildingMaterialDescription/>
         <TypicalWallBuildingMaterialID>1</TypicalWallBuildingMaterialID>
         <TypicalWallBuildingMaterialDescription>[string]</TypicalWallBuildingMaterialDescription>
         <TypicalRoofBuildingMaterialID>1</TypicalRoofBuildingMaterialID>
         <TypicalRoofBuildingMaterialDescription>[string]</TypicalRoofBuildingMaterialDescription>
         <HighestEducationAvailable>[string]</HighestEducationAvailable>
         <VocationalTrainingAvailable/>
         <RainyMonths/>
         <PlantingMonths/>
         <HarvestMonths/>
         <HungerMonths/>
         <IllnessMonths/>
         <FamilyMonthlyIncome>0.00</FamilyMonthlyIncome>
         <DistanceToMedicalAssistance>[string]</DistanceToMedicalAssistance>
         <TypicalTransportationTimeToMedicalAssistance>[string]</TypicalTransportationTimeToMedicalAssistance>
         <MedicalTransportationType>[string]</MedicalTransportationType>
         <CommunityPopulation>0</CommunityPopulation>
         <WarmestMonth>[string]</WarmestMonth>
         <WarmestMonthAverageTemperature>[string]</WarmestMonthAverageTemperature>
         <CoolestMonth>[string]</CoolestMonth>
         <CoolestMonthAverageTemperature>[string]</CoolestMonthAverageTemperature>
         <DateOfLastReview>1900-01-01T00:00:00</DateOfLastReview>
         <DateOfLastUpdate>1900-01-01T00:00:00</DateOfLastUpdate>
         <CommonHealthProblems/>
         <EconomicNeeds/>
         <EducationalNeeds/>
         <EnvironmentComment/>
         <NationalReligiousHolidays/>
         <PrimaryEthnicGroup/>
         <SocialNeeds/>
         <SpiritualNeeds/>
         <TraditionsRitualsCustoms/>
         <PercentageOfChildrenNotInSchool>0.00</PercentageOfChildrenNotInSchool>
         <PercentCompletingElementarySchool>0.00</PercentCompletingElementarySchool>
         <PercentCompletingSecondarySchool>0.00</PercentCompletingSecondarySchool>
       </Community>
     </CommunityCollection>
   </GetCommunityResponse>
 </s:Body>
</s:Envelope>

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

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <ClientReferenceId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">PubChldInfo_TC-002</ClientReferenceId>
    <SendingNode xmlns="http://schemas.ci.org/ci/services/common/2011/04/">PublicSimpleRequestReplySoapService</SendingNode>
    <MessageStreamId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</MessageStreamId>
    <EventSequenceNumber xmlns="http://schemas.ci.org/ci/services/common/2011/04/">3</EventSequenceNumber>
    <SendersAppName xmlns="http://schemas.ci.org/ci/services/common/2011/04/">PublicSimpleRequestReplySoapService</SendersAppName>
    <RelatesTo xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</RelatesTo>
    <MessageId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</MessageId>
    <SendersName xmlns="http://schemas.ci.org/ci/services/common/2011/04/">NT AUTHORITY\SYSTEM</SendersName>
    <SendersTrackingId xmlns="http://schemas.ci.org/ci/services/common/2011/04/">[string]</SendersTrackingId>
  </s:Header>
  <s:Body>
    <GetCommunityResponse ResponseCode="0SchemaVersion="1.0xmlns="http://schemas.ci.org/ci/services/community/2013/09/">
      <RequestCriteria SchemaVersion="1.0xmlns="http://schemas.ci.org/ci/services/common/2011/04/">
        <Criteria operator="And">
          <Field name="CommunityIdvalue="[number]comparisonOperator="Equals" />
        </Criteria>
      </RequestCriteria>
       <ErrorResponse SchemaVersion="1.0" xmlns="http://schemas.ci.org/ci/services/common/2011/04/">
        <ErrorName>Validation Error</ErrorName>
        <DateTimestamp>2015-01-26T16:12:04.806469-07:00</DateTimestamp>
        <SendersAppName>PublicSimpleRequestReplySoapService</SendersAppName>
        <ServiceName>PublicSimpleRequestReplySoapService</ServiceName>
        <ErrorId>[guid]</ErrorId>
        <ErrorCode>4004</ErrorCode>
        <ErrorMessage>Incorrect data type: CommunityID can only be numeric digits (0-9).</ErrorMessage>
      </ErrorResponse>
    </GetCommunityResponse>
  </s:Body>
</s:Envelope>

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