API Changelog
Download source
  • JSON OpenAPI specification
  • YAML OpenAPI specification
stock logo

Topics

  • Introduction
  • Authentication

Endpoints

  • Listings
    • Mark as sold POST
    • Mark as provisional POST
    • Mark as not sold POST
    • Get by ID GET
  • Stock
    • Search for stock items GET
    • Create a stock item POST
    • Get by ID GET
    • Update by ID PATCH
  • Testing
    • End listing early POST
  • Vehicle documentation
    • Get by ID GET
Powered by Bump.sh
API Changelog
Download source
  • JSON OpenAPI specification
  • YAML OpenAPI specification
stock logo




















Search for stock items

GET /v1/stock
Basic

If no search parameters are specified then no results will be returned. Search results are returned in paginated format.

More information on stock is available here

Query parameters

  • customerId array[string]

    You will only be able to filter using your own customer ids

  • stockId array[string]
  • vrm array[string]
  • externalStockId array[string]
  • externalVendorId array[string]
  • deleted boolean
  • pageNumber integer(int32)

    Default value is 1.

  • pageSize integer(int32)

    Default value is 100.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • stockItems array[object] Required
      Hide stockItems attributes Show stockItems attributes object
      • id string Required
      • publicReference string Required

        Forms part of the url for the advert

      • customerId string Required

        Our customer ID that has been assigned to you. Depending on account setup, you may have multiple customer account IDs assigned to you.

      • lifecycleState string Required

        The status of the vehicle

        Values are FORECOURT, SALE_IN_PROGRESS, SOLD, WASTEBIN, or DELETED.

      • externalStockId string

        A vehicle identifier in the calling system

      • externalVendorId string

        A seller identifier in the calling system

      • vrm string
      • vin string
      • createDate string(date-time) Required
      • availableUntil string(date-time)

        We will not attempt to sell the vehicle past this point in time. If an availableUntil is specified, auction time must end before or at this point. Any ongoing negotiations for provisional vehicles will also be abandoned past this point.

      • advert object
        Hide advert attributes Show advert attributes object
        • state string Required

          Values are ACTIVE or INACTIVE.

        • auction object
          Hide auction attributes Show auction attributes object
          • type string Required

            Values are BID, BUY_NOW, SEALED_BID, or PHYSICAL.

          • startDate string(date-time)

            The date and time that you would like the auction to start

          • endDate string(date-time)

            The date and time that you would like the auction to end

    • paginator object Required
      Hide paginator attributes Show paginator attributes object
      • currentPage integer(int32) Required
      • resultsPerPage integer(int32) Required
      • totalResults integer(int32) Required
      • lastPage integer(int32) Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • errorCode string Required
    • errorMessage string
    • errors array[object]
      Hide errors attributes Show errors attributes object
      • message string Required
      • key string
  • 403 application/json

    Forbidden

    Hide response attributes Show response attributes object
    • errorCode string Required
    • errorMessage string
  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • errorCode string Required
    • errorMessage string
  • 409 application/json

    Conflict

    Hide response attributes Show response attributes object
    • errorCode string Required
    • vrm string
  • 502 application/json

    Bad Gateway

    Hide response attributes Show response attributes object
    • errorCode string Required
    • errorMessage string
GET /v1/stock
curl \
 --request GET 'https://api.dealerauction.co.uk/v1/stock' \
 --user "username:password"
Response examples (200)
{
  "stockItems": [
    {
      "id": "a10ab562-c0cd-4072-88eb-4115811f5aa1",
      "publicReference": 202304198054016,
      "customerId": 123456,
      "lifecycleState": "FORECOURT",
      "externalStockId": "string",
      "externalVendorId": "string",
      "vrm": "AB17ABC",
      "vin": "AAAAA81KLJU982170",
      "createDate": "2023-04-19T11:07:18.883Z",
      "availableUntil": "2025-05-04T09:42:00Z",
      "advert": {
        "state": "ACTIVE",
        "auction": {
          "type": "BID",
          "startDate": "2023-04-19T11:07:18.883Z",
          "endDate": "2023-04-21T11:07:18.883Z"
        }
      }
    }
  ],
  "paginator": {
    "currentPage": 1,
    "resultsPerPage": 10,
    "totalResults": 23,
    "lastPage": 3
  }
}
Response examples (400)
{
  "errorCode": "INVALID_STOCK_ITEM",
  "errorMessage": "An error message",
  "errors": [
    {
      "message": "An error has occurred",
      "key": "string"
    }
  ]
}
Response examples (403)
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}
Response examples (404)
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}
Response examples (409)
{
  "errorCode": "STOCK_ALREADY_EXISTS",
  "vrm": "AB17ABC"
}
Response examples (502)
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}