Documentation
API Endpoints
Get a Precinct
Get a specific Precinct.
HTTP Request
GET /v1/precincts/{id}
Examples
- Get a specific Precinct:
- https://api.ballotapi.org/v1/precincts/345-6
Query Parameters
There are currently no query parameters for this endpoint.
Response
We will return an Precinct object for the specified id.
Example response:
{
"type": "precinct",
"id": "345-6",
"ocd_id": null,
"election_id": "123-4",
"voting_info": {...},
"geo": {...},
}
HTTP Response Codes
| Code | Response Format | Description |
|---|---|---|
200
|
Response | Successful request. |
400
|
Error Response | The query parameters you included were invalid. The Error Response will include a message describing exactly was invalid. |
404
|
Error Response | We could not find an Precinct with that id. |
429
|
N/A |
You are making too many requests to the API. Check the
Retry-After header for how many seconds to
wait until trying the request again. See our docs on
Rate Limiting.
|
500
|
N/A | An internal server error occurred. We log these errors and try to fix them quickly, so if you keep getting 500 errors for a few days, please email us. |
503
|
N/A | We are down for maintenance. Please try your request again in a few minutes. |
504
|
N/A | Your request timed out. Please try your request again in a few minutes. |