API: 
Dealer Metrics API
API Class: 
Dealer Metrics API
Description: 

This method retrieves inventory vehicle IDs for a dealer on a given day or within a given month.

URL

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

Environment URL
development https://api.cars.com/DealerMetricsService/1.0/rest/reports/contactdetails/inventory
production https://api.cars.com/DealerMetricsService/1.0/rest/reports/contactdetails/inventory

Request

Request Data Formats
Request Parameters
Request Parameter Type Example value Description Required
customerId Integer 5785421 Customer ID yes
day Integer 1-31 Day - If not passed, request returns month report no
month Integer 1-12 Month yes
year Integer 2014 Year yes
apikey String xo0HjxkG1087GPUtt0TAxTzrkwhYzAKJ API Key given by Cars.com yes

 

 

 

 

Response

Response Data Formats
Response type Header value
xml Accept: application/xml
json Accept: application/json
Response Elements
VehicleIdsResult
Element Type Description
vehicleIds VehicleIds See VehicleIds element description below
VehicleIds
Element Type Description
classifiedAdId String Classified Ad ID
vinNumber String Vehicle Identification Number
stockNumber String Stock Number
Response XML Example
<vehicleIdsResult>
    <vehicleIds>
        <classifiedAdId>124664742</classifiedAdId>
        <vinNumber>1A8HW58218F136420</vinNumber>
        <stockNumber>R676649B</stockNumber>
    </vehicleIds>
    <vehicleIds>
        <classifiedAdId>125246522</classifiedAdId>
        <vinNumber>1C4RJFBT5CC353402</vinNumber>
        <stockNumber>C185328A</stockNumber>
    </vehicleIds>
    <vehicleIds>
        <classifiedAdId>125246530</classifiedAdId>
        <vinNumber>1C6RD6KP8CS128415</vinNumber>
        <stockNumber>S513278A</stockNumber>
    </vehicleIds>
</vehicleIdsResult>
Response JSON example
{"VehicleIdsResult": {"vehicleIds": [
      {
      "classifiedAdId": "134316460",
      "vinNumber": "3C6UR4HLXDG570268",
      "stockNumber": "DG570268"
   },
      {
      "classifiedAdId": "134316461",
      "vinNumber": "3C6JR6AG0DG576592",
      "stockNumber": "DG576592"
   },
      {
      "classifiedAdId": "134316462",
      "vinNumber": "3C6UR4CL6DG593490",
      "stockNumber": "DG593490"
   }
]}}
Test
Method Type: 
GET
Endpoint URI: 
http://api.cars.com/DealerMetricsService/1.0/rest/reports/contactdetails/inventory