API:
Inventory Search API
API Class:
Inventory Search API
Description:
The Inventory Search Service (ISS) API is a RESTful service that provides inventory listings to the consumer. The ISS will take an input SearchCriteriaBO XML request object and return listings within a SearchResultBO XML response object. The returned result will include the total results count.
Method type: POST
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/searchCount |
production | https://api.cars.com/InventorySearchService/1.0/rest/inventory/searchCount |
Requires API key
True
Requires Authentication Token
False
Request
Request Data Formats
Request type | Header value |
---|---|
xml | Content-type: text/xml |
Request XML Elements
Element | Type | Description |
---|---|---|
zc | Integer | The zip code used for searching |
rd | Integer | The radius for searching |
searchSource | String | Type of search being performed |
stkTypId | Integer | Id for stock type(new, used, cpo) |
mkId | Integer | Make Id |
mdId | Integer | Model Id |
Request XML Example
<?xml version="1.0" encoding="UTF-8"?> <searchCriteriaBO> <zc>60606</zc> <rd>30</rd> <searchSource>ADVANCED_SEARCH</searchSource> <stkTypId>28880</stkTypId> <!--(NEW)--> <mkId>20021</mkId> <mdId>21399</mdId> <requestorTrackingInfo>myRrequesterAppCode</requestorTrackingInfo> </searchCriteriaBO>
Response
Response Data Formats
Response type | Header value |
---|---|
xml | Accept: text/xml |
Response Elements
SearchResultBO
Element | Type | Description |
---|---|---|
resultCount | Integer | Result count |
totalDealerCount | long | Total number of dealers |
returnCode | ReturnCode | See class description below |
ReturnCode
Element | Type | Description |
---|---|---|
code | String | Return Code |
message | String | Return code message |
Response XML Example
<searchResultBO> <resultCount>159</resultCount> <totalDealerCount>0</totalDealerCount> <returnCode> <code>SUCCESS</code> <message>Inventory Search Successfully Executed</message> </returnCode> </searchResultBO>