swagger: "2.0"
schemes:
  - http
host: api.phila.gov
basePath: /polling-places/v1
info:
  contact:
    x-twitter: PhiladelphiaGov
  description: |
    
    This data set contains the list of polling places. It can be organized by ward/division, accessibility rating, or type of building.

    This list is used to assign poll workers, send the machines and necessary accessibility materials, etc.

    **Endpoint:** http://api.phila.gov/polling-places/v1
  title: Polling Places API
  version: "1.0"
  x-apisguru-categories:
    - open_data
  x-logo:
    url: https://twitter.com/PhiladelphiaGov/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/CityOfPhiladelphia/phlapi/gh-pages/pollingplaces/swagger.json
      version: "2.0"
  x-providerName: phila.gov
  x-serviceName: pollingplaces
paths:
  /:
    get:
      parameters:
        - description: Ward Number
          format: int32
          in: query
          name: ward
          required: true
          type: integer
        - description: Division Number
          format: int32
          in: query
          name: division
          required: true
          type: integer
        - description: Optional parameter for jsonp support.
          in: query
          name: callback
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: An array containing the polling place
          schema:
            $ref: "#/definitions/features"
      summary: Get Polling Places Data
definitions:
  features:
    properties:
      building:
        description: |
          Assigned code to denote the accessibility of the polling place. See above for details of the codes.
          F = Building Fully Accessible;
          B = Building Substantially Accessible;
          M = Building Accessibilty Modified;
          A = Alternate Entrance;
          R = Building Accessible With Ramp;
          N = Building Not Accessible
        type: string
      display_address:
        description: Mailing address of the polling place (formatted for display purposes).
        type: string
      division:
        description: The number of the electoral section that houses the polling place.
        type: string
      lat:
        description: Latitudinal coordinates of the polling place.
        format: float
        type: number
      lng:
        description: Longitudinal coordinates of the polling place.
        format: float
        type: number
      location:
        description: The name of the polling place.
        type: string
      parking:
        description: |
          Assigned code to denote the availability of parking. See above for details of the codes.
          N = No Parking;
          G = General Parking;
          L = Loading Zone;
          H = Handicap Parking
        type: string
      pin_address:
        description: Mailing address of the polling place.
        type: string
      ward:
        description: The number of the electoral subdivision that houses the polling place.
        type: string
      zip_code:
        description: Zipcode of the polling place.
        format: int32
        type: integer
