API LIBRARY
Collapse Sidebar Menu
Expand Drawer

Single Offices By Name

In order to get a single Listing from an office, you must first know the Office Key. You can even search for a beginning of an Office Name. For example, if you wanted to search for an Office that began with "Atlan" in order to see Office Names that may start with "Atlanta" or "Atlantic" run the following query:
https://api-prod.corelogic.com/trestle/odata/Office?$top=10&$select=OfficeKey,OfficeName&$filter=startswith(OfficeName, 'Atlan')  
You will see a list of the top 10 Office Names starting with "Atlan".


Examples

Code Example

curl -X GET \
  'https://api-prod.corelogic.com/trestle/odata/Office?$top=10&$select=OfficeKey,OfficeName&$filter=startswith%28OfficeName,%20%27Atlan%27%29' \
  -H 'Authorization: Bearer [token]' \
  -H 'Postman-Token: 9277d1a1-d816-4b5f-bacd-1ec61a97b333' \
  -H 'cache-control: no-cache'

Result

(The top 10 Offices whose Office Name starts with "Atlan")

Code Example

<?php

$request = new HttpRequest();
$request->setUrl('https://api-prod.corelogic.com/trestle/odata/Office');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  '$top' => '10',
  '$select' => 'OfficeKey,OfficeName',
  '$filter' => 'startswith%28OfficeName,%20%27Atlan%27%29'
));

$request->setHeaders(array(
  'Postman-Token' => '775e8605-06f2-4826-8c36-5ce839aedd42',
  'cache-control' => 'no-cache',
  'Authorization' => 'Bearer [token]'
));

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

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

Result

(The top 10 Offices whose Office Name starts with "Atlan")