Developer Documentation
Platform Overview
Authentication
API Services
Overview Accounts Accounts: Associations Accounts: Metadata Accounts: Profile Appstore: Users Broker Distributions Broker Tours Consumers Consumers: Linked Agents Contacts Contacts: Activity Contacts: Export Contacts: Tags Contacts: Portal Accounts Developers: Identities Developers: Keys Developers: Authorizations Developers: Billing Summary Developers: Change History Developers: Domains Developers: News Feed Webhooks Developers: Roles Developers: Syndications Developers: Templates Developers: Usage Detail Developers: Usage Summary Devices Flexmls: Email Links Flexmls: Listing Meta Origins Flexmls: Listing Meta Translations Flexmls: Listing Meta Field List Translations Flexmls: Listing Reports Flexmls: Mapping Layers Flexmls: Mapping Shapegen IDX IDX Links Listing Carts Listing Carts: Portal/VOW Carts Incomplete Listings Incomplete Listings: Documents Incomplete Listings: Documents Metadata Incomplete Listings: Document Uploads Incomplete Listings: Floor Plans Incomplete Listings: FloPlans Incomplete Listings: Photos Incomplete Listings: Photos Metadata Incomplete Listings: Photo Uploads Incomplete Listings: Rooms Incomplete Listings: Tickets Incomplete Listings: Units Incomplete Listings: Videos Incomplete Listings: Videos Metadata Incomplete Listings: Virtual Tours Incomplete Listings: Virtual Tours Metadata Listings Listings: Clusters Listings: Documents Listings: Documents Metadata Listings: Floor Plans Listings: FloPlans Listings: Historical Listings: History Listings: Notes Listings: Search Parameters Listings: Open Houses Listings: Photos Listings: Photos Metadata Listings: Photo Uploads Listings: Document Uploads Listings: Rental Calendar Listings: Rooms Listings: Rules Listings: Tour of Homes Listings: Tickets Listings: Units Listings: Validation Listings: Videos Listings: Videos Metadata Listings: Virtual Tours Listings: Virtual Tours Metadata Listing Meta: Custom Fields Listing Meta: Custom Field Groups Listing Meta: Field Order Listing Meta: Field Relations Listing Meta: Property Types Listing Meta: Rooms Listing Meta: Standard Fields Listing Meta: Units Registered Listings Market Statistics News Feed News Feed: Curation News Feed: Events News Feed: Metadata News Feed: Restrictions News Feed: Schedule News Feed: Settings News Feed: Templates Open Houses Overlays Overlays: Shapes Portals Preferences Saved Searches Saved Searches: Provided Saved Searches: Restrictions Saved Searches: Tags Search Templates: Quick Searches Search Templates: Views Search Templates: Sorts Shared Links System Info System Info: Languages System Info: Search Templates
Supporting Documentation
Examples
RESO Web API
RETS
FloPlan
Terms of Use

Listings: Photos

The Listing Photos service returns data about listing photos for a specific listing to be retrieved. URIs to various photo sizes are returned rather than image files.

Photo Uploads

See the Photo Uploads documentation to see the preferred method for uploading, and attaching, a new photo to a listing.

  1. Supported Roles
  2. Available Services
    1. Listing Photos
    2. Individual Listing Photo
    3. Restoring Deleted Photos
  3. Photo Description
  4. Expansions
 

Supported Roles

Role Reads Writes Notes
IDX Yes No
Public Yes No
VOW Yes No
Portal Yes No
Private Yes Yes

More information about roles may be found here.

 

Available Services

Listing Photos

/<API Version>/listings/<Listing.Id>/photos
/<API Version>/listings/incomplete/<IncompleteListing.Id>/photos

HTTP Method Description Notes
GET Returns a list of all photos associated with the current listing
POST Uploads a photo to attach to a listing
PUT Allows reordering of photos or batch updates for photo Privacy values
DELETE Returns HTTP 405 (Method Not Allowed) Not implemented

GET Request

Parameters:

 

GET Response

Example:

{
    "D": {
        "Success": true,
        "Results": [
            {
                "ResourceUri": "/v1/listings/20060412165917817933000000/photos/20080917142739989238000000",
                "Id": "20080917142739989238000000",
                "Name": "Listing Photo",
                "Caption": "",
                "UriThumb": "http://photos.sparkplatform.com/demomls/20080917142739989238000000-t.jpg",
                "Uri300": "http://photos.sparkplatform.com/demomls/20080917142739989238000000.jpg",
                "Uri640": "http://resize.sparkplatform.com/demomls/640x480/true/20080917142739989238000000-o.jpg",
                "Uri800": "http://resize.sparkplatform.com/demomls/800x600/true/20080917142739989238000000-o.jpg",
                "Uri1024": "http://resize.sparkplatform.com/demomls/1024x768/true/20080917142739989238000000-o.jpg",
                "Uri1280": "http://resize.sparkplatform.com/demomls/1280x1024/true/20080917142739989238000000-o.jpg",
                "Uri1600": "http://resize.sparkplatform.com/demomls/1600x1200/true/20080917142739989238000000-o.jpg",
                "Uri2048": "http://resize.sparkplatform.com/demomls/2048x1600/true/20080917142739989238000000-o.jpg",
                "UriLarge": "http://photos.sparkplatform.com/demomls/20080917142739989238000000-o.jpg",
                "Primary": true,
                "Tags": {"Room": ["Living"]}
            }
        ]
    }
}
 

POST Request

Request body:

{
    "D": {
        "Photos": [
            {
                "Picture": "AB81959FEDAA...",
                "FileName": "GreatPic.jpg",
                "Name": "Front porch",
                "Caption": "Step onto the hand-felled timber of your new front porch for the ultimate in luxurious relaxation"
            }
        ]
    }
}
 

POST Response

The standard success/fail response is returned.

PUT Request

Request body:
 

For the global PUT to the listing, if only the Id attribute is provided, the photos will be reordered for the listing. Otherwise, if Privacy is passed along with the Id, the specified records will have their Privacy attribute updated.

These two operations will not be performed at the same time.

Reordering

{
    "D": {
        "Photos": [
            {"Id": "20111213041526458274000000"},
            {"Id": "20121214041526458275000000"},
            {"Id": "20130415041526458276000000"},
            {"Id": "20130516041526458277000000"}
        ]
    }
}
 

Batch Privacy Updates

Maximum of 50 records allowed in a single request.

{
    "D": {
        "Photos": [
            {"Id": "20111213041526458274000000", "Privacy": "Private"},
            {"Id": "20121214041526458275000000", "Privacy": "Private"}
        ]
    }
}
 

PUT Response

The standard success/fail response is returned.

Individual Listing Photo

/<API Version>/listings/<Listing.Id>/photos/<Id>
/<API Version>/listings/incomplete/<IncompleteListing.Id>/photos/<Id>

HTTP Method Description Notes
GET Returns the specified photo
POST Returns HTTP 405 (Method Not Allowed) Not implemented
PUT Updates an existing photo
DELETE Deletes one or more existing photos. Extra photos may be appended by <Id> to the URI so long as they are delimited by commas. A maximum of 50 photos may be removed at once.

GET Request

Parameters:

 

GET Response

See the GET response section above for the data format.

PUT Request

The PUT request supports the following operations for manipulating a photo, each of these operations must be performed independently in separate requests.

Rotation:

You can rotate a photo by passing a single attribute of Rotate with a value of clockwise (90 degrees right) or counterclockwise (90 degrees left). If you are performing a rotation, you cannot update any other attributes. Below is a sample PUT request for a clockwise rotation:

{
    "D": {
        "Photos": [
            {"Rotate": "clockwise"}
        ]
    }
}
 

Order:

You can reorder a single photo in the overall photo set by passing the Order attribute. The value must be greater than 0, and any number higher than the size of the photo set will bump the photo to the last position. Below is a sample PUT request to move a photo to the beginning:

{
    "D": {
        "Photos": [
            {"Order": 1}
        ]
    }
}
 

Update:

See the POST request section above for the data format.

PUT Response

The standard success/fail response is returned.

DELETE Request

Primary Photo

You may not delete the primary photo for a listing unless it is the only remaining photo.

 

Multiple Photos

Versioning is not supported when deleting multiple photos. Photos deleted in bulk cannot be restored.

 

Parameters:

 

DELETE Response

{
    "D": {
      "Version": 1,
      "ExpiresIn": 14400
    }
}
 

Restoring Deleted Photos

/<API Version>/listings/<Listing.Id>/photos/<Id>/versions/current

HTTP Method Description Conditional Notes
GET Returns HTTP 405 (Method Not Allowed) No Not implemented
POST Returns HTTP 405 (Method Not Allowed) No Not implemented
PUT Restores the state of a photo to a previous version No
DELETE Returns HTTP 405 (Method Not Allowed) No Not implemented

PUT Request

Request body:

{
    "D": {
      "Version": 1
    }
}
 

PUT Response

The standard success/fail response is returned.

 
 
 

Photos Description

Photo Sizes

If the original size of a photo is smaller than the corresponding attribute declares, the picture linked to will be the original size rather than stretched to specified dimensions. For example, the photo referenced by Uri1280 will be 1280x1024 or smaller.

Attribute Data Type Writeable Required Description
Id Character No No The unique id for the photo.
ResourceUri Character No No The URI to the particular photo data (not the image).
Picture Character Yes POST Base64 encoded representation of the image file. Not present when retrieving photo data.
FileName Character Yes POST The name of the original file being uploaded. Not present when retrieving photo data.
Name Character Yes Yes The name of the photo. Maximum of 40 characters.
Caption Character Yes No Text intended as the photo's caption. Maximum of 1000 characters.
Privacy Character Yes No Either Public or Private (default: Public). This is the desired privacy level of the photo, and is used to determine the CurrentPrivacy attribute.
CurrentPrivacy Character No No Either Public or Private. Private photos will only be available to FBS products, and will only be available for private roles. Use this attribute to determine the active privacy level of the photo.
Rotate Character PUT No The direction to rotate the photo, either clockwise or counterclockwise. Not present when retrieving photo data.
Uri300 Character No No
Uri640 Character No No The URI to the 640x480 image.
Uri800 Character No No The URI to the 800x600 image.
Uri1024 Character No No The URI to the 1024x768 image.
Uri1280 Character No No The URI to the 1280x1024 image.
Uri1600 Character No No The URI to the 1600x1200 image.
Uri2048 Character No No The URI to the 2048x1600 image.
UriLarge Character No No The URI to the original image.
Primary Boolean Yes No true if the photo is intended as the listing's primary photo.
Tags JSON Object No No The possible tags, and tag groups, are defined in the photos metadata resource. This is the only attribute that can be used when filtering the Photos expansion.
{
  "Tags": {
    "Room": ["Living"]
  }
}
 

Expansions

None.