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 Translations Flexmls: Listing Meta Field List Translations Flexmls: Listing Reports Flexmls: Listing Updates 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: 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: FloPlans Listings: Historical Listings: History Listings: Hot Sheet Parameters 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 Messages News Feed News Feed: Curation News Feed: Events News Feed: Groups News Feed: Metadata News Feed: Restrictions News Feed: Schedule News Feed: Settings News Feed: Templates Notifications Open Houses Portals Portal Groups Portal Groups: Current Portal Groups: Tags Portals: Listing Categories Portals: Metadata Preferences Properties Properties: Clusters Properties Meta: Standard Fields 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
API Explorer
Supporting Documentation
Examples
RESO Web API
RETS
Terms of Use

Alpha Only: This service is subject to change

This service is a work in progress. It is currently subject to change or removal without notice.

Conditional GET Requests

Some services, such as the Standard Fields service and the Custom Fields service, support conditional GET requests that only return a response body if the corresponding data has been modified since the Last-Modified timestamp or the ETag was generated.

This feature is especially useful when caching data locally in your application, as it will allow you to check the staleness of your cached data with a potentially lightweight request, while providing you with fresh data if stale.

 

Last-Modified/If-Modified-Since

Resources that allow a conditional GET request will always respond with a Last-Modified header when a response body is sent. In subsequent requests, pass this value in the If-Modified-Since request header to only receive a response body if the data has changed since the the provided time. If the data is not stale, an HTTP 304 response will be returned, with an empty body.

See this in action in the example below. Note that the response body is omitted from the first example purely for brevity.

$ curl "https://sparkapi.com/v1/standardfields" -H "X-SparkApi-User-Agent: SparkAPIExamples" -H "Authorization: OAuth MY_OAUTH2_ACCESS_TOKEN" {} -D -

HTTP/1.1 200
Date: Thu, 14 Aug 2014 18:35:57 GMT
ETag: "c94df465e7f9dc849cfb724967d63ebd"
Last-Modified: Tue, 12 Aug 2014 15:42:08 GMT
Status: 200
 
$ curl "https://sparkapi.com/v1/standardfields" -H "X-SparkApi-User-Agent: SparkAPIExamples" -H "Authorization: OAuth MY_OAUTH2_ACCESS_TOKEN" -H "If-Modified-Since: Tue, 12 Aug 2014 15:42:08 GMT" {} -D -

HTTP/1.1 304
Date: Thu, 14 Aug 2014 18:38:42 GMT
ETag: "c94df465e7f9dc849cfb724967d63ebd"
 

ETag/If-None-Match

Resources that allow a conditional GET request will always respond with a ETag header when a response body is sent. Like the Last-Modified example above, if the If-None-Match request parameter is supplied with this value, a response body will only be returned if the data has been updated since the ETag was generated. Otherwise, an HTTP 304 response will be returned, with an empty body.

See this in action in the example below. Note that the response body is omitted from the first example purely for brevity.

 
$ curl "https://sparkapi.com/v1/standardfields" -H "X-SparkApi-User-Agent: SparkAPIExamples" -H "Authorization: OAuth MY_OAUTH2_ACCESS_TOKEN" {} -D -

HTTP/1.1 200
Date: Thu, 14 Aug 2014 18:35:57 GMT
ETag: "c94df465e7f9dc849cfb724967d63ebd"
Last-Modified: Tue, 12 Aug 2014 15:42:08 GMT
Status: 200
 
$ curl "https://sparkapi.com/v1/standardfields" -H "X-SparkApi-User-Agent: SparkAPIExamples" -H "Authorization: OAuth MY_OAUTH2_ACCESS_TOKEN" -H "If-None-Match: \"c94df465e7f9dc849cfb724967d63ebd\"" {} -D -

HTTP/1.1 304
Date: Thu, 14 Aug 2014 18:38:42 GMT
ETag: "c94df465e7f9dc849cfb724967d63ebd"