Integratec API Platform
encodeRecord

Description

Encodes the given address and returns the encoded values.

Remarks

Uses CASS certified software to update and standardize a single address.

The returnCase property specifies the case of the address information returned as a result of encoding. If you use the value AUTO, the service returns the encoded address information in the same case as the original data. All address fields are examined, and the results depend on the original case for each field. If all fields are upper case, the encoded data will be upper case. If all fields are lower case, the encoded data will be lower case. If any field contains mixed case, or if fields contain different cases, the encoded data will be returned in mixed case.

The inSecondaryAddressLine property takes the secondary address information for CASS encoding. If you supply the property in your request, the service returns the encoded address information along with secondaryAddressLine property in the output. If you do not supply the field in your request, the secondaryAddressLine is not returned in the reply.

Example

Request

This request encodes a single address.

{
"inFirm":"",
"inSecondaryAddressLine":"STE 100",
"inAddressLine3":"",
"inAddressLine2":"",
"inAddressLine1":"75 Josons Dr",
"inUrbanization":"",
"inCity":"Rochester",
"inState":"NY",
"inZIPCode":"",
"inCountry":"",
"returnCase":"MIXED",
"firmAsIs":true,
"useCapitalizationTable":true,
"swapAddressLines":true,
"standardizeDeliveryAddress":true,
"standardizeCity":true,
"abbreviateCity":false,
"extendedMatching":true,
"hyphenateZIPCode":true,
"ignoreNonUSPS":false,
"standardizeCountry":true,
"geoCodeAddress":true,
"returnZIP5GeoCodes":true,
"rdiLookup":false,
"addCountryInformation":true,
"areaCodeTimeZoneLookup":true,
"returnZIP5CheckDigit":false,
"intelligentMailBarcode":true,
"noDPVCMRA":false,
"noDPVNoStat":false,
"noDPVVacant":false,
"abbreviateAddress":false,
"imbBarcodeIdentifier":"01",
"imbServiceTypeIdentifier":"300",
"imbCustomerIdentifier":"000944",
"imbSequenceNumber":"000001"
}

Reply

{
"firm":"",
"secondaryAddressLine":"STE 100",
"addressLine3":"",
"addressLine2":"",
"addressLine1":"75 Josons Dr",
"urbanization":"",
"cityAbbreviation":"",
"city":"Rochester",
"state":"NY",
"zipCode":"146233438",
"countyName":"Monroe",
"country":"United States",
"countryCode":"US",
"primaryNumber":"75",
"preDirectional":"",
"streetName":"Josons",
"suffix":"Dr",
"postDirectional":"",
"unitDesignator":"",
"unitNumber":"",
"pmbDesignator":"",
"pmbNumber":"",
"financeNumber":"357105",
"deliveryPoint":"75",
"checkDigit":"4",
"carrierRoute":"C002",
"enhancedLineOfTravel":"0001A",
"recordType":"S",
"lacsIndicator":"",
"congressionalDistrict":"25",
"suiteLinkReturnCode":"",
"fipsCountyCode":"055",
"returnCode":"31",
"footnotes":"0>",
"lacsLinkReturnCode":"",
"lacsLinkIndicator":"",
"rdi":"",
"dpv":"Y",
"dpvCMRA":"N",
"dpvFP":"",
"dpvFootnotes":"AABB",
"dpvNoStat":"N",
"dpvVacant":"N",
"latitude":"43.080648",
"longitude":"-77.659503",
"areaCode":"585",
"timeZone":"EST",
"daylightSavings":true,
"imbDataPayLoad":"0130000094400000000114623343875",
"imbCharacterString":"FFDDAAFFATATFTAFFFFDFDTTTAAFADATFDDTTFTTFTTDDAFDFFFDTADFDADFDDDTF"
}

Request Schema

{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"title":"encodeRecord Request",
"description":"Encodes a single record to USPS standards, using CASS-certified software.",
"properties":{
"inFirm":{
"title":"Input Firm",
"description":"Specifies the Company name used in the address table.",
"type":"string",
"maxLength":50
},
"inSecondaryAddressLine":{
"title":"Input Secondary Address Line",
"description":"Optional input secondary address information. Use this property to get the `secondaryAddressLine` property in the reply.",
"type":"string",
"maxLength":50
},
"inAddressLine3":{
"title":"Input Address Line 3",
"description":"Optional additional input address line.",
"type":"string",
"maxLength":50
},
"inAddressLine2":{
"title":"Input Address Line 2",
"description":"Optional additional input address line.",
"type":"string",
"maxLength":50
},
"inAddressLine1":{
"title":"Input Address Line 1",
"description":"Primary input address line.",
"type":"string",
"maxLength":50
},
"inUrbanization":{
"title":"Input Urbanization",
"description":"Urban name value required for mail delivered to Puerto Rico.",
"type":"string",
"maxLength":28
},
"inCity":{
"title":"Input City",
"description":"Input address city name.",
"type":"string",
"maxLength":50
},
"inState":{
"title":"Input State",
"description":"Input address state name.",
"type":"string",
"maxLength":2
},
"inZIPCode":{
"title":"Input ZIP Code",
"description":"Input 5- or 9-digit ZIP Code.",
"type":"string",
"maxLength":10
},
"inCountry":{
"title":"Input Country",
"description":"Input address country name.",
"type":"string",
"maxLength":50
},
"returnCase":{
"title":"Return Case",
"description":"Case of the address information returned as a result of encoding",
"maxLength":5,
"type":"string",
"enum":[
"UPPER",
"LOWER",
"MIXED",
"AUTO"
],
"enumValues":[
{
"value":"UPPER",
"displayValue":"Upper case",
"description":"Formats text as capital letters."
},
{
"value":"LOWER",
"displayValue":"Formats text as lowercase letters.",
"description":""
},
{
"value":"MIXED",
"displayValue":"Formats text so that the first letter of each word is capitalized.",
"description":""
},
{
"value":"AUTO",
"displayValue":"Auto",
"description":"Returns the encoded address information in the same case as the original data."
}
]
},
"firmAsIs":{
"title":"Firm As-Is",
"description":"Leaves the case of the Company name unchanged during encoding.",
"default":true,
"type":"boolean"
},
"useCapitalizationTable":{
"title":"Use Capitalization Table",
"description":"Entries in the Capitalization Table determine which words remain in all caps when a Mixed Case conversion is performed.",
"default":true,
"type":"boolean"
},
"swapAddressLines":{
"title":"Swap Address Lines",
"description":"Places primary street address in the Delivery Address line; adds secondary address information such as Ste., Apt., etc. to the Secondary Address line.",
"default":true,
"type":"boolean"
},
"standardizeDeliveryAddress":{
"title":"Standardize Delivery Address",
"description":"Converts primary address to postal abbreviation standards.",
"default":true,
"type":"boolean"
},
"standardizeCity":{
"title":"Standardize City",
"description":"Converts city names to postal abbreviation standards.",
"default":true,
"type":"boolean"
},
"abbreviateCity":{
"title":"Abbreviate City",
"description":"Abbreviates city name if it is longer than 13 characters. Nonencoded and non-standardized city names are not abbreviated.",
"default":false,
"type":"boolean"
},
"extendedMatching":{
"title":"Extended Matching",
"description":"Attempts to return an exact match (Return code = 31) by searching for suite/apartment information in the alternate address lines when a default match (Return code = 32) is found.",
"default":true,
"type":"boolean"
},
"hyphenateZIPCode":{
"title":"Hyphenate ZIP Code",
"description":"Includes a hyphen in a 9-digit ZIP Code.",
"default":true,
"type":"boolean"
},
"ignoreNonUSPS":{
"title":"Ignore NonUSPS",
"description":"Skips records with non-USPS ZIP codes when encoding. A non-USPS ZIP Code is defined as any of the following: 5-digit or 9-digit ZIP Code with alpha characters or with a length other than 0, 5, or 9-digits; a 5-digit ZIP Code of '99999' or 9-digit ZIP Code of '99999-9999'; invalid or missing data in the State, or a country code other than blank or US.",
"default":false,
"type":"boolean"
},
"standardizeCountry":{
"title":"Standardize Country",
"description":"Converts country names to postal abbreviation standards.",
"default":true,
"type":"boolean"
},
"geoCodeAddress":{
"title":"GeoCode Address",
"description":"Returns the Lattitude and Longitude of the encoded address.",
"default":true,
"type":"boolean"
},
"returnZIP5GeoCodes":{
"title":"Return ZIP5 GeoCodes",
"description":"Returns the Lattitude and Longitude of the encoded address having a 5-digit ZIP Code.",
"default":true,
"type":"boolean"
},
"rdiLookup":{
"title":"RDI Lookup",
"description":"Determines if the address is business or residential.",
"default":false,
"type":"boolean"
},
"addCountryInformation":{
"title":"Add Country information",
"description":"Returns the standardized country name, and two-digit code of the address.",
"default":true,
"type":"boolean"
},
"areaCodeTimeZoneLookup":{
"title":"Area Code timezone lookup",
"description":"Determines area code and time zone using the USPS lookup data table.",
"default":true,
"type":"boolean"
},
"returnZIP5CheckDigit":{
"title":"Return ZIP5 Check Digit",
"description":"Returns the check digit for the 5-digit ZIP Code, for addresses without the +4 add-on.",
"default":false,
"type":"boolean"
},
"intelligentMailBarcode":{
"title":"Intelligent Mail Barcode",
"description":"The Intelligent Mail barcode is a 65-bar Postal Service(tm) barcode used to sort and track letters and flats.",
"default":true,
"type":"boolean"
},
"noDPVCMRA":{
"title":"No DPV CMRA",
"description":"Do not perform DPV CMRA lookup. CMRA Provides information about whether or not the address is associated with a Commercial Mail Receiving Agent, such as Mail Boxes Etc.",
"default":false,
"type":"boolean"
},
"noDPVNoStat":{
"title":"No DPV NoStat",
"description":"Do not perform DPV NoStat lookup. DPV No Stat is returned by the DPV API to more fully describe the results of the DPV lookup. Indicates whether the address is a vacant property, receives mail as a part of a drop, or does not have an established delivery yet.",
"default":false,
"type":"boolean"
},
"noDPVVacant":{
"title":"No DPV Vacant",
"description":"Do not perform DPV Vacant lookup. DPV Vacant is returned by the DPV API to more fully describe the results of the DPV lookup. USPS records indicate that although this may be a valid address, the residence or business is vacant.",
"default":false,
"type":"boolean"
},
"abbreviateAddress":{
"title":"Abbreviate Address",
"description":"Abbreviates the returned address whenever possible.",
"default":false,
"type":"boolean"
},
"imbBarcodeIdentifier":{
"title":"IMB Barcode Identifier",
"description":"First two digits of the Intelligent Mail barcode.",
"type":"string",
"minLength":2,
"maxLength":2
},
"imbServiceTypeIdentifier":{
"title":"IMB Service Type Identifier",
"description":"The Service Type Identifier field is a 3-digit field that indicates participation in various Postal Service programs For a complete listing of service types, see https://ribbs.usps.gov/intelligentmail_mailpieces/documents/tech_guides/stid.pdf",
"type":"string",
"minLength":3,
"maxLength":3
},
"imbCustomerIdentifier":{
"title":"IMB Customer Identifier",
"description":"A 6-digit or 9-digit number that identifies a specific agent in the mail preparation process who has responsibility for the ownership, content, make up, or preparation of the mail.",
"type":"string",
"minLength":6,
"maxLength":9
},
"imbSequenceNumber":{
"title":"IMB Sequence Number",
"description":"A 6-digit or 9-digit number that uniquely identifies each mailpiece.",
"type":"string",
"minLength":6,
"maxLength":9
}
},
"additionalProperties":false
}

Reply Schema

{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"title":"encodeRecord Reply",
"description":"This is the reply for the encodeRecord request.",
"properties":{
"firm":{
"title":"Returned Firm",
"description":"Returned standardized Company name used in the address table",
"type":"string",
"maxLength":50
},
"secondaryAddressLine":{
"title":"Returned Secondary Address Line",
"description":"Encoded results for Secondary Address Line. Requires the `inSecondaryAddressLine` property in the request.",
"type":"string",
"maxLength":50
},
"addressLine3":{
"title":"Returned Address Line 3",
"description":"Encoded results for Address Line 3.",
"type":"string",
"maxLength":50
},
"addressLine2":{
"title":"Returned Address Line 2",
"description":"Encoded results for Address Line 2.",
"type":"string",
"maxLength":50
},
"addressLine1":{
"title":"Returned Address Line 1",
"description":"Encoded results for Address Line 1.",
"type":"string",
"maxLength":50
},
"urbanization":{
"title":"Returned Urbanization",
"description":"Urban name value required for mail delivered to Puerto Rico.",
"type":"string",
"maxLength":28
},
"cityAbbreviation":{
"title":"Returned City Abbreviation",
"description":"Returned standardized abbreviated city name.",
"type":"string",
"maxLength":13
},
"city":{
"title":"Returned City",
"description":"Returned standardized city name.",
"type":"string",
"maxLength":28
},
"state":{
"title":"Returned State",
"description":"Returned standardized abbreviated state name.",
"type":"string",
"maxLength":2
},
"zipCode":{
"title":"Returned ZIP Code",
"description":"Returned standardized ZIP Code.",
"type":"string",
"maxLength":10
},
"countyName":{
"title":"Returned County Name",
"description":"Returned standardized county name.",
"type":"string",
"maxLength":28
},
"country":{
"title":"Returned Country",
"description":"Returned standardized country name.",
"type":"string",
"maxLength":50
},
"countryCode":{
"title":"Returned Country Code",
"description":"Returned two-digit ISO3166 country code. ",
"type":"string",
"maxLength":2
},
"primaryNumber":{
"title":"Returned parsed primary number",
"description":"Number preceding the street name.",
"type":"string",
"maxLength":10
},
"preDirectional":{
"title":"Returned parsed predirectional",
"description":"Notation preceding the street name, indicating street direction (East, West,North or South).",
"type":"string",
"maxLength":2
},
"streetName":{
"title":"Returned parsed street name",
"description":"Returned steet name.",
"type":"string",
"maxLength":28
},
"suffix":{
"title":"Returned parsed suffix",
"description":"The part of the delivery address line immediately following the street name (AVE, BLVD, ST, etc.).",
"type":"string",
"maxLength":4
},
"postDirectional":{
"title":"Returned parsed postdirectional",
"description":"The notation following the street name indicating street direction (East, West, North or South).",
"type":"string",
"maxLength":2
},
"unitDesignator":{
"title":"Returned parsed unit designator",
"description":"Identifies the secondary address unit (apartment, suite, etc.).",
"type":"string",
"maxLength":4
},
"unitNumber":{
"title":"Returned parsed unit number",
"description":"Returned apartment or sute number",
"type":"string",
"maxLength":8
},
"pmbDesignator":{
"title":"Returned parsed PMB designator",
"description":"Identifies a Private Mail Box.",
"type":"string",
"maxLength":3
},
"pmbNumber":{
"title":"Returned parsed PMB number",
"description":"Idenfifies a Private Mail Box number.",
"type":"string",
"maxLength":8
},
"financeNumber":{
"title":"Finance Number",
"description":"Finance number for the Post Office of mailing.",
"type":"string",
"maxLength":6
},
"deliveryPoint":{
"title":"Delivery Point DP",
"description":"Single mailbox or other place at which mail is delivered. It differs from a street address, in that each address may have several delivery points, such as an apartment, office or department.",
"type":"string",
"maxLength":2
},
"checkDigit":{
"title":"Check Digit CD",
"description":"character following a line of data, allowing automated equipment to validate its reading of the information.",
"type":"string",
"maxLength":1
},
"carrierRoute":{
"title":"Carrier Route CRRT",
"description":"Addresses along the route in which the postal carrier delivers mail.",
"type":"string",
"maxLength":4
},
"enhancedLineOfTravel":{
"title":"Enhanced Line Of Travel ELOT",
"description":"A sequence of ZIP + 4 codes arranged in the order that a route is served by a carrier.",
"type":"string",
"maxLength":5
},
"recordType":{
"title":"Record Type",
"description":"Indicates the type of address reord (street, PO Box, etc.) that the delivery address was matched to during encoding.",
"type":"string",
"maxLength":1
},
"lacsIndicator":{
"title":"LACS Indicator",
"description":"Indicates whether the delivery point can be convertedusing the LACSLink system",
"type":"string",
"maxLength":1
},
"congressionalDistrict":{
"title":"Congressional District",
"description":"Identifies in which Congressional District the address is located.",
"type":"string",
"maxLength":2
},
"suiteLinkReturnCode":{
"title":"Returned SuiteLink return code",
"description":"Information about the results of SuiteLink lookup. SuiteLink assigns secondary information to input addresses identified as highrise default records.",
"type":"string",
"maxLength":2
},
"fipsCountyCode":{
"title":"FIPS County Code",
"description":"Assigned to a given county or parish within a state.",
"type":"string",
"maxLength":3
},
"returnCode":{
"title":"Return Code",
"description":"Information about the results of the encoding process.",
"type":"string",
"maxLength":2
},
"footnotes":{
"title":"Footnotes",
"description":"Codes returned as a result of encoding to further explain the results.",
"type":"string",
"maxLength":100
},
"lacsLinkReturnCode":{
"title":"Returned LACSLink return code",
"description":"Letter codes returned by the LACSLink process when an accurate address match could not be made.",
"type":"string",
"maxLength":2
},
"lacsLinkIndicator":{
"title":"Returned LACSLink indicator",
"description":"Used for CASS testing. See https://ribbs.usps.gov/cassmass/documents/tech_guides/TECHNICAL_GUIDES/CASSTECH_N.pdf.",
"type":"string",
"maxLength":1
},
"rdi":{
"title":"RDI",
"description":"Indicates if the address is business or residential.",
"type":"string",
"maxLength":1
},
"dpv":{
"title":"DPV",
"description":"DPV processing validates address information at the physical delivery point level",
"type":"string",
"maxLength":1
},
"dpvCMRA":{
"title":"DPV CMRA",
"description":"Provides information about whether or not the ddress is associated with a Commercial Mail Receiving Agent, such as Mail Boxes Etc.",
"type":"string",
"maxLength":1
},
"dpvFP":{
"title":"DPV False Positive",
"description":"Result from the DPV lookup in the False Positive table. The DPV False Positive indicator returns the values 'Y', 'N', and ‘ ‘ (blank).",
"type":"string",
"maxLength":1
},
"dpvFootnotes":{
"title":"DPV Footnotes",
"description":"Returned by the DPV API to more fully describe the results of the DPV lookup.",
"type":"string",
"maxLength":8
},
"dpvNoStat":{
"title":"DPV No Stat Indicator",
"description":"Returned by the DPV API to more fully describe the results of the DPV lookup. Indicates whether the address is a vacant property, it receives mail as a part of a drop, or it does not have an established delivery yet.",
"type":"string",
"maxLength":1
},
"dpvVacant":{
"title":"DPV Vacant Indicator",
"description":"Returned by the DPV API to more fully describe the results of the DPV lookup. USPS records indicate that although this may be a valid address, the residence or business is vacant.",
"type":"string",
"maxLength":1
},
"latitude":{
"title":"Latitude",
"description":"Value for the distance measured north or south from the earth's equator ",
"type":"string"
},
"longitude":{
"title":"Longitude",
"description":"Value for the distance measured east or west from the Prime Meridian at Greenwich, England.",
"type":"string"
},
"areaCode":{
"title":"Area Code",
"description":"Three-digit number identifying one of the telephone service regions into which the US, Canada, and certain other countries are divided.",
"type":"string",
"maxLength":3
},
"timeZone":{
"title":"Time Zone",
"description":"A geographic region within which the same standard time is used.",
"type":"string",
"maxLength":10
},
"daylightSavings":{
"title":"Daylight Savings Time Indicator",
"description":"Defines if the ZIP Code falls within a region participating in Daylight Saving Time.",
"type":"boolean"
},
"imbDataPayLoad":{
"title":"IMB Data PayLoad",
"description":"",
"type":"string",
"maxLength":31
},
"imbCharacterString":{
"title":"IMB Character String",
"description":"Intelligent Mail barcode output displayed as characters F, A, D, and T, (where F=full bar, A=ascender, T=tracker and D=descender) representing the bars in the barcode.",
"type":"string",
"maxLength":65
},
"message":{
"title":"Reply Message",
"description":"This is the encodeRecord reply message.",
"type":"string"
}
},
"additionalProperties":false
}