API: 
Delta Listing API
API Class: 
Delta Listing API
Description: 

Get all classified ad listing ids up to the last 24 hours. The time difference between startDateTime and current system time can be a minimum of 1 hour and a maximum of 24 hours. If the difference is less than one hour, the time provided by the client will be discarded and the default timeframe of one hour will be used. If the difference is more than 24 hours, the time provided by the client will be discarded and the default timeframe of 24 hours will be used.

For example, if current date-time is 2014-08-20T11:30:00-05:00 and startDateTime is set to 2014-08-20T11:00:00-05:00 (only 30 minutes before current time), the service will return all classified ad listing ids that have been added/updated/deleted between 2014-08-20T10:30:00-05:00 and 2014-08-20T11:30:00-05:00.

If current date-time is 2014-08-20T11:30:00-05:00 and startDateTime is set to 2014-08-19T11:00:00-05:00 (more than 24 hours before current time), the service will return all classified ad listing ids that have been added/updated/deleted between 2014-08-19T11:30:00-05:00 and 2014-08-20T11:30:00-05:00.

Results can also be narrowed by adding the optional "stockType" parameter to the request. Valid values are "N" for new vehicles, and "U" for used vehicles.

URL

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

Environment URL
development https://api-st.cars.com/DeltaListingService/1.0/rest/listing
production https://api.cars.com/DeltaListingService/1.0/rest/listing

Request

Request Data Formats

N/A

Request Parameters
Request Parameter Type Example value Description Required
type String new Classified Ad Listing delta type - valid values are: new, update, delete yes
stockType String N Vehicle stock type - valid values are: N, U no
pageSize Integer 5000 Number of ids per page. Minimum 1000, max 50000, default 5000 no
pageNum Integer 1 Current page number. Defaults to 1 no
startDateTime DateTime 2013-05-23T09:44:33-05:00 Start of record range. End of record range is current system time. Be sure to use the correct time zone value. yes
apikey String abcdefg1234567ABCDEFG API Key given by Cars.com yes

 

Response

 

Response Data Formats
Response type Header value
xml Accept: text/xml
json Accept: application/json
DeltaListingResult
Response Field Name Type Description
totalListings Integer Total number of listings
totalPages Integer Total number of pages
currentPageNumber Integer Current page number
currentBatchSize Integer Current batch size
listingIds ListingIds Class description below
operationName String Operation name
stockType String Stock type code
ListingIds
Response Field Name Type Description
listingId List: Long Listing IDs
Response XML Example
<Response xmlns="https://api-st.cars.com/DeltaListingService/1.0/rest/listing">
  <DeltaListingResult>
  <currentBatchSize>1000</currentBatchSize>
  <currentPageNumber>1</currentPageNumber>
  <listingIds>
    <listingId>
    <e>12435</e>
    <e>12346</e>
    <e>12347</e>
    ...
    <e>13344</e>
    <e>13345</e>
    </listingId>
  </listingIds>
  <operationName>new</operationName>
  <totalListings>3500</totalListings>
  <totalPages>4</totalPages>
  </DeltaListingResult>
</Response>
Response JSON example
{
  "DeltaListingResult" : {
    "totalListings" : 3500,
    "totalPages": 4,
    "currentPageNumber": 1,
    "currentBatchSize": 1000,
    "listingIds" : {
      "listingId" : [ 12345, 12346, 12347, ... 13344, 13345 ]
    },
  "operationName" : "new"
  }
}
Test
Method Type: 
GET
Endpoint URI: 
https://api-st.cars.com/DeltaListingService/1.0/rest/listing
Request: 
?type=delete&stockType=U&pageSize=5000&pageNum=1&startDateTime=2014-08-15T09:00:00-06:00&apikey=ABCDE12345