---
title: "Download the zip of a finished 3D extract"
description: "Streams `<slug>_3d_<radius>m.zip` (OBJ + MTL, DXF, DWG when LibreDWG produced one, GeoPackage, buildings.json, preview.png, README.txt) with `Content-Disposition: attachment` and `Accept-Ranges: bytes` (range requests are honoured, so a large zip can be resumed). 409 while the job is still queued/running (poll the status URL), 410 when it failed (the body carries the error), 404 for an unknown or evicted job.\n\nAccepts the token in the `token` header or as `?token=` - a download link must work from a plain `<a href>` and from a Grasshopper HTTP fetch, which cannot set headers. Treat such a URL as a credential."
---

> 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

`GET /res_api/building3d-extract/download/{jobId}`

Streams `<slug>_3d_<radius>m.zip` (OBJ + MTL, DXF, DWG when LibreDWG produced one, GeoPackage, buildings.json, preview.png, README.txt) with `Content-Disposition: attachment` and `Accept-Ranges: bytes` (range requests are honoured, so a large zip can be resumed). 409 while the job is still queued/running (poll the status URL), 410 when it failed (the body carries the error), 404 for an unknown or evicted job.

Accepts the token in the `token` header or as `?token=` - a download link must work from a plain `<a href>` and from a Grasshopper HTTP fetch, which cannot set headers. Treat such a URL as a credential.

## Authentication

Requires one of the following:

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

## Path parameters

- `jobId` (`downloadBuilding3dExtract.path.jobId`; string, required): Job id from the 202 of `POST /res_api/building3d-extract` (UUID v4).
  - format `uuid`; pattern `^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$`

## Query parameters

- `token` (`downloadBuilding3dExtract.query.token`; string, optional): The RES API token as a query parameter - alternative to the `token` header for links and header-less HTTP fetches (Grasshopper). Treat the resulting URL as a credential.

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://res.aireon.ch/res_api/building3d-extract/download/<jobId>' \
  --header 'token: <token>'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/building3d-extract/download/<jobId>';
const options = {method: 'GET', headers: {token: '<token>'}};

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/building3d-extract/download/<jobId>"

headers = {"token": "<token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The zip bytes.

#### Example

```text
string
```

### 206

A byte range of the zip (when a `Range` header was sent).

#### Example

```text
string
```

### 400

`jobId` is not a UUID v4.

#### Example

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

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

### 401

Authentication missing or invalid.

#### Example

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

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

### 403

Authenticated but not permitted.

#### Example

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

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

### 404

Resource not found.

#### Example

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

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

### 409

The job is still queued or running - poll `statusUrl` and retry once `status` is `ready`.

#### Example

```json
{
  "error": "string",
  "status": "queued",
  "phase": "string",
  "statusUrl": "string"
}
```

- `error` (`downloadBuilding3dExtract.response.409.error`; string, required)
- `status` (`downloadBuilding3dExtract.response.409.status`; string, required)
  - one of `"queued"`, `"running"`
- `phase` (`downloadBuilding3dExtract.response.409.phase`; string | null, optional)
- `statusUrl` (`downloadBuilding3dExtract.response.409.statusUrl`; string, optional)

### 410

The job failed (unknown address, no swissBUILDINGS3D 3.0 tile covering the point, empty box, worker crash) or its output has been evicted; `error` says why. Nothing will ever be downloadable for this jobId - start a new job.

#### Example

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

- `error` (`downloadBuilding3dExtract.response.410.error`; string, required)
- `status` (`downloadBuilding3dExtract.response.410.status`; string, required)
  - one of `"error"`


Source: https://docs.aireon.ch/res/download-building3d-extract/index.md
