Mark as sold

POST /v1/listings/{listingId}/mark-as-sold

Support selling of a "provisional" vehicle for specified price.

The sale will be attributed to the highest bidder. The buyer cannot be changed. An auction needs at least one bidder for a sale to be made. The sale cannot be undone

Path parameters

  • listingId string Required
application/json

Body Required

  • salePrice integer(int32) Required

    The sale price agreed between the buyer and seller

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required
    • stockId string Required

      Your stock ID. You can retrieve stock information from the Stock resource using this identifier

    • status string Required

      Values are IN_PROGRESS, PROVISIONAL, CANCELLED, SOLD, or NOT_SOLD.

    • auction object Required
      Hide auction attributes Show auction attributes object
      • created string(date-time) Required
      • startTime string(date-time) Required
      • endTime string(date-time)
      • cancelTime string(date-time)
      • bids array[object] Required
        Hide bids attributes Show bids attributes object
        • value number Required
        • time string(date-time) Required
      • buyNowPrice number
      • reservePrice number
      • reserveMet boolean Required
      • currentPrice number
      • type string Required

        Values are BID, BUY_NOW, or SEALED_BID.

    • negotiation object Required

      Negotiation information. These fields will not be needed for most integrations.

      Hide negotiation attributes Show negotiation attributes object
      • askingPrice integer(int32)

        The amount that the seller is willing to accept for the vehicle.

        This applies mainly to PROVISIONAL vehicles. Those that have bids but have not met reserve. This is price the seller may be willing to drop to.

      • price integer(int32)

        The current price of the negotiation. This will only apply when listing is in a PROVISIONAL state.

      • buyer object

        The highest bidder. If a sale is being negotiated, this is the buyer being dealt with.

        Hide buyer attributes Show buyer attributes object
        • tradingName string Required
        • contacts array[object] Required

          A list of contacts at the buyer dealership.

          This includes the user who placed the winning bid and additional people involved in vehicle purchasing.

          Hide contacts attributes Show contacts attributes object
          • type string Required

            Values are USER or BUYER.

          • title string
          • firstName string
          • lastName string
          • email string
          • mobileNumber string
          • landlineNumber string
        • address object Required
          Hide address attributes Show address attributes object
          • line1 string
          • line2 string
          • town string
          • county string
          • postcode string
        • externalAccountIds object

          We hold an external customer ID for certain stock providers.

          The ID will only be returned for requests from that particular provider.

          Hide externalAccountIds attribute Show externalAccountIds attribute object
          • * string Additional properties
    • sale object

      Sales information. This will only be present for vehicles that have sold.

      Hide sale attributes Show sale attributes object
      • buyer object

        The highest bidder. If a sale is being negotiated, this is the buyer being dealt with.

        Hide buyer attributes Show buyer attributes object
        • tradingName string Required
        • contacts array[object] Required

          A list of contacts at the buyer dealership.

          This includes the user who placed the winning bid and additional people involved in vehicle purchasing.

          Hide contacts attributes Show contacts attributes object
          • type string Required

            Values are USER or BUYER.

          • title string
          • firstName string
          • lastName string
          • email string
          • mobileNumber string
          • landlineNumber string
        • address object Required
          Hide address attributes Show address attributes object
          • line1 string
          • line2 string
          • town string
          • county string
          • postcode string
        • externalAccountIds object

          We hold an external customer ID for certain stock providers.

          The ID will only be returned for requests from that particular provider.

          Hide externalAccountIds attribute Show externalAccountIds attribute object
          • * string Additional properties
      • price number
  • 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
POST /v1/listings/{listingId}/mark-as-sold
curl \
 --request POST 'https://api.dealerauction.co.uk/v1/listings/{listingId}/mark-as-sold' \
 --user "username:password" \
 --header "Content-Type: application/json" \
 --data '{"salePrice":5000}'
Request examples
{
  "salePrice": 5000
}
Response examples (200)
{
  "id": "cf17d47a-3ba5-452d-a18f-f03225aa6c27",
  "stockId": "a10ab562-c0cd-4072-88eb-4115811f5aa1",
  "status": "IN_PROGRESS",
  "auction": {
    "created": "2023-04-19T11:07:18.883Z",
    "startTime": "2023-04-19T11:07:18.883Z",
    "endTime": "2023-04-19T11:07:18.883Z",
    "cancelTime": "2023-04-21T11:07:18.883Z",
    "bids": [
      {
        "value": 6000,
        "time": "2023-04-20T11:07:18.883Z"
      }
    ],
    "buyNowPrice": 10000,
    "reservePrice": 5000,
    "reserveMet": true,
    "currentPrice": 6000,
    "type": "BID"
  },
  "negotiation": {
    "askingPrice": 5000,
    "price": 5000,
    "buyer": {
      "tradingName": "Test Dealer Cars UK",
      "contacts": [
        {
          "type": "USER",
          "title": "Mr",
          "firstName": "Test",
          "lastName": "User",
          "email": "test.user@example.com",
          "mobileNumber": "07777777777",
          "landlineNumber": "01611111111"
        }
      ],
      "address": {
        "line1": "string",
        "line2": "string",
        "town": "string",
        "county": "string",
        "postcode": "string"
      },
      "externalAccountIds": {
        "providerName": "exampleID"
      }
    }
  },
  "sale": {
    "buyer": {
      "tradingName": "Test Dealer Cars UK",
      "contacts": [
        {
          "type": "USER",
          "title": "Mr",
          "firstName": "Test",
          "lastName": "User",
          "email": "test.user@example.com",
          "mobileNumber": "07777777777",
          "landlineNumber": "01611111111"
        }
      ],
      "address": {
        "line1": "string",
        "line2": "string",
        "town": "string",
        "county": "string",
        "postcode": "string"
      },
      "externalAccountIds": {
        "providerName": "exampleID"
      }
    },
    "price": 5000
  }
}
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"
}