---
title: "v4 /rollups.geojson"
method: POST
path: "/rollups.geojson"
tags: ["rollups"]
---

# v4 /rollups.geojson

`POST /rollups.geojson`

## Request

- Base URL: `https://api.nearmap.com/ai/features/v4`
- URL: `https://api.nearmap.com/ai/features/v4/rollups.geojson`
- Auth: one of:
  - API key in query parameter `apikey`
  - API key in header `Authorization`
  - API key in header `Authorization`

Returns aggregated (rolled up) values computed from all AI features within the given polygon/address and date range.

## Query parameters

- `polygon` string
- `since` string
- `until` string
- `order` 'latest' | 'earliest'
- `bulk` boolean
- `packs` string
- `classes` string
- `streetAddress` string
- `city` string
- `state` string
- `zip` string
- `country` 'US' | 'AU'
- `systemVersion` string
- `systemVersionPrefix` string
- `alpha` boolean
- `beta` boolean
- `3dCoverage` boolean

## Headers

- `X-Nearmap-Ext-Reference` string

## Request body

- object
  - `aoi` object: A GeoJSON object representing the requested AOI. Must be a GeoJSON polygon with no interior rings. It cannot be used with the `polygon` query parameter.
    - `type` 'Polygon': GeoJSON geometry type.
    - `coordinates` GeoJSONPolygonRing[]: The collection of rings defining the Polygon.
      - GeoJSONCoordinate[]: A collection of coordinate pairs that define the Polygon ring.
        - number[]: An ordered pair of floating point numbers in the following sequence: longitude, latitude.
  - `classes` string[]: Classes accepts a list of class IDs. Features classes not requested will be filtered out of the response. The full list of available feature classes can be obtained by using the `classes.json` endpoint (Feature class IDs are in the `id` field for classes of type `Feature`). The response will include all feature classes that the user is entitled to if the query or body parameter is not specified. It cannot be used with the `packs` query parameter. This parameter is ignored if used with an empty value. It cannot be used with the `classes` query parameter.

## Response `200`

OK response to the rollups.geojson endpoint.

- RollupsGeoJSONResult
  - `type` 'FeatureCollection', required: This is always "FeatureCollection".
  - `features` GeoJSONFeature[], required: This array contains a single "feature" representing the requested location.
    - `type` 'Feature', required: This is always "Feature".
    - `geometry` object, required
      - `type` 'Polygon': The GeoJSON geometry type of the requested location.
      - `coordinates` GeoJSONPolygonRing[]: The collection of rings defining the Polygon. This should always only consist of a single ring (more specifically, rectangle) describing the extent of the requested location.
        - GeoJSONCoordinate[]: A collection of coordinate pairs that define the Polygon ring.
          - number[]: An ordered pair of floating point numbers in the following sequence: longitude, latitude.
    - `properties` union, required: A dictionary of rollups keyed by the rollup identifier concatenated with the rollup field type (one of: "value" or "description"), and delimited by underscore. Each identifier will always have both a "description" and "value" field.
      - boolean
      - number
      - string

## Other responses

- `400`: Bad Request. There was a problem with the request parameters.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found. No data is available matching the request criteria.

---

[API](https://skmtc.dev/nearmap/apis/ai-feature-api.md) - [All operations](https://skmtc.dev/nearmap/apis/ai-feature-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nearmap/apis/ai-feature-api/revisions/0522585e7ef3?raw)
