Back to Docs

districts.getDistrictsFromZip

districts.getDistrictsFromZip gets all districts that overlap the area for a given zip code.

Parameters

The one required parameter for getDistrictsFromZip is 'zip' which should be a valid 5 digit zip code.

Return Value

Districts are returned either in XML or JSON with all of the fields listed below:

Errors

Errors are indicated by setting the HTTP status code to 400 and returning a text string describing the error. The following errors may be encountered districts.getDistrictsFromZip:

Example Calls

districts.getDistrictsFromZip.xml?zip=12345

<response>
    <districts>
    <district>
        <state>NY</state>
        <number>21</number>
    </district>
    </districts>
</response>

districts.getDistrictsFromZip?zip=27511

{"response": 
    {"districts": [
      {"district": {"state": "NC", "number": "4"}}, 
      {"district": {"state": "NC", "number": "13"}}
    ]}
}