Neighborhood

Neighborhoods are collection of destination objects. The API allows retrieving and listing neighborhoods with polygon bounds.

The Neighborhood object

Property Type Description
id uuid string Unique identifier for the object
name string Name of the neighborhood
city string City of the neighborhood
state string State of the neighborhood
country string Country of the neighborhood
polygon GeoJSON polygon Polygon bounds of the neighborhood
created_at ISO datetime string Timestamp of when neighborhood was created
modified_at ISO datetime string Timestamp of when neighborhood was modified

Retrieve a Neighborhood

Retrieves a neighborhood object with the id.

HTTP Request

GET https://app.hypertrack.io/api/v1/neighborhoods/<id>/

Returns

Returns a neighborhood object if a valid identifier was provided.

curl -H "Authorization: token YOUR_PK_TOKEN" \
     -X GET \
     https://app.hypertrack.io/api/v1/neighborhoods/f3ead2ae-dc0a-4a7e-85be-74ee51d9d70a/

Example response

{
  "id": "72b911d9-b374-4989-a0b9-60d4a618213c",
  "name": "Kalkare Extension",
  "city": "Bengaluru",
  "state": "KA",
  "country": "IN",
  "polygon": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          77.66369290000002,
          13.0160065
        ],
        [
          77.66369290000002,
          13.0161065
        ],
        [
          77.66379290000002,
          13.0161065
        ],
        [
          77.66379290000002,
          13.0160065
        ],
        [
          77.66369290000002,
          13.0160065
        ]
      ]
    ]
  },
  "created_at": "2016-05-20T09:36:13.868940Z",
  "modified_at": "2016-05-20T09:36:13.868996Z"
}

List all Neighborhoods

List all neighborhood objects. The list can be filtered using the following parameters.

HTTP Request

GET https://app.hypertrack.io/api/v1/neighborhoods/

Returns

Returns a list of neighborhoods.

curl -H "Authorization: token YOUR_SK_TOKEN" \
     -X GET \
     https://app.hypertrack.io/api/v1/neighborhoods/?page_size=20

Example response

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "b6d84674-3c19-488a-a574-297c81cdafcb",
      "name": "Bhandup Village Rd",
      "city": "Mumbai",
      "state": "MH",
      "country": "IN",
      "polygon": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              72.9435083,
              19.1560068
            ],
            [
              72.9434083,
              19.1560068
            ],
            [
              72.9434083,
              19.155906799999997
            ],
            [
              72.9435083,
              19.155906799999997
            ],
            [
              72.9435083,
              19.1560068
            ]
          ]
        ]
      },
      "created_at": "2016-05-22T16:02:03.009377Z",
      "modified_at": "2016-05-22T16:02:03.009430Z"
    },
    {
      "id": "72b911d9-b374-4989-a0b9-60d4a618213c",
      "name": "Kalkare Extension",
      "city": "Bengaluru",
      "state": "KA",
      "country": "IN",
      "polygon": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              77.66369290000002,
              13.0160065
            ],
            [
              77.66369290000002,
              13.0161065
            ],
            [
              77.66379290000002,
              13.0161065
            ],
            [
              77.66379290000002,
              13.0160065
            ],
            [
              77.66369290000002,
              13.0160065
            ]
          ]
        ]
      },
      "created_at": "2016-05-20T09:36:13.868940Z",
      "modified_at": "2016-05-20T09:36:13.868996Z"
    }
  ]
}

Was this helpful? Yes, thanks! Not really

results matching ""

    No results matching ""