API LIBRARY
Collapse Sidebar Menu
Expand Drawer

Single Photo

In order to construct a photo's URL, we must first know the Property's ListingKey. The ListingKey value will be the same as the ResourceRecordKey in the code below:

      https://api-prod.corelogic.com/trestle/odata/Media/?$filter=ResourceRecordKey eq '252598921'&select=MediaURL

By running the above request through Postman, Trestle returns a record with the following field:

      "MediaURL": "/Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg"

By combining the base URL, https://api-prod.corelogic.com/trestle/, with the MediaURL we construct the following URL that can be used as a GET request through Postman:

      https://api-prod.corelogic.com/trestle/Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg

Examples

Code Example

https://api-prod.corelogic.com/trestle/Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg

Result

The specific image for the Property

Code Example

curl -X GET \
  https://api-prod.corelogic.com/trestle/Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg \
  -H 'Authorization: Bearer [token]' \
  -H 'Postman-Token: 155de386-dfdc-4230-a0d6-3e0eecfae75d' \
  -H 'cache-control: no-cache'

Result

The specific image for the Property

Code Example

<?php

$request = new HttpRequest();
$request->setUrl('https://api-prod.corelogic.com/trestle/Media/CTEXAS/Property/jpeg/252598921/2/wO31M3hhgrAH4xSX7_PR7XAqirdMANJUNFXlyOK-NEg');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Postman-Token' => '23dc1d17-f320-493c-a647-475e38eb199d',
  'cache-control' => 'no-cache',
  'Authorization' => 'Bearer [token]'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

Result

The specific image for the Property