Download OpenAPI specification:Download
If you have any questions, comments or feedback regarding our APIs, please contact developer@ovipro.fi.
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.
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.
type required | string Example: type=image/png Content-type for document that is going to be uploaded. Allowed content types are:
|
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. |
{- "fields": {
- "key": "uploads/b91d3115-9890-4cd3-8bc8-b93ac8c0596c",
- "Policy": "eyAiZXhwaXJhdGlvbiI6ICIyMDE1LTEyLTMwVDEyOjAwO",
- "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
- "X-Amz-Credential": "AKIAIOSFODNN7EXAMPLE/20151229/us-east-1/s3/aws4_request",
- "X-Amz-Date": "20151229T000000Z",
- "X-Amz-Signature": "8afdbf4008c03f22c2cd3cdb72e4afbb1f6a588f3255ac628749a66d7f09699e",
- "X-Amz-Security-Token": "V1LXdlc3QtMSJHMEUCIQCmfdtzv3Q7Zz6f7J6",
- "content-type": "image/jpg"
}
}
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.
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. |
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. |
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. |
{- "uploadedImages": [
- {
- "uploadedImageKey": "uploads/ed476c60-8008-4e05-bfeb-5c96556f73d5",
- "metadata": {
- "description": [
- {
- "languageCode": "fi",
- "text": "Keittiö"
}, - {
- "languageCode": "en",
- "text": "The kitchen"
}, - {
- "languageCode": "sv",
- "text": "Köket"
}
], - "classification": [ ],
- "includedInPublishing": "YES"
}
}, - {
- "uploadedImageKey": "uploads/9d724b79-c87f-4f5d-9e6e-915047e7dffa",
- "metadata": {
- "classification": [
- "FLOOR_PLAN"
], - "includedInPublishing": "NO"
}
}
]
}
{- "realtyImages": [
- {
- "uploadedImageKey": "uploads/ed476c60-8008-4e05-bfeb-5c96556f73d5",
- "realtyImageId": "d33fa366-9e5e-47b6-bebe-09de8c1cd347"
}, - {
- "uploadedImageKey": "uploads/9d724b79-c87f-4f5d-9e6e-915047e7dffa",
- "realtyImageId": "f23784bd-cb8e-4a97-8803-580edb4d779b"
}
]
}
Fetch metadata of images by realty. Images are returned in preferred order.
realtyId required | string <uuid> Example: 212114ec-819e-483c-a8e0-f82289ac6e19 Identifier for realty whose images are returned. |
{- "realtyImages": [
- {
- "realtyImageId": "64bcf6b6-952a-4b34-96b5-63657b9263ab",
- "imageUrls": {
- "imageProxyUrlTemplate": "//9d8e685cd48b.cloudfront.net/{imageParameters}/realty/93070636-8332-45f9-9855-f91db40166b4/64bcf6b6-952a-4b34-96b5-63657b9263ab.jpeg"
}, - "contentType": "image/jpg",
- "imageDescription": [
- {
- "languageCode": "fi",
- "text": "Keittiö"
}, - {
- "languageCode": "en",
- "text": "The kitchen"
}, - {
- "languageCode": "sv",
- "text": "Köket"
}
], - "classification": [ ],
- "rotate": "DEGREES_90",
- "includedInPublishing": "YES",
- "firstPublishingTime": "2024-11-12T04:52:12Z"
}, - {
- "realtyImageId": "336cb53b-1e6d-42d8-a74d-4399b7090fd4",
- "imageUrls": {
- "imageProxyUrlTemplate": "//9d8e685cd48b.cloudfront.net/{imageParameters}/realty/93070636-8332-45f9-9855-f91db40166b4/336cb53b-1e6d-42d8-a74d-4399b7090fd4.jpeg"
}, - "contentType": "image/jpg",
- "classification": [
- "FLOOR_PLAN"
], - "rotate": "DEGREES_0",
- "includedInPublishing": "YES",
- "firstPublishingTime": "2024-11-12T04:52:12Z"
}
]
}
Updates metadata for given realty's images
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. |
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. |
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. |
{- "realtyImages": [
- {
- "realtyImageId": "64bcf6b6-952a-4b34-96b5-63657b9263ab",
- "classification": [ ],
- "includedInPublishing": "YES"
}, - {
- "realtyImageId": "336cb53b-1e6d-42d8-a74d-4399b7090fd4",
- "classification": [
- "FLOOR_PLAN"
], - "includedInPublishing": "YES",
- "description": [
- {
- "languageCode": "fi",
- "text": "Keittiö"
}, - {
- "languageCode": "en",
- "text": "The kitchen"
}, - {
- "languageCode": "sv",
- "text": "Köket"
}
]
}
]
}
{ }
Deletes a realty image. If image has been published it cannot be deleted.
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. |
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. |
{ }
Copy realty images and corresponding metadata of given realty to other realty.
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. |
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. |
sourceRealtyId required | string <uuid> Identifier for the realty which images are copied. |
{- "sourceRealtyId": "0fb5f172-b06d-4e49-8beb-5140e3b6f944"
}
{ }