---
title: "Render a parcel image (PNG) - query-string variant"
description: "Same as the POST variant but driven entirely by query parameters. Send the auth token in the `token` header; the `token` query parameter still works but is deprecated (a URL carries it into logs) and is refused from outside the box once `RES_TOKEN_QUERY=deny` is set. For an `<img src>`, proxy the image through your own server, which adds the header."
---

> 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) › Parcel

`GET /res_api/parcel_image`

Same as the POST variant but driven entirely by query parameters. Send the auth token in the `token` header; the `token` query parameter still works but is deprecated (a URL carries it into logs) and is refused from outside the box once `RES_TOKEN_QUERY=deny` is set. For an `<img src>`, proxy the image through your own server, which adds the header.

## Authentication

Requires one of the following:

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

## Query parameters

- `token` (`getParcelImageGet.query.token`; string, required): RES API token.
- `lat` (`getParcelImageGet.query.lat`; number, optional): WGS84 latitude. Provide lat+lng or x_3857+y_3857.
- `lng` (`getParcelImageGet.query.lng`; number, optional): WGS84 longitude.
- `x_3857` (`getParcelImageGet.query.x_3857`; number, optional): Web Mercator X. Provide lat+lng or x_3857+y_3857.
- `y_3857` (`getParcelImageGet.query.y_3857`; number, optional): Web Mercator Y.
- `img_size` (`getParcelImageGet.query.img_size`; integer, optional): Output image width/height in pixels.
  - default `512`
- `bounding_dist` (`getParcelImageGet.query.bounding_dist`; number, optional): Half-extent of the rendered bounding box, in metres.
  - default `200`
- `style` (`getParcelImageGet.query.style`; string, optional): Render style.
  - one of `"ratio_v_free"`, `"score"`, `"red"`, `"green"`; default `"ratio_v_free"`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://res.aireon.ch/res_api/parcel_image?token=string' \
  --header 'token: <token>'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/parcel_image?token=string';
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/parcel_image?token=string"

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

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

print(response.text)
```

## Responses

### 200

PNG image, or a plain-text error body.

#### Body (text/html)

##### Example

```text
coordinate missing
```

#### Body (image/png)

##### Example

```text
string
```

### 401

Authentication missing or invalid.

#### Example

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

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

### 500

Internal failure while building the WMS request. Plain text, `Cache-Control: no-store`.

#### Example

```text
string
```

### 502

GeoServer WMS unreachable, or it answered a non-2xx status or a non-image body (a WMS ServiceException). Plain text, `Cache-Control: no-store`.

#### Example

```text
string
```


Source: https://docs.aireon.ch/res/get-parcel-image-get/index.md
