API LIBRARY
Collapse Sidebar Menu
Expand Drawer

WebAPI

Postman


We recommend using the Postman tool for logging into and using the Trestle WebAPI. In addition to the walkthrough below, feel free to use this Postman collection for examples of other queries and criteria available in the Trestle WebAPI. To easily load the collection into Postman, open Postman and select File -> Import. Then, select the "Import From Link" tab and paste the following URL: https://docs-trestle.corelogic.com/content/collections/Trestle_API.postman_collection.json
Press the import button and you will see a new collection added to Postman.

1. Login and Authentication: Get Access Token


Create a GET request to https://api-prod.corelogic.com/trestle/odata/$metadata using OAuth 2.0 authorization.


Access Token Parameters


To enter the Access Token values, press the Get New Access Token button.


Enter the information for the new Access Token as described below.

  • Token Name = [This is the name of the variable that is returned with your token. It can be anything. In Postman, you'll need to remember the name of the token for later requests.]
  • Grant Type = Client Credentials
  • Access Token URL = https://api-prod.corelogic.com/trestle/oidc/connect/token
  • Client ID = [Your username]
  • Client Secret = [Your password]
  • Scope = api
  • Client Authentication = Send client credentials in body

Press the Request Token button to get your token. The response comes back in a popup window.

Scroll down in the popup window and press the Use Token button. The token is only good for a period of time. The expires_in value is the number of second this token is good for. (e.g., 3600 seconds = 1 hour)


2. Get Metadata


Create a GET request to https://api-prod.corelogic.com/trestle/odata/$metadata using OAuth 2.0 authorization.
Set the Access Token to the token from section 1. If you are using Postman, there is a dropdown named Available Tokens that will have the token from section 1 with the token name you gave it.
Click the Send button to get the XML metadata back.


Retrieving Listing Data



3. Get Listings


Create a GET request to https://api-prod.corelogic.com/trestle/odata/Property?Class=Residential&$top=5   using OAuth 2.0 authorization and your Access Token.
The Property in this link is the resource we're querying. The Class=Residential is the property type to find listings in. We're limiting the results to only 5 records with $top=5 since this can be very resource intensive.
Click the Send button and you should see fields and data for 5 listings.


4. Get Photo URLs


Create a GET request to https://api-prod.corelogic.com/trestle/odata/Media/?$filter=ResourceRecordKey+eq+'252598921'&select=MediaURL&$top=2 using OAuth 2.0 authorization and your Access Token.

The ResourceRecordKey is the same value as the ListingKey found in the listing query in section 3.
The MediaURL that is returned is a relative path for the https://api-prod.corelogic.com/trestle/ URL. So for example, if the result was:
    "MediaURL": "./Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg"
You could retrieve the image by creating another GET request to https://api-prod.corelogic.com/trestle/Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg with your Access Token.