Available Methods

Create a Property Image

POST https://www.relahq.com/api/v1/object/property_image

Headers

NameTypeDescription

TOKEN*

Your API Token

API-KEY*

Your API Key

content-type*

String

application/json

Request Body

NameTypeDescription

file*

Array

For BASE 64 Encoded Image:

{

'file': BASE64_ENCODED_DATA,

'filename': 'file_name_here.jpg'

}

For URL

{

'url': 'https://example.com/filename.jpg'

}

property_reference*

Integer

Rela nid of Property to add image to

description

String

Description of the image

main_image

Bool

Set as main image

date_taken

Timestamp

Original date taken in UNIX timestamp

HTTP/1.1 200 OK 
#Example Response
{
  "nid": "123456",
  "uri": "https://www.relahq.com/relaautologin/a83523c3d71f593d7e9c003dsd0c451c8b41dc79602d612fe812883safsa34"
}

Update an Image

PUT https://www.relahq.com/api/v1/object/property_image/{nid}

Example request for updating image.

Path Parameters

NameTypeDescription

nid*

String

The Rela defined id representing the property

Headers

NameTypeDescription

content-type*

String

application/json

API-KEY*

String

Your API Key

TOKEN*

String

Your API Token

Request Body

NameTypeDescription

state*

String

2 character state abbreviation

city*

String

City of the property

premise

String

Apartment or suite

street*

String

Property number and street name

HTTP/1.1 200 OK 
#Example Response
{
    "nid": "1234",
    "uri": "https://www.relahq.com/relaautologin/a83523c3d71f593d7e9c003dsd0c451c8b41dc79602d612fe812883safsa34"
}

For multiple property images, the optional parameter external_id may be added to uniquely identify images to prevent duplicates from being imported. To get and create multiple images at once for a given property site:

Get multiple Property Images

GET https://www.relahq.com/api/v1/object/property_images/{property_nid}

Path Parameters

NameTypeDescription

property_nid*

String

Rela nid of a property

Headers

NameTypeDescription

API-KEY*

String

Your API Key

TOKEN*

String

Your API Token

content-type*

String

application/json

HTTP/1.1 200 OK 
#Example Response
{
  [
  {
    "nid": "96572581",
    "url": "https://rela-s3-e-dev.s3.amazonaws.com/public/property-images/prop-nid-92145891/homephoto1.jpg"
  },
  {
    "nid": "96572582",
    "url": "https://rela-s3-e-dev.s3.amazonaws.com/public/property-images/prop-nid-92145891/homephoto2.jpg"
  }
 ]
}

Create multiple Property Images

POST https://www.relahq.com/api/v1/object/property_images

Headers

NameTypeDescription

TOKEN*

Your API Token

API-KEY*

Your API Key

content-type*

String

application/json

Request Body

NameTypeDescription

file*

Array

File or URL

property_reference*

Integer

Rela nid of Property to add image to

external_id

String

To uniquely identify images

HTTP/1.1 200 OK 
#Example Response
{
  [
  “Images queued for processing.”
 ]
}

Uploaded images via a zip file

POST https://www.relahq.com/api/v1/object/zipped_images

Headers

NameTypeDescription

API-KEY*

Your API Key

TOKEN*

Your API Token

Request Body

NameTypeDescription

zip_uri*

String

The publicly accessible uri to the zip file containing the images you want to upload

property_reference*

Integer

The property nid to attache the images to

return_uri

String

A URI enpoint to POST the results of the newly created Property Images to.

HTTP/1.1 200 OK 
#Example Response
{
  [
    "08b687160bae67a41bee65ef136d79cc"
  ]
}

Last updated