---
title: "Building footprints with heights and volumes (GeoJSON, sync) - JSON body variant"
description: "Identical to the GET, with the filter in a JSON body. Prefer the GET when a cacheable URL is convenient."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.aireon.ch/llms.txt
> Use this file to discover all available pages before exploring further.

Path: RES API (public) › Building3D

`POST /res_api/building_footprints`

Identical to the GET, with the filter in a JSON body. Prefer the GET when a cacheable URL is convenient.

## Authentication

- `ResApiToken`, apiKey, in header, header `token`

## Request body

_Required._

- `lat` (`postBuildingFootprints.lat`; number, optional)
- `lng` (`postBuildingFootprints.lng`; number, optional)
- `radius_m` (`postBuildingFootprints.radius_m`; number, optional)
  - min 1; max 500; default `100`
- `bbox` (`postBuildingFootprints.bbox`; one of, optional): `[minLng, minLat, maxLng, maxLat]` in WGS84.
  - one of: `string`, `array<number>`
- `egrid` (`postBuildingFootprints.egrid`; string, optional)
  - pattern `^CH[0-9]{12}$`
- `crs` (`postBuildingFootprints.crs`; integer, optional)
  - one of `4326`, `2056`; default `4326`
- `max_features` (`postBuildingFootprints.max_features`; integer, optional)
  - min 1; max 2000; default `1000`

## Example requests

### point

```json
{
  "lat": 47.3769,
  "lng": 8.5417,
  "radius_m": 150,
  "crs": 2056
}
```

### parcel

```json
{
  "egrid": "CH727181999158"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://res.aireon.ch/res_api/building_footprints \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "lat": 47.3769,
  "lng": 8.5417,
  "radius_m": 150,
  "crs": 2056
}
'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/building_footprints';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', token: '<token>'},
  body: JSON.stringify({lat: 47.3769, lng: 8.5417, radius_m: 150, crs: 2056})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://res.aireon.ch/res_api/building_footprints"

payload = {
    "lat": 47.3769,
    "lng": 8.5417,
    "radius_m": 150,
    "crs": 2056
}
headers = {
    "Content-Type": "application/json",
    "token": "<token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Footprints in the requested area.

#### Example

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": 0,
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          null
        ]
      },
      "properties": {
        "res_building_id": 0,
        "egid": 0,
        "objid": "string",
        "address": "string",
        "zip": 0,
        "city": "string",
        "canton": "string",
        "foot_area_m2": 0,
        "vol_m3": 0,
        "vol_src": "roofer_lod22",
        "height_m": 0,
        "h_ground_masl": 0,
        "h_roof_70p_masl": 0,
        "h_roof_max_masl": 0,
        "h_roof_min_masl": 0,
        "h_ridge_masl": 0,
        "roof_type": "string",
        "roof_planes": 0,
        "rf_state": "ok",
        "pc_vintage": 0,
        "floors": 0,
        "year": 0,
        "gstat": 0
      }
    }
  ],
  "numberReturned": 0,
  "capped": true,
  "timeStamp": "2019-08-24T14:15:22Z",
  "crs": {
    "type": "string",
    "properties": {
      "name": "string"
    }
  },
  "query": {},
  "source": {
    "table": "string",
    "roofer_table": "string",
    "vol_src_counts": {
      "property1": 0,
      "property2": 0
    },
    "height_definition": "string"
  }
}
```

- `type` (`postBuildingFootprints.response.200.type`; string, required)
- `features` (`postBuildingFootprints.response.200.features`; array<object>, required)
  - `type` (`postBuildingFootprints.response.200.features.type`; string, required)
  - `id` (`postBuildingFootprints.response.200.features.id`; integer, required): res_building_id - the suite-wide stable building key (also the feature id in the bo_buildings_vol vector tiles).
  - `geometry` (`postBuildingFootprints.response.200.features.geometry`; object, required): A GeoJSON geometry object (Polygon or MultiPolygon here).
    - `type` (`postBuildingFootprints.response.200.features.geometry.type`; string, required)
      - one of `"Polygon"`, `"MultiPolygon"`, `"Point"`, `"LineString"`, `"MultiLineString"`, `"MultiPoint"`, `"GeometryCollection"`
    - `coordinates` (`postBuildingFootprints.response.200.features.geometry.coordinates`; array<unknown>, required)
  - `properties` (`postBuildingFootprints.response.200.features.properties`; object, required)
    - `res_building_id` (`postBuildingFootprints.response.200.features.properties.res_building_id`; integer, optional)
    - `egid` (`postBuildingFootprints.response.200.features.properties.egid`; integer | null, optional): Federal building identifier (GWR EGID).
    - `objid` (`postBuildingFootprints.response.200.features.properties.objid`; string | null, optional): Cadastral (AV) object id - not unique.
    - `address` (`postBuildingFootprints.response.200.features.properties.address`; string | null, optional)
    - `zip` (`postBuildingFootprints.response.200.features.properties.zip`; integer | null, optional)
    - `city` (`postBuildingFootprints.response.200.features.properties.city`; string | null, optional)
    - `canton` (`postBuildingFootprints.response.200.features.properties.canton`; string | null, optional)
    - `foot_area_m2` (`postBuildingFootprints.response.200.features.properties.foot_area_m2`; number | null, optional): Footprint area in m² (computed in LV95).
    - `vol_m3` (`postBuildingFootprints.response.200.features.properties.vol_m3`; number | null, optional): Building volume in m³ from the integrated cascade.
    - `vol_src` (`postBuildingFootprints.response.200.features.properties.vol_src`; string | null, optional): Which estimator produced `vol_m3` (roofer LoD2.2 solid → footprint prism from measured height → GWR volume → GWR floors × 3 m → flat 3 m prism).
      - one of `"roofer_lod22"`, `"footprint_prism"`, `"gwr_gvol"`, `"gwr_floors_prism"`, `"flat_prism"`, `"none"`, `null`
    - `height_m` (`postBuildingFootprints.response.200.features.properties.height_m`; number | null, optional): Building height in metres: roof 70th percentile minus ground for roofer buildings, otherwise the height the volume estimator used.
    - `h_ground_masl` (`postBuildingFootprints.response.200.features.properties.h_ground_masl`; number | null, optional): Ground elevation at the footprint, m a.s.l. (roofer only).
    - `h_roof_70p_masl` (`postBuildingFootprints.response.200.features.properties.h_roof_70p_masl`; number | null, optional): Roof elevation, 70th percentile of LiDAR roof points, m a.s.l. (roofer only).
    - `h_roof_max_masl` (`postBuildingFootprints.response.200.features.properties.h_roof_max_masl`; number | null, optional)
    - `h_roof_min_masl` (`postBuildingFootprints.response.200.features.properties.h_roof_min_masl`; number | null, optional)
    - `h_ridge_masl` (`postBuildingFootprints.response.200.features.properties.h_ridge_masl`; number | null, optional)
    - `roof_type` (`postBuildingFootprints.response.200.features.properties.roof_type`; string | null, optional): slanted | horizontal | unknown (roofer classification).
    - `roof_planes` (`postBuildingFootprints.response.200.features.properties.roof_planes`; integer | null, optional)
    - `rf_state` (`postBuildingFootprints.response.200.features.properties.rf_state`; string | null, optional): Roofer status: ok = LoD2.2 solid available; novol = reconstructed without a valid volume; norecon = not reconstructed.
      - one of `"ok"`, `"novol"`, `"norecon"`, `null`
    - `pc_vintage` (`postBuildingFootprints.response.200.features.properties.pc_vintage`; integer | null, optional): swissSURFACE3D point-cloud vintage year used by the roofer.
    - `floors` (`postBuildingFootprints.response.200.features.properties.floors`; integer | null, optional): GWR floor count.
    - `year` (`postBuildingFootprints.response.200.features.properties.year`; integer | null, optional): GWR construction year.
    - `gstat` (`postBuildingFootprints.response.200.features.properties.gstat`; integer | null, optional): GWR building status code (1004 = existing).
- `numberReturned` (`postBuildingFootprints.response.200.numberReturned`; integer, required)
- `capped` (`postBuildingFootprints.response.200.capped`; boolean, required): True when more buildings matched than `max_features`; narrow the area or tile the request. Capped answers are not cached.
- `crs` (`postBuildingFootprints.response.200.crs`; object, required): GeoJSON named CRS: `urn:ogc:def:crs:EPSG::4326` (default) or `urn:ogc:def:crs:EPSG::2056` when `crs=2056` was requested.
  - `type` (`postBuildingFootprints.response.200.crs.type`; string, optional)
  - `properties` (`postBuildingFootprints.response.200.crs.properties`; object, optional)
    - `name` (`postBuildingFootprints.response.200.crs.properties.name`; string, optional)
- `query` (`postBuildingFootprints.response.200.query`; object, required): The normalised filter that was applied (mode point|bbox|egrid with its parameters).
- `source` (`postBuildingFootprints.response.200.source`; object, required)
  - `table` (`postBuildingFootprints.response.200.source.table`; string, optional)
  - `roofer_table` (`postBuildingFootprints.response.200.source.roofer_table`; string, optional)
  - `vol_src_counts` (`postBuildingFootprints.response.200.source.vol_src_counts`; map<integer>, optional)
  - `height_definition` (`postBuildingFootprints.response.200.source.height_definition`; string, optional)
- `timeStamp` (`postBuildingFootprints.response.200.timeStamp`; string, optional)
  - format `date-time`

### 400

Invalid request.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`postBuildingFootprints.response.400.error`; string, required): Human-readable error description.
- `message` (`postBuildingFootprints.response.400.message`; string, optional): Optional underlying error message.

### 401

Authentication missing or invalid.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`postBuildingFootprints.response.401.error`; string, required): Human-readable error description.
- `message` (`postBuildingFootprints.response.401.message`; string, optional): Optional underlying error message.

### 403

Authenticated but not permitted.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`postBuildingFootprints.response.403.error`; string, required): Human-readable error description.
- `message` (`postBuildingFootprints.response.403.message`; string, optional): Optional underlying error message.

### 500

Server error.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`postBuildingFootprints.response.500.error`; string, required): Human-readable error description.
- `message` (`postBuildingFootprints.response.500.message`; string, optional): Optional underlying error message.

### 504

The PostGIS query exceeded the 10 s statement timeout - narrow the area.

#### Example

```json
{
  "error": "string",
  "detail": "string"
}
```

- `error` (`postBuildingFootprints.response.504.error`; string, optional)
- `detail` (`postBuildingFootprints.response.504.detail`; string, optional)


Source: https://docs.aireon.ch/res/post-building-footprints/index.md
