GET
/
trades
curl --request GET \
  --url https://commerce.driv.ly/api/trades
{
  "data": [
    {
      "deal": "dea_1a2b3c4d5e6f",
      "vehicle": {
        "id": "veh_3k12j9qksdf0",
        "vin": "1C4HJXEN5MW592818",
        "year": 2021,
        "make": "Jeep",
        "trim": "Sport",
        "spec": "Off-Road Package",
        "model": "Wrangler",
        "engine": "3.6L V6",
        "seatCount": 5,
        "doorCount": 4,
        "bodyStyle": "SUV",
        "drivetrain": "4WD",
        "transmission": "Automatic",
        "interiorColor": "Black",
        "exteriorColor": "Red"
      },
      "customer": {
        "id": "cus_k3j5s9qj3w0d",
        "addresses": [
          "123 Main St, Anytown, USA"
        ],
        "phoneNumbers": [
          "555-123-4567"
        ]
      },
      "odometer": 15000,
      "creditApp": "cre_5j6k7l8m9n0o",
      "netAllowance": 25000,
      "grossAllowance": 26000
    }
  ],
  "success": true,
  "page": 2,
  "nextPage": 3,
  "prevPage": 1,
  "totalPages": 3,
  "totalCount": 25,
  "limit": 10,
  "pagingCounter": 11,
  "hasPrevPage": true,
  "hasNextPage": true
}

Query Parameters

depth
integer

The number of levels of related objects to include in the response

sort
string

Pass the name of a top-level field to sort by that field in ascending order. Prefix the name of the field with a minus symbol ("-") to sort in descending order.

limit
number

Limit number of results, default 10

where
object

Search for results fitting criteria, uses qs library for query string parsing

Response

200
application/json
Trades Found
data
object[]

Customer offers Vehicle for trade

success
boolean
page
number

Current page number

Example:

2

nextPage
number | null

number of next page, null if it doesn't exist

Example:

3

prevPage
number | null

number of previous page, null if it doesn't exist

Example:

1

totalPages
number

Total pages available, based upon the limit

Example:

3

totalCount
number

Total available records within the database

Example:

25

limit
number

Limit query parameter, defaults to 10

Example:

10

pagingCounter
number

number of the first record on the current page

Example:

11

hasPrevPage
boolean

true/false if previous page exists

Example:

true

hasNextPage
boolean

true/false if next page exists

Example:

true