# Uploading project media

These endpoints allow you to upload media files for Units, Buildings, and Floors — PDF attachments, plan images, and gallery images. All endpoints accept `multipart/form-data` file uploads.

You will need the Realpad DB IDs of the entities you want to update. Unit IDs can be obtained from the [Fetching pricelist data](/integrations/landing-page/fetching-pricelist-data.md) endpoint (`flat_id` field in the response). Building and Floor IDs can be obtained from our support.

## Authentication

All endpoints require `login` and `password` credentials sent as form parameters. Credentials must have the `WRITE_CMS_DATA` permission for the relevant project. See [Authentication & Error Handling](/integrations/introduction/authentication-and-error-handling.md) for details on the credentials model, content type requirements, and banning behavior.

## Common parameters

All endpoints share these required parameters:

* `login` — string login obtained from our support.
* `password` — string password obtained from our support.
* a file upload.

Each endpoint additionally requires an entity ID parameter — see the individual endpoint sections below.

## Response

HTTP codes handling the basic states:

* 5xx for a server error (possible to attempt an automatic retry a few times, provided there is a standoff).
* 4xx for authentication/permission or validation errors (reach out to our support team — no point in retrying).
* 2xx for a successful call (the specific code depends on the endpoint, see below).

***

## `set-unit-pdf`

Sets or replaces the PDF file attached to a Unit. Any file type is accepted, though the typical use case is PDF.

Use **HTTP POST** and the endpoint `https://cms.realpad.eu/ws/v10/set-unit-pdf`

Additional required parameter:

* `unitid` — Realpad DB ID of the Unit (integer).

Sample cURL request:

```bash
curl -X POST \
  -F "login=..." \
  -F "password=..." \
  -F "unitid=12345" \
  -F "file=@/path/to/floorplan.pdf;type=application/pdf" \
  https://cms.realpad.eu/ws/v10/set-unit-pdf
```

On success, returns **HTTP 204** with an empty body.

Possible errors:

* `ID does not refer to a valid object.` — the `unitid` is invalid.
* `Parameters missing.` — no file was uploaded.

***

## `set-unit-plan`

Sets or replaces the floor plan image for a Unit on a given screen. If a plan already exists for the specified screen, it is replaced; otherwise a new one is created.

Use **HTTP POST** and the endpoint `https://cms.realpad.eu/ws/v10/set-unit-plan`

The uploaded file **must** be a PNG or JPEG image.

Additional required parameters:

* `unitid` — Realpad DB ID of the Unit (integer).
* `screenid` — screen ID (resolution variant) for the plan image (integer). Obtain available screen IDs from our support.

Sample cURL request:

```bash
curl -X POST \
  -F "login=..." \
  -F "password=..." \
  -F "unitid=12345" \
  -F "screenid=1" \
  -F "file=@/path/to/plan.png;type=image/png" \
  https://cms.realpad.eu/ws/v10/set-unit-plan
```

On success, returns **HTTP 201** (new plan created) or **HTTP 200** (existing plan replaced), with an empty body.

Possible errors:

* `ID does not refer to a valid object.` — the `unitid` is invalid.
* `Invalid screen ID.` — the `screenid` does not exist.
* `File must be a PNG or JPEG image.` — wrong file type.
* `Parameters missing.` — no file was uploaded.

***

## `set-building-plan`

Sets or replaces the plan image for a Building on a given screen. If a plan already exists for the specified screen, it is replaced; otherwise a new one is created.

Use **HTTP POST** and the endpoint `https://cms.realpad.eu/ws/v10/set-building-plan`

The uploaded file **must** be a PNG or JPEG image.

Additional required parameters:

* `buildingid` — Realpad DB ID of the Building (integer).
* `screenid` — screen ID (resolution variant) for the plan image (integer). Obtain available screen IDs from our support.

Sample cURL request:

```bash
curl -X POST \
  -F "login=..." \
  -F "password=..." \
  -F "buildingid=12345" \
  -F "screenid=1" \
  -F "file=@/path/to/plan.png;type=image/png" \
  https://cms.realpad.eu/ws/v10/set-building-plan
```

On success, returns **HTTP 201** (new plan created) or **HTTP 200** (existing plan replaced), with an empty body.

Possible errors:

* `ID does not refer to a valid object.` — the `buildingid` is invalid.
* `Invalid screen ID.` — the `screenid` does not exist.
* `File must be a PNG or JPEG image.` — wrong file type.
* `Parameters missing.` — no file was uploaded.

***

## `set-floor-plan`

Sets or replaces the plan image for a Floor on a given screen. If a plan already exists for the specified screen, it is replaced; otherwise a new one is created.

Use **HTTP POST** and the endpoint `https://cms.realpad.eu/ws/v10/set-floor-plan`

The uploaded file **must** be a PNG or JPEG image.

Additional required parameters:

* `floorid` — Realpad DB ID of the Floor (integer).
* `screenid` — screen ID (resolution variant) for the plan image (integer). Obtain available screen IDs from our support.

Sample cURL request:

```bash
curl -X POST \
  -F "login=..." \
  -F "password=..." \
  -F "floorid=67890" \
  -F "screenid=1" \
  -F "file=@/path/to/plan.png;type=image/png" \
  https://cms.realpad.eu/ws/v10/set-floor-plan
```

On success, returns **HTTP 201** (new plan created) or **HTTP 200** (existing plan replaced), with an empty body.

Possible errors:

* `ID does not refer to a valid object.` — the `floorid` is invalid.
* `Invalid screen ID.` — the `screenid` does not exist.
* `File must be a PNG or JPEG image.` — wrong file type.
* `Parameters missing.` — no file was uploaded.

***

## `add-unit-gallery-image`

Adds a new image to a Unit's gallery. Unlike `set-unit-plan`, this endpoint always creates a new gallery entry — it does not replace existing images. The Unit must already have a gallery configured in Realpad.

Use **HTTP POST** and the endpoint `https://cms.realpad.eu/ws/v10/add-unit-gallery-image`

The uploaded file **must** be a PNG or JPEG image.

Additional required parameters:

* `unitid` — Realpad DB ID of the Unit (integer).
* `screenid` — screen ID (resolution variant) for the image (integer). Obtain available screen IDs from our support.
* `name` — display name for the gallery image (string).

Sample cURL request:

```bash
curl -X POST \
  -F "login=..." \
  -F "password=..." \
  -F "unitid=12345" \
  -F "screenid=1" \
  -F "name=Living room" \
  -F "file=@/path/to/photo.jpg;type=image/jpeg" \
  https://cms.realpad.eu/ws/v10/add-unit-gallery-image
```

On success, returns **HTTP 201**. The response body contains the **picture ID** (integer) of the newly created gallery entry:

```
42
```

Possible errors:

* `ID does not refer to a valid object.` — the `unitid` is invalid.
* `Invalid screen ID.` — the `screenid` does not exist.
* `Unit does not have a gallery.` — the Unit has no gallery configured.
* `File must be a PNG or JPEG image.` — wrong file type.
* `Parameters missing.` — no file was uploaded.

***

{% hint style="info" %}
See also: [Authentication & Error Handling](/integrations/introduction/authentication-and-error-handling.md) for details on the banning behavior, 415 Unsupported Media Type, and other shared error responses.
{% endhint %}

Reach out to our support team in case of trouble.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.realpadsoftware.com/integrations/landing-page/uploading-project-media.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
