πŸ–ΌοΈUploading unit media

These endpoints allow you to upload media files for individual Units β€” PDF attachments, floor plan images, and gallery images. All three endpoints accept multipart/form-data file uploads.

You will need the Realpad DB IDs of the Units you want to update. These IDs can be obtained from the Fetching pricelist data endpoint (flat_id field in the response).

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 for details on the credentials model, content type requirements, and banning behavior.

Common parameters

All three endpoints share these required parameters:

  • login β€” string login obtained from our support.

  • password β€” string password obtained from our support.

  • unitid β€” Realpad DB ID of the Unit (integer).

  • a file upload.

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

No additional parameters beyond the common ones listed above.

Sample cURL request:

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 parameter:

  • screenid β€” screen ID (resolution variant) for the plan image (integer). Obtain available screen IDs from our support.

Sample cURL request:

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.


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:

  • 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:

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

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.


circle-info

See also: Authentication & Error Handling for details on the banning behavior, 415 Unsupported Media Type, and other shared error responses.

Reach out to our support team in case of trouble.

Last updated