RATA Geocode
Description
This REST service handles RATA Geocode Service requests. The RATA supports multiple APIs methods that return different data sets.
Definition
POST /services/apexrest/intframework/v2/invokeIntegrationService
Authentication Type
Basic Salesforce Auth 2.0
See this link for SFDC Documentation: https://help.salesforce.com/articleView?id=remoteaccess_oauth_web_server_flow.htm&type=5
Parameters
Request Header Parameters
The following table provides the details of the request header parameters used by this web service:
Key | Value |
---|---|
Content-Type | application/JSON |
charset | UTF-8 |
Accept | application/JSON |
Request Body Parameters
The following table provides the details of the request body parameters used by this web service:
Field Name | Type |
---|---|
integrationFamily | String |
apiType | String |
executionPriority | String |
idsForFiltersMap | String |
borrowerId | String |
collateralId | String |
applicationId | String |
Error Messages
When you use this web service you can receive the possible error messages as shown in the following table:
Status Code | Error Message |
---|---|
400 | Bad request |
401 | Authorization information is missing or invalid |
404 | Not found |
500 | Internal server error |
Sample Request
The sample request that you receive is as shown in the following block:
{ "Mode": "Advanced", "Addresses": [ { "ReportingYear": 2021, "ApplicationNumber": "001", "County": "Seminole", "StreetAddress": "1916 Boothe Circle", "City": "Longwood", "State": "FL", "ZIPCode": "32750", "Urbanization": "", "Income":"5000" } ] }
Sample Response
The sample response that you receive is as shown in the following block:
{ "Mode": "Advanced", "Addresses": [ { "ReportingYear": 2021, "ApplicationNumber": "001", "County": "Seminole", "StreetAddress": "1916 Boothe Circle", "City": "Longwood", "State": "FL", "ZIPCode": "32750", "Urbanization": "", "Income":"5000" } ] } { "geocodes": [ { "applicationNumber": "001", "county": "SEMINOLE", "streetAddress": "1916 BOOTHE CIR", "city": "LONGWOOD", "state": "FL", "zipCode": "32750", "ziP4": "6774", "stateCode": "12", "countyCode": "117", "msa": "36740", "censusTract": "0215.04", "geoPrecision": "10", "geoPrecisionPercent": 0.9840, "geoPrecisionDescription": "ZIP+4 Match", "latitude": "28.690040", "longitude": "-81.38676", "deliveryPoint": "16", "placeCode": "41250", "blockGroup": "2", "censusBlock": "017", "checkDigit": "2", "recordType": "S", "congressionalDistrict": "07", "featureCode": "0002404953", "timeZone": "05", "msaName": "Orlando-Kissimmee-Sanford, FL", "borrowerIncome": 1, "borrowerIncomePercent": 7.06, "versionID": "2", "demographics": { "demographicsID": 1245911, "reportingYear": 2021, "msamd": "36740", "stateCode": "12", "countyCode": "117", "censusTract": "0215.04", "bisgAreaProbability2orMoreRaces": 0.000008589333, "bisgAreaProbabilityAny": 0.000010487540, "bisgAreaProbabilityAsian": 0.000005132296, "bisgAreaProbabilityBlack": 0.000002005232, "bisgAreaProbabilityHispanic": 0.000005787679, "bisgAreaProbabilityNativeAmerican": 0.000001244620, "bisgAreaProbabilityWhite": 0.000013495616, "businesses": 915, "businessesandFarms": 915, "businesseswRevLTorEqualTo1M": 500, "businesseswRevGT1M": 255, "businesseswRevUnknown": 160, "cdfiInvestmentAreaQualification": "0", "cdfiNewMarketTaxCreditQualification": "0", "censusTractIncomeIndicator": "4", "censusTractIncomeIndicatorCountyMFI": "4", "censusTractMinorityConcentration": 2, "communityIndicator": "U", "distressedTractPopulationLossFlag": false, "distressedTractPovertyFlag": false, "distressedTractUnemploymentFlag": false, "estBorrower1CountFamily": 8.0000, "estBorrower1CountHousehold": 99.6082, "estBorrower2CountFamily": 37.9884, "estBorrower2CountHousehold": 103.4708, "estBorrower3CountFamily": 81.8670, "estBorrower3CountHousehold": 156.4061, "estBorrower4CountFamily": 88.0357, "estBorrower4CountHousehold": 85.3286, "estBorrower5CountFamily": 88.7135, "estBorrower5CountHousehold": 115.8304, "estBorrower6CountFamily": 412.3954, "estBorrower6CountHousehold": 600.3559, "estCountyMedianFamilyIncome": 58300.0000, "estMSAMDMedianFamilyIncome": 70800.0000, "familiesBelowPovertyCount": 8, "familyCount": 717, "farms": 0, "farmswRevLTorEqualTo1M": 0, "farmswRevGT1M": 0, "farmswRevUnknown": 0, "federallyTargetedFlag": false, "fhfaDifficultDevelopmentAreaDDA": false, "fhfaLowIncomeAreaLYA": false, "fhfaUnderservedArea": "0", "householdCount": 1161, "householdCountBelowPoverty": 81, "householdCountInterestRental": 460, "householdCountOther": 176, "householdCountOwnerOccupied": 842, "householdCountPublicAssistance": 11, "householdCountRenterOccupied": 319, "householdCountRetirement": 268, "householdCountSalaried": 684, "householdCountSelfEmployed": 160, "householdCountSocialSecurity": 607, "householdCountSupplementalSecurity": 77, "housingUnitsCount1to4Families": 1036, "housingUnitsCountAllOther": 0, "housingUnitsCountManufactured": 0, "housingUnitsCountMultifamily": 238, "housingUnitsCountRuralFarm": 0, "housingUnitsCountRuralNonFarm": 0, "housingUnitsCountUrbanCluster": 0, "housingUnitsCountUrbanizedArea": 0, "housingUnitsCountVacant": 113, "lagFieldPopulation": false, "lagFieldPoverty": false, "lagFieldUnderserved": false, "lagFieldUnemployment": false, "medianFamilyIncome2orMoreRace": 0, "medianFamilyIncomeAsian": 0, "medianFamilyIncomeBlack": 0, "medianFamilyIncomeDecennialCounty": 63272.0000, "medianFamilyIncomeDecennialMSAMD": 57304.0000, "medianFamilyIncomeDecennialTract": 78606.0000, "medianFamilyIncomeHawaiian": 0, "medianFamilyIncomeHispanic": 77885, "medianFamilyIncomeNativeAmerican": 55714, "medianFamilyIncomeOther": 0, "medianFamilyIncomeWhite": 80893, "medianFamilyIncomeWhiteNonHispanic": 83375, "medianGrossRent": 1935.0000, "medianHouseholdIncome2orMoreRace": 0, "medianHouseholdIncomeAsian": 0, "medianHouseholdIncomeBlack": 0, "medianHouseholdIncomeDecennialMSAMD": 48768.0000, "medianHouseholdIncomeDecennialTract": 60057.0000, "medianHouseholdIncomeHawaiian": 0, "medianHouseholdIncomeHispanic": 60313, "medianHouseholdIncomeNativeAmerican": 55714, "medianHouseholdIncomeOther": 0, "medianHouseholdIncomeWhite": 60511, "medianHouseholdIncomeWhiteNonHispanic": 60089, "medianOwnerOccupiedHUValue": 226100.0000, "metroSA": "36740", "microSA": "NA ", "minorityPopulationPercent": 17.44, "monthlyEstRent100Percent": 1770.0000, "monthlyEstRent120Percent": 2124.0000, "monthlyEstRent30Percent": 531.0000, "monthlyEstRent50Percent": 885.0000, "monthlyEstRent80Percent": 1416.0000, "populationAge0to17": 384, "populationAge18to20": 81, "populationAge21to61": 1408, "populationAge62to64": 132, "populationAge65andOlder": 925, "populationAsian": 0, "populationAsianPercent": 0.00, "populationBlack": 28, "populationBlackPercent": 0.96, "populationBlackNativeAmerican": 0, "populationBlackNativeAmericanPercent": 0.00, "populationExactlyTwoRaces": 41, "populationExactlyTwoRacesPercent": 1.40, "populationFemale": 1726, "populationFemalePercent": 58.91, "populationHawaiian": 0, "populationHawaiianPercent": 0.00, "populationHispanic": 428, "populationHispanicPercent": 14.61, "populationHispanic2orMoreRace": 26, "populationHispanic2orMoreRacePercent": 0.89, "populationHispanicAsian": 0, "populationHispanicAsianPercent": 0.00, "populationHispanicBlack": 0, "populationHispanicBlackPercent": 0.00, "populationHispanicHawaiian": 0, "populationHispanicHawaiianPercent": 0.00, "populationHispanicNativeAmerican": 5, "populationHispanicNativeAmericanPercent": 0.17, "populationHispanicOther": 45, "populationHispanicOtherPercent": 1.54, "populationHispanicWhite": 352, "populationHispanicWhitePercent": 12.01, "populationMale": 1204, "populationMalePercent": 41.09, "populationMinority": 511, "populationNativeAmerican": 45, "populationNativeAmericanPercent": 1.54, "populationNonHispanic": 2502, "populationNonHispanicPercent": 85.39, "populationOther": 45, "populationOtherPercent": 1.54, "populationTotal": 2930, "populationTwoorMoreRaces": 41, "populationTwoorMoreRacesPercent": 1.40, "populationWhite": 2771, "populationWhitePercent": 94.57, "populationWhiteAsian": 0, "populationWhiteAsianPercent": 0.00, "populationWhiteBlack": 11, "populationWhiteBlackPercent": 0.38, "populationWhiteHawaiian": 0, "populationWhiteHawaiianPercent": 0.00, "populationWhiteNativeAmerican": 21, "populationWhiteNativeAmericanPercent": 0.72, "populationWhiteOther": 0, "populationWhiteOtherPercent": 0.00, "population18andOverAsian": 60, "population18andOverBlack": 55, "population18andOverHawaiian": 0, "population18andOverHispanic": 193, "population18andOverHispanic2orMoreRace": 7, "population18andOverHispanicAsian": 3, "population18andOverHispanicBlack": 3, "population18andOverHispanicHawaiian": 0, "population18andOverHispanicNativeAmerican": 4, "population18andOverHispanicWhite": 158, "population18andOverNativeAmerican": 2, "population18andOverTotal": 2460, "population18andOverTwoorMoreRaces": 25, "population18andOverWhite": 2122, "populationIncomeDataIndicator": true, "principalCityFlag": false, "smallCountyIndicator": "T", "splitTract": false, "substantialMinorityTractFlag": false, "substantialRaceEthnicity": 6, "substantialEthnicity": 2, "substantialSex": 2, "tractLatitude": "28.690309", "tractLongitude": "-81.36770", "tractMedianFamilyIncomePercent": 137.17, "underservedRuralTractFlag": false, "yearHomeBuiltMedian": "1976", "href": "https://qpws.rataassociates.com:80/api/demographics/1245911" } } ] }
Usage/ How to Invoke
var collId= "collateralId=" + "{{collateralId}}" // if doing for party add account id here. var appId= "applicationId=" + "{{applicationId}}"var idsForFilters = []; idsForFilters.push(collId); idsForFilters.push(appId); var optionalReqParams = []; var requestParam = { integrationFamily: "Geocoding", apiType: "Geocoding", executionPriority: "1", idsForFiltersMap: idsForFilters, optionalRequestParamsMap: optionalReqParams }; sforce.apex.execute('intframework.IntegrationWebServiceV2', 'runSynchronousIntegrationService', { requestParameters: JSON.stringify(requestParam) });