ZIP Code provides a set of information useful for display purposes. For example, if you are interested in tariffs for ZIP code 48322, you can retrieve additional information such as the city and county name as well as the latitude and longitude coordinates.

Data Definitions

ZIP Code

The Zip Code has the following data structure.

Name Type Description
zipcode String 5 character string of the zip code
latitude Integer Latitude of this location.
longitude Integer Longitude of this location.
city String Display name of the city containing this ZIP code.
county String Display name of the county containing this ZIP code.
areaCode String String containing the area code(s) containing this ZIP code. Area codes are separated a forward slash e.g. 415/510.
cityType String Not currently used.
cityAliasAbbreviation String If not null, this has the abbreviation this city may be commonly used for this city.
elevation Integer Highest point of elevation (in feet) within this zip code.
dayLightSaving Boolean True or false on whether this ZIP code observes daylight savings.
cityMixedCase String Alternate display name of the city containing this ZIP code.
stateAnsi Integer State ANSI code representing the state containing this ZIP code.
countyAnsi Integer ANSI code representing the state containing this ZIP code.
state String Two character abbreviation of the state containing this ZIP code.
timeZone Integer Number indicating the time zone. e.g. 8 is Pacific Time Zone.

Note the State ANSI codes for the USA can be found on https://www.census.gov/geo/reference/ansi_statetables.html.

Here’s an example in JSON of a ZIP code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
	"zipcode":"48322",
	"latitude":42,
	"longitude":-83,
	"city":"WEST BLOOMFIELD",
	"county":"OAKLAND",
	"areaCode":"248/734",
	"cityType":"B",
	"cityAliasAbbreviation":"W BLOOMFIELD",
	"elevation":943,
	"dayLightSaving":true,
	"classificationCode":null,
	"cityMixedCase":"West Bloomfield",
	"cityAliasMixedCase":"West Bloomfield",
	"stateAnsi":26,
	"countyAnsi":125,
	"state":"MI",
	"timeZone":5
}

Get a ZIP Code Details

This allows you to get the details for a ZIP code in the standard response format.

Resource URI

GET /rest/public/zipcodes/{zipCode}

Request Parameters

Along with the standard pagination parameters, searching and sorting parameters, and the required security parameters, the following parameters are available as part of the request:

Name Type Description
zipCode String Phrase for searching the names of ZIP Codes (Optional)

Example

GET /rest/public/zipcodes/48322

The JSON above is the output of this sample request.

History

  • Formatting update - 3/10/2015
  • Initial Release - 6/9/2011 - Zip Code