Media
The Media Resource is a database and informational representation of media, such as photos, virtual tours, documents/supplements, etc.
See the Media Resource in the RESO Data Dictionary.
Please note that the ModificationTimestamp
of a Media record can change without changing the related listings ModificationTimestamp
. If any media record for a listing changes, then the listings PhotosChangeTimestamp
or DocumentsChangeTimestamp
will be updated (as appropriate).
You can query the Media resource independently of the Property resource and receive all photos and documents. You can also query the Property resource for changes in both its PhotosChangeTimestamp
and DocumentsChangeTimestamp
fields in order to determine if media records have changed.
Examples
Remember to URL Encode query string values prior to sending HTTP requests. To aid with readability, the URLs in this document are displayed without URL encoding and wrapped over multiple lines.
Retrieve a Media Record by MediaKey
This query will retrieve the Media record with a MediaKey equal to 61400d19-417e-4f43-b36e-efffb352a128:
https://query.ampre.ca/odata/Media('61400d19-417e-4f43-b36e-efffb352a128')
Retrieve Recently Created/Modified Media Records
This query will retrieve Media records of size 'Large' that have been created or modified after a specific date and time:
https://query.ampre.ca/odata/Media
?$filter=ImageSizeDescription eq 'Large'
and ResourceName eq 'Property'
and ModificationTimestamp ge 2023-07-27T04:00:00Z
&$orderby=ModificationTimestamp,MediaKey
Office Logos
Office logos are stored in the Media
resource. The Office record will contain a PhotosChangeTimestamp
field indicating the last time the logo for the office was changed.
This query will retrieve the logo for an Office with a OfficeKey equal to 123456:
https://query.ampre.ca/odata/Media
?$filter=ResourceRecordKey eq '123456'
and ResourceName eq 'Office'
&$orderby=ModificationTimestamp,MediaKey
Member Photos
Member photos (headshots) are stored in the Media
resource. The Member record will contain a PhotosChangeTimestamp
field indicating the last time the photo(s) for the member was changed.
This query will retrieve the photos for a Member with a MemberKey equal to 123456:
https://query.ampre.ca/odata/Media
?$filter=ResourceRecordKey eq '123456'
and ResourceName eq 'Member'
&$orderby=ModificationTimestamp,MediaKey