Realty Image API (2.0)

Download OpenAPI specification:Download

Introduction

Realty Image API allows an agent to manage images content for realty.

Contact

If you have any questions, comments or feedback regarding our APIs, please contact developer@ovipro.fi.

Realty Images

API endpoints for realty images management including uploading images.

Realty image management uses AWS S3 as document storage. Following diagram shows how different services should be used.

Get short-lived grant for uploading realty image

Uploading a realty image starts with call to this endpoint. Response contains short-lived grant for uploading document's file content. Uploading the document is done using AWS S3's presigned POST.

Example usage:

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  </head>
  <body>
    <form action="{response.url}" method="{response.method}" enctype="multipart/form-data">
      <input type="hidden" name="key" value="{response.fields.key}" />
      <input type="hidden" name="Policy" value="{response.fields.Policy}" />
      <input type="hidden" name="X-Amz-Algorithm" value="{response.fields.X-Amz-Algorithm}" />
      <input type="hidden" name="X-Amz-Credential" value="{response.fields.X-Amz-Credential}" />
      <input type="hidden" name="X-Amz-Date" value="{response.fields.X-Amz-Date}" />
      <input type="hidden" name="X-Amz-Signature" value="{response.fields.X-Amz-Signature}" />
      <input type="hidden" name="X-Amz-Security-Token" value="{response.fields.X-Amz-Security-Token}" />
      File:
      <input type="file" name="file" /> <br />
      <input type="submit" name="submit" value="Upload to Amazon S3" />
    </form>
  </body>
</html>

After uploading file content document's metadata must be saved using POST /realty/{realtyId}/images endpoint.

Authorizations:
bearerAuth
query Parameters
type
required
string
Example: type=image/png

Content-type for document that is going to be uploaded.

Allowed content types are:

  • image/jpeg
  • image/png
  • image/webp
header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Responses

Response samples

Content type
application/json
{
  • "fields": {
    }
}

Save realty images using uploaded files

This endpoint assumes that image has been uploaded to temporary storage using grant from GET /uploadGrants endpoint. Meta data for image must be saved using this endpoint to make it accessible.

Realty image list order is determined by uploadedImages array's order. If there are existing images new images are added after existing images.

Maximum total amount for each realty is 200.

Authorizations:
bearerAuth
path Parameters
realtyId
required
string <uuid> ^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[8...
Example: ddc25849-7bc7-43c0-9c3b-602cb03f7806

Unique realty identifier in UUID format.

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Request Body schema: application/json
required
Array of objects [ 1 .. 200 ] items

An array of objects representing the images to be uploaded. Each object contains the key for the uploaded image and optional metadata.

Responses

Request samples

Content type
application/json
{
  • "uploadedImages": [
    ]
}

Response samples

Content type
application/json
{
  • "realtyImages": [
    ]
}

Fetch realty images

Fetch metadata of images by realty. Images are returned in preferred order.

Authorizations:
bearerAuth
path Parameters
realtyId
required
string <uuid>
Example: 212114ec-819e-483c-a8e0-f82289ac6e19

Identifier for realty whose images are returned.

Responses

Response samples

Content type
application/json
{
  • "realtyImages": [
    ]
}

Updates metadata for realty's images

Updates metadata for given realty's images

Authorizations:
bearerAuth
path Parameters
realtyId
required
string <uuid> ^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[8...
Example: ddc25849-7bc7-43c0-9c3b-602cb03f7806

Unique realty identifier in UUID format.

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Request Body schema: application/json
required
Array of objects [ 1 .. 200 ] items

An array of objects representing all realty's images.

Realty image list is ordered using order of the array.

Responses

Request samples

Content type
application/json
{
  • "realtyImages": [
    ]
}

Response samples

Content type
application/json
{ }

Deletes a realty image

Deletes a realty image. If image has been published it cannot be deleted.

Authorizations:
bearerAuth
path Parameters
realtyImageId
required
string <uuid>
Example: 940bf547-122f-4811-8ca0-6ffb9776f035

ID of the realty image to be deleted.

realtyId
required
string <uuid> ^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[8...
Example: ddc25849-7bc7-43c0-9c3b-602cb03f7806

Unique realty identifier in UUID format.

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Responses

Response samples

Content type
application/json
{ }

Copying Realty Images

API for copying realty images from one realty to another.

Copies realty images

Copy realty images and corresponding metadata of given realty to other realty.

Authorizations:
bearerAuth
path Parameters
realtyId
required
string <uuid> ^([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[8...
Example: ddc25849-7bc7-43c0-9c3b-602cb03f7806

Identifier for target realty where images are copied.

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Request Body schema: application/json
sourceRealtyId
required
string <uuid>

Identifier for the realty which images are copied.

Responses

Request samples

Content type
application/json
{
  • "sourceRealtyId": "0fb5f172-b06d-4e49-8beb-5140e3b6f944"
}

Response samples

Content type
application/json
{ }