API LIBRARY
Collapse Sidebar Menu
Expand Drawer

Get Unit Types By ListingId

In order to retrieve the Unit Type associated with a specific ListingId, you will need the specific ListingId to match. For this example, we will use the ListingId of 417824. Feel free to substitute any known ListingId in the query below:
https://api-prod.corelogic.com/trestle/odata/PropertyUnitTypes?$filter=(ListingId eq '417824')  

Examples

Code Example

https://api-prod.corelogic.com/trestle/odata/PropertyUnitTypes?$filter=(ListingId eq '417824')

Result

{
    "@odata.context": "https://api-prod.corelogic.com/trestle/odata/$metadata#PropertyUnitTypes/CoreLogic.DataStandard.RESO.DD.PropertyUnitTypes",
    "value": [
        {
            "ListingId": "417824",
            "ListingKey": "157917594",
            "ListingKeyNumeric": 157917594,
            "ListOfficeKey": "983190",
            "ModificationTimestamp": "2019-05-09T18:34:17.260-00:00",
            "OriginatingSystemName": "ACTRIS",
            "OriginatingSystemSubName": null,
            "UnitTypeActualRent": 695,
            "UnitTypeBathsTotal": 1,
            "UnitTypeBedsTotal": 2,
            "UnitTypeDescription": null,
            "UnitTypeFurnished": null,
            "UnitTypeGarageAttachedYN": null,
            "UnitTypeGarageSpaces": null,
            "UnitTypeKey": "1848173",
            "UnitTypeKeyNumeric": 1848173,
            "UnitTypeProForma": null,
            "UnitTypeTotalRent": null,
            "UnitTypeType": null,
            "UnitTypeUnitsTotal": null
        },
        {
            "ListingId": "417824",
            "ListingKey": "157917594",
            "ListingKeyNumeric": 157917594,
            "ListOfficeKey": "983190",
            "ModificationTimestamp": "2019-05-09T18:34:17.260-00:00",
            "OriginatingSystemName": "ACTRIS",
            "OriginatingSystemSubName": null,
            "UnitTypeActualRent": 675,
            "UnitTypeBathsTotal": 1,
            "UnitTypeBedsTotal": 2,
            "UnitTypeDescription": null,
            "UnitTypeFurnished": null,
            "UnitTypeGarageAttachedYN": null,
            "UnitTypeGarageSpaces": null,
            "UnitTypeKey": "1848172",
            "UnitTypeKeyNumeric": 1848172,
            "UnitTypeProForma": null,
            "UnitTypeTotalRent": null,
            "UnitTypeType": null,
            "UnitTypeUnitsTotal": null
        }
    ]
}

Code Example

curl -X GET \
  'https://api-prod.corelogic.com/trestle//odata/PropertyUnitTypes?$filter=%28ListingId%20eq%20%27417824%27%29' \
  -H 'Accept: */*' \
  -H 'Authorization: Bearer token' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Host: api-prod.corelogic.com' \
  -H 'User-Agent: PostmanRuntime/7.13.0' \
  -H 'accept-encoding: gzip, deflate' \
  -H 'cache-control: no-cache'

Result

{
    "@odata.context": "https://api-prod.corelogic.com/trestle/odata/$metadata#PropertyUnitTypes/CoreLogic.DataStandard.RESO.DD.PropertyUnitTypes",
    "value": [
        {
            "ListingId": "417824",
            "ListingKey": "157917594",
            "ListingKeyNumeric": 157917594,
            "ListOfficeKey": "983190",
            "ModificationTimestamp": "2019-05-09T18:34:17.260-00:00",
            "OriginatingSystemName": "ACTRIS",
            "OriginatingSystemSubName": null,
            "UnitTypeActualRent": 695,
            "UnitTypeBathsTotal": 1,
            "UnitTypeBedsTotal": 2,
            "UnitTypeDescription": null,
            "UnitTypeFurnished": null,
            "UnitTypeGarageAttachedYN": null,
            "UnitTypeGarageSpaces": null,
            "UnitTypeKey": "1848173",
            "UnitTypeKeyNumeric": 1848173,
            "UnitTypeProForma": null,
            "UnitTypeTotalRent": null,
            "UnitTypeType": null,
            "UnitTypeUnitsTotal": null
        },
        {
            "ListingId": "417824",
            "ListingKey": "157917594",
            "ListingKeyNumeric": 157917594,
            "ListOfficeKey": "983190",
            "ModificationTimestamp": "2019-05-09T18:34:17.260-00:00",
            "OriginatingSystemName": "ACTRIS",
            "OriginatingSystemSubName": null,
            "UnitTypeActualRent": 675,
            "UnitTypeBathsTotal": 1,
            "UnitTypeBedsTotal": 2,
            "UnitTypeDescription": null,
            "UnitTypeFurnished": null,
            "UnitTypeGarageAttachedYN": null,
            "UnitTypeGarageSpaces": null,
            "UnitTypeKey": "1848172",
            "UnitTypeKeyNumeric": 1848172,
            "UnitTypeProForma": null,
            "UnitTypeTotalRent": null,
            "UnitTypeType": null,
            "UnitTypeUnitsTotal": null
        }
    ]
}

Code Example

<?php

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

$request->setQueryData(array(
  '$filter' => '%28ListingId%20eq%20%27417824%27%29'
));

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Connection' => 'keep-alive',
  'accept-encoding' => 'gzip, deflate',
  'Host' => 'api-prod.corelogic.com',
  'Cache-Control' => 'no-cache',
  'Accept' => '*/*',
  'User-Agent' => 'PostmanRuntime/7.13.0',
  'Authorization' => 'Bearer token'
));

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

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

Result

{
    "@odata.context": "https://api-prod.corelogic.com/trestle/odata/$metadata#PropertyUnitTypes/CoreLogic.DataStandard.RESO.DD.PropertyUnitTypes",
    "value": [
        {
            "ListingId": "417824",
            "ListingKey": "157917594",
            "ListingKeyNumeric": 157917594,
            "ListOfficeKey": "983190",
            "ModificationTimestamp": "2019-05-09T18:34:17.260-00:00",
            "OriginatingSystemName": "ACTRIS",
            "OriginatingSystemSubName": null,
            "UnitTypeActualRent": 695,
            "UnitTypeBathsTotal": 1,
            "UnitTypeBedsTotal": 2,
            "UnitTypeDescription": null,
            "UnitTypeFurnished": null,
            "UnitTypeGarageAttachedYN": null,
            "UnitTypeGarageSpaces": null,
            "UnitTypeKey": "1848173",
            "UnitTypeKeyNumeric": 1848173,
            "UnitTypeProForma": null,
            "UnitTypeTotalRent": null,
            "UnitTypeType": null,
            "UnitTypeUnitsTotal": null
        },
        {
            "ListingId": "417824",
            "ListingKey": "157917594",
            "ListingKeyNumeric": 157917594,
            "ListOfficeKey": "983190",
            "ModificationTimestamp": "2019-05-09T18:34:17.260-00:00",
            "OriginatingSystemName": "ACTRIS",
            "OriginatingSystemSubName": null,
            "UnitTypeActualRent": 675,
            "UnitTypeBathsTotal": 1,
            "UnitTypeBedsTotal": 2,
            "UnitTypeDescription": null,
            "UnitTypeFurnished": null,
            "UnitTypeGarageAttachedYN": null,
            "UnitTypeGarageSpaces": null,
            "UnitTypeKey": "1848172",
            "UnitTypeKeyNumeric": 1848172,
            "UnitTypeProForma": null,
            "UnitTypeTotalRent": null,
            "UnitTypeType": null,
            "UnitTypeUnitsTotal": null
        }
    ]
}