Index | Authentication | Offices | Associates | Properties | Property Descriptions | Property Rooms | Property Images
Lookups | Geo data | Files

Property Images

General

PropertyImages resource represents images you associate with yourproperty. You can add images, update image infomation and delete images for a apecific property.

For every image you upload we create minimum 2 images: a THUMBNAILand a WEB image. If the image is large enough, we create also a LARGE image and, in some cases, an EXTRA LARGE image. The number and type ofimages we have created is shown with element HasLargeImage. This is a system generated value after we successfuly upload and transform yourimage:

You can see the new images using following pattern:

{base root url of public website}/userimages/{RegionID}/{image name}

base root url of public website
In case of Global website this is: http://global.com
In case of EU regional websites you can use you regional website domainor just http://www.properties.eu
RegionID
This is a value that we will provide to you when you are accepted as an Integrator and we set up your account
image name
This is the value you get in ImageURL element when you retreive the PropertyImage object or a list of PropertyImage objects

You have to provide a unique SequenceNumber for all your images.This will alow us to sort your images in the order you desire. The sequence number must be unique within the scope of a property, not forall images you will ever upload.

You can also associate an image with a specific room. Al you haveto do is to provide the PropertyRoom ID in the corresponding PropertyImage field and that image will be asociated with the room.

Supported methods

* All listings are provided as example.They might not contain the entire list of fields. For the complete list of fields, please consult the corresponding data dictionary.

Get list of images for one property

This method returns the list of all the images for a property.
This list is not paginated. You will get all images associated to a property in one call.

Call

GET integrator/{integrator id}/propertyImages/{property id}

Required parameters:

property id
ID or ExternalID of a property

Request

GET http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005536015-1 HTTP/1.1 

Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk+", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"
Accept: application/xml; charset=utf-8

Response XML

HTTP/1.1 200 OK 
Content-Type: application/xml; charset=utf-8

<RexApiList xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HasNextPage>false</HasNextPage>
<HasPreviousPage>false</HasPreviousPage>
<PageIndex>1</PageIndex>
<PageSize>2</PageSize>
<TotalCount>2</TotalCount>
<TotalPageCount>1</TotalPageCount>
<Items>
<PropertyImage>
<HasLargeImage>0</HasLargeImage>
<ID>110866933</ID>
<ImageInfoModifiedDate>2012-12-02T05:23:02.673</ImageInfoModifiedDate>
<ImageURL>L_0fe58b2034de4566a9ec979ba5d28dce_iList.jpg</ImageURL>
<ImageUploadDate>2012-12-02T05:23:02.673</ImageUploadDate>
.....
</PropertyImage>
.....
</Items>
</RexApiList>

Response JSON

HTTP/1.1 200 OK 
Content-Type: application/json; charset=utf-8

{
"HasNextPage": false,
"HasPreviousPage": false,
"PageIndex": 1,
"PageSize": 2,
"TotalCount": 2,
"TotalPageCount": 1,
"Items": [
{
"IntegratorID": 1005001,
"PropertyID": "1005536015-1",
"PropertyExternalID": "40592030_RCD",
"ID": 110866933,
"SequenceNumber": 2,
"ImageURL": "L_0fe58b2034de4566a9ec979ba5d28dce_iList.jpg",
"IsDefault": false,
.....
},
.....
]
}

Http Status Codes Responses & Messages

Status Message Description
200 - OK You get the list of objects Call was successful
404 - Not Found No resources were found for the specified Property ID

Get an image detail

This method returns the details of one image.

Call

GET integrator/{integrator id}/propertyImages/{property ID}/{property image ID}

Required parameters:

property ID
ID or ExternalID of a property
property image ID
The ID of the image.

Request

GET http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyimages/1005344006-14/408705286 HTTP/1.1 

Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk+", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"
Accept: application/xml; charset=utf-8

Response XML

HTTP/1.1 200 OK 
Content-Type: application/xml; charset=utf-8

<PropertyImage xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<DescriptiveName> </DescriptiveName>
<HasLargeImage>0</HasLargeImage>
<ID>408705286</ID>
<ImageInfoModifiedDate>2014-08-22T02:11:00</ImageInfoModifiedDate>
<ImageURL>L_43a047d97d2746a3807c9d0624853075_iList.jpg</ImageURL>
<ImageUploadDate>2014-08-22T02:11:00</ImageUploadDate>
<IntegratorID>1005001</IntegratorID>
<IsDefault>true</IsDefault>
<PropertyExternalID>PV14150223_CKW</PropertyExternalID>
<PropertyID>1005344006-14</PropertyID>
<SequenceNumber>1</SequenceNumber>
</PropertyImage>

Response JSON

HTTP/1.1 200 OK 
Content-Type: application/json; charset=utf-8

{
"IntegratorID": 1005001,
"PropertyID": "1005344006-14",
"PropertyExternalID": "PV14150223_CKW",
"ID": 408705286,
"SequenceNumber": 1,
"ImageURL": "L_43a047d97d2746a3807c9d0624853075_iList.jpg",
"DescriptiveName": "",
"IsDefault": true,
"HasLargeImage": 0,
"ImageUploadDate": "2014-08-22T02:11:00",
"ImageInfoModifiedDate": "2014-08-22T02:11:00"
}

Http Status Codes Responses & Messages

Status Message Description
200 - OK You get the resource object Call was successful
404 - Not Found No resource was found for the specified ID

Create a property image

This method allows you to create a new property image.

Following values from your object model are ignored:

Call

POST integrator/{integrator id}/propertyImages/{property id}

Required parameters:

property ID
ID or ExternalID of a property

Request XML

In XML, elements order is important. The order is alphabetical.

POST http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14 HTTP/1.1 
Accept: application/xml; charset=utf-8
Content-Type: application/xml; charset=utf-8
Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"

<PropertyImage xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<DescriptiveName>Some description here</DescriptiveName>
<HasLargeImage>0</HasLargeImage>
<ID>408705286</ID>
<ImageInfoModifiedDate>2014-08-22T02:11:00</ImageInfoModifiedDate>
<ImageURL>L_43a047d97d2746a3807c9d0624853075_iList.jpg</ImageURL>
<ImageUploadDate>2014-08-22T02:11:00</ImageUploadDate>
<IntegratorID>1005001</IntegratorID>
<IsDefault>true</IsDefault>
<PropertyExternalID>PV14150223_CKW</PropertyExternalID>
<PropertyID>1005344006-14</PropertyID>
<SequenceNumber>1</SequenceNumber>
</PropertyImage>

Response XML

HTTP/1.1 201 Created 
Content-Type: application/xml; charset=utf-8
Location: http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14/123454

... created Property Image object ...

Request JSON

In JSON, element order does not matter. In our example they are ordered alphabetically just for comparation with the XML response.

POST http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14 HTTP/1.1 
Accept: application/json; charset=utf-8
Content-Type: application/json; charset=utf-8
Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"

{
"IntegratorID": 1005001,
"PropertyID": "1005344006-14",
"PropertyExternalID": "PV14150223_CKW",
"ID": 408705286,
"SequenceNumber": 1,
"ImageURL": "L_43a047d97d2746a3807c9d0624853075_iList.jpg",
"DescriptiveName": "some optional description here",
"IsDefault": true,
"HasLargeImage": 0,
"ImageUploadDate": "2014-08-22T02:11:00",
"ImageInfoModifiedDate": "2014-08-22T02:11:00"
}

Response JSON

HTTP/1.1 201 Created 
Content-Type: application/json; charset=utf-8
Location: http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14/123454

... created Property Image object ...

Http Status Codes Responses & Messages

Status Message Description
201 - Created You get the created resource object Call was successful
400 - Bad request <Error>
�� <Message>
����� New resource validation failure. Resource was not created.
�� </Message>
�� <MessageDetail>
����� .....
�� </MessageDetail>
</Error>
<MessageDetail> element will contain the reasons why validation failed. Correct the issues and try again.
400 - Bad request <Error>
�� <Message>The request is invalid.</Message>
�� <ModelState>
����� <requestModel>.....</requestModel>
�� </ModelState>
</Error>
The object you tried to upload does not match the expected object definition. <ModelState> element will explain where your object do not match the expected model. Please correct the raised issues and try again.
409 - Conflict <Error>
�� <Message>
���� Resource was not created. Please contact Gryphtech support.
�� </Message>
</Error>
Please contact Gryphtech Support

Update property Update image information

This method allows you to update the information of an existing image. You cannot update the image itself. If you need to change the photo, then please delete existing image record and create a new one.

Following values from your object model are ignored:

Call for FULL update

PUT integrator/{integrator id}/propertyImages/{property id}/{property image ID}

Call for PARTIAL update

PATCH integrator/{integrator id}/propertyImages/{property id}/{property image ID}

Required parameters:

property id
ID or ExternalID of a property
property image iD
The ID of the property image.

Use the complete object when you do a FULL update. Use only object properties that changed when you do a PARTIAL update.

In the following listings you have the partial update exemplification.

Request XML

PUT http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14/408705286  HTTP/1.1 
Accept: application/xml; charset=utf-8
Content-Type: application/xml; charset=utf-8
Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"

<PropertyImage>
<IsDefault>true</IsDefault>
<SequenceNumber>3</SequenceNumber>
</PropertyImage>

Request JSON

PUT http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14/408705286 HTTP/1.1 
Accept: application/json; charset=utf-8
Content-Type: application/json; charset=utf-8
Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"

{
"IsDefault": true,
"SequenceNumber": 3
}

Response XML & JSON

If the update was successful you will get the resource object back with the updated values. See Get Property image method for XML and JSON responses.

Http Status Codes Responses & Messages

Status Message Description
200 - OK You get the updated resource object Call was successful
404 - Not Found <Error>
�� <Message>
����� Cannot find any resource to update for the supplied ID. Requested operation was not performed
�� </Message>
�� <MessageDetail>
����� PropertyID {0} = {1}, PropertyImage ID = {2}
�</MessageDetail>
</Error>
Resource was not found for the specified resource ID
400 - Bad Request <Error>
�� <Message>
����� New resource validation failure. Resource was not updated.
�� </Message>
�� <MessageDetail>
����� .....
�� </MessageDetail>
</Error>
<MessageDetail> element will contain the reasons why validation failed. Correct the raised issues and try again.
400 - Bad Request <Error>
�� <Message>The request is invalid.</Message>
�� <ModelState>
����� <requestModel>.....</requestModel>
�� </ModelState>
</Error>
The object you tried to upload does not match the expected object definition. <ModelState> element will explain where your object do not match the expected model. Please correct the raised issues and try again.

Delete one property image

This method delete a property image. The image information will be deleted from database and all image versions (web, thumbnail) of that image will be deleted from disk.

Call

DELETE integrator/{integrator id}/propertyImages/{property ID}/{property image ID} 

Required parameters:

property ID
ID or ExternalID of a property
property image ID
The ID of the property image

Request

DELETE http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyImages/1005344006-14/408705286 HTTP/1.1 
Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"

Response

HTTP/1.1 204 No Content

Http Status Codes Responses & Messages

Status Message Description
204 - No Content Call was successful
400 - Bad request
<Error>
�� <Message>
����� Invalid Property ID. Requested operation was not performed.
�� </Message>
</Error>
No property found with the specified property ID. Delete all rooms operation was not performed

Delete all images

This method deletes all property images. The images information will be deleted from database and all image versions (web, thumbnail) of those images will be deleted from disk.

Call

DELETE integrator/{integrator id}/propertyImages/{property id}

Required parameters:

property id
ID or ExternalID of a property

Request

DELETE http://rexapi.gryphtech.com/api/v1/integrator/1005001/propertyimages/ext-6242_Test1
Authorization: OAUTH oauth_token="pfl4PLrrHKChIRoDS2O9Wfoyr1yjKgbEjCxk", api_key="10D35802-C92A-42B3-88FC-A4489A3CD619"

Response

HTTP/1.1 204 No Content

Http Status Codes Responses & Messages

Status Message Description
204 - No Content Call was successful
400 - Bad request
<Error>
�� <Message>
����� Invalid Property ID. Requested operation was not performed.
�� </Message>
</Error>
No property found with the specified property ID. Delete all rooms operation was not performed