API: 
Inventory Search API
API Class: 
Inventory Search API
Description: 

This method is used to validate if a given inventory is still active.

URL

Note: Ensure all testing is done in development environment prior to moving to production.

Environment URL
development https://api.cars.com/InventorySearchService/1.0/rest/inventory/isActive
production https://api.cars.com/InventorySearchService/1.0/rest/inventory/isActive

Request

Request Data Formats

N/A

Request Parameters
Request Parameter Type Example value Description Required
requesterTrackingInfo String ? Indicator of service requestor no
cIds String 12345,12346,12347 caId/listingId. This can be a comma-separated list of ids yes

Response

Response Data Formats
Response type Header value
xml Accept: text/xml
json Accept: application/json
Response Elements
InventoryValidationResultBO
Element Type Description
inventoryValidations List: InventoryValidationBO See class description below
inventoryActiveCount Long Active Inventory count
returnCode ReturnCode See class description below
InventoryValidationBO
Element Type Description
id Long ID
active Boolean Is active boolean
price Integer Price
miles Integer Miles
ReturnCode
Response Field Name Type Description
code String Return Code
message String Return code message
Response XML Example
<inventoryValidationResultBO xmlns="http://service.cars.com/listingsearch/bo.xsd">
   <inventoryValidations>
      <id>12345</id>
      <active>true</active>
      <price>24260</price>
      <miles>2</miles>
   </inventoryValidations>
   <inventoryValidations>
      <id>12346</id>
      <active>true</active>
      <price>47995</price>
      <miles>4272</miles>
   </inventoryValidations>
   <inventoryValidations>
      <id>12347</id>
      <active>false</active>
   </inventoryValidations>
   <inventoryActiveCount>2</inventoryActiveCount>
   <returnCode>
      <code>SUCCESS</code>
      <message>Validation complete, 2 active listings returned.</message>
   </returnCode>
</inventoryValidationResultBO>
Response JSON example
{  
   "InventoryValidationResultBO":{  
      "inventoryValidations":[  
         {  
            "id":12345,
            "active":true,
            "price":24260,
            "returnCode":{  
               "code":"Some information is missing:",
               "message":"Some information is missing:miles is not defined"
            }
         }
      ],
      "inventoryActiveCount":1,
      "returnCode":{  
         "code":"SUCCESS",
         "message":"Validation complete, 1 active listings returned."
      }
   }
}
Test
Method Type: 
GET
Endpoint URI: 
https://api.cars.com/InventorySearchService/1.0/rest/inventory/isActive