PATCH /v1/stock/{stockId}

Updates are supported via PATCH requests. You can either PATCH the full document or just the fields that you wish to change. Using a blank string or a null value will try and set the field value to blank or null respectively. Not changing a field can only be done by not sending it in the patch request.

Certain fields returned in a stock response are readonly and cannot be changed.

Path parameters

  • stockId string Required
application/json

Body Required

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string
    • listingId string

      Your listing ID. You can retrieve real time listing information from the Listings resource using this identifier

    • createdDate string(date-time)
    • updatedDate string(date-time)
    • publicReference string

      Forms part of the public url for the listing

    • metadata object Required
      Hide metadata attributes Show metadata attributes object
      • externalStockId string

        A vehicle identifier in the calling system

      • externalVendorId string

        A seller identifier in the calling system

    • lifecycleState string

      The status of the vehicle

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

    • 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.

    • vehicle object Required
      Hide vehicle attributes Show vehicle attributes object
      • vrm string
      • category string Required

        Type of vehicle

        Values are Car, Bike, or Van.

      • mileage integer(int32)
      • yearOfManufacture integer(int32)
      • dateOfRegistration string(date)
      • ownershipCondition string Required

        Values are NEW or USED.

      • vin string
      • make string Required
      • model string Required
      • derivative string
      • derivativeId string

        AutoTrader vehicle derivative ID. This is resolved by us and used to provide AutoTrader valuations

      • trim string
      • bodyType string
      • fuelType string
      • transmissionType string
      • driveTrain string
      • doors integer(int32)
      • keys integer(int32)
      • insuranceGroup string

        Industry standard insurance group rating

      • insuranceSecurityCode string

        Industry standard insurance code

      • v5CertificationSupplied boolean
      • colour string
      • engineNumber string
      • cylinders integer(int32)
      • engineSize object
        Hide engineSize attributes Show engineSize attributes object
        • unit string Required

          Values are LITRE or CUBIC_CENTIMETRE.

        • value number(double) Required
      • motExpiry string(date)
      • serviceHistory string

        Values are FULL_SERVICE_HISTORY, FULL_DEALERSHIP_HISTORY, PARTIAL_SERVICE_HISTORY, or NO_SERVICE_HISTORY.

      • plate string

        The numerical part of the VRM

      • previousOwners integer(int32)

        The number of previous owners, not including the current seller

      • exDemo boolean
      • stolen boolean Required
      • imported boolean Required
      • exported boolean Required
      • scrapped boolean Required
      • writeoffCategory string

        Insurance write-off category

        Values are C, D, S, or N.

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

        Indicates whether a listing is live.

        This field can be used to activate and de-activate a listing.

        We recommend using this field, rather than adjusting startDate or endDate

        Values are ACTIVE or INACTIVE.

      • createdDate string(date-time)
      • updatedDate string(date-time)
      • auction object
        Hide auction attributes Show auction attributes object
        • type string Required

          Values are BID, BUY_NOW, SEALED_BID, or PHYSICAL.

        • lotId string

          Used for physical auctions

        • startingPrice object
          Hide startingPrice attributes Show startingPrice attributes object
          • value number Required
          • currency string Required

            Value is GBP.

        • reservePrice object
          Hide reservePrice attributes Show reservePrice attributes object
          • value number Required
          • currency string Required

            Value is GBP.

        • askingPrice object
          Hide askingPrice attributes Show askingPrice attributes object
          • value number Required
          • currency string Required

            Value is GBP.

        • buyNowPrice object
          Hide buyNowPrice attributes Show buyNowPrice attributes object
          • value number Required
          • currency string Required

            Value is GBP.

        • 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

      • startDate string(date-time) Deprecated

        Setting start and end dates for your advert can control if an advert is active.

        However, we recommend updating the advert state directly, rather than adjusting these dates.

      • endDate string(date-time) Deprecated

        Setting start and end dates for your advert can control if an advert is active.

        However, we recommend updating the advert state directly, rather than adjusting these dates.

      • attentionGrabber string

        A small piece of text that appears on the search results.

        Maximum length is 100.

      • description string

        A text description block of the advert. Linebreaks can be inserted with \n character. HTML tags will be stripped out. Only plain text is allowed.

        Maximum length is 2000.

      • tradeVatStatus string

        Values are MARGINAL, VAT_QUALIFYING, PLUS_VAT, or NO_VAT.

      • externalUrl string

        A link to a page that contains more information about the vehicle

    • features array[object] Required

      List of features. If you don't have any, just provide an empty list

      Hide features attributes Show features attributes object
      • description string Required

        Description of the item

      • standard boolean

        Comes as standard

      • category string Deprecated

        Category grouping

    • conditionReportUrl string

      An externally hosted condition report can be associated to the stock item. This report must be in PDF format. When a condition report is added to a stock item, it will be asynchronously downloaded. The report is then scanned for viruses before being uploaded to our CDN.

      Maximum length is 500.

    • condition object
      Hide condition attributes Show condition attributes object
      • externalConditionGrade string

        NAMA grade

        Values are 1, 2, 3, 4, 5, or U.

      • surecheckGrade string

        Values are BRONZE, SILVER, GOLD, LCV, or EV.

      • damageItems array[object]

        If damage items are set, then a diagram will be rendered in the listing, detailing the damage.

        An interactive diagram is available here

        Hide damageItems attributes Show damageItems attributes object
        • zone string Required

          The location of the damage item

          Values are WINDSCREEN, WINDSCREEN_REAR, BOOTLID, ROOF, BONNET, MIRROR_COVER_NEAR_SIDE, MIRROR_COVER_FAR_SIDE, DOOR_FRONT_FAR_SIDE, DOOR_FRONT_NEAR_SIDE, DOOR_REAR_FAR_SIDE, DOOR_REAR_NEAR_SIDE, WING_FRONT_NEAR_SIDE, WING_FRONT_FAR_SIDE, WING_REAR_FAR_SIDE, WING_REAR_NEAR_SIDE, WHEELS_FRONT_NEAR_SIDE, WHEELS_FRONT_FAR_SIDE, WHEELS_REAR_NEAR_SIDE, WHEELS_REAR_FAR_SIDE, BUMPER_FRONT, BUMPER_REAR, NUMBER_PLATE_FRONT, NUMBER_PLATE_REAR, WINDOW_FRONT_NEAR_SIDE, WINDOW_FRONT_FAR_SIDE, WINDOW_REAR_NEAR_SIDE, WINDOW_REAR_FAR_SIDE, WINDOW_REAR_QUARTER_NEAR_SIDE, WINDOW_REAR_QUARTER_FAR_SIDE, TAIL_LIGHT_NEAR_SIDE, TAIL_LIGHT_FAR_SIDE, HEAD_LIGHT_NEAR_SIDE, or HEAD_LIGHT_FAR_SIDE.

        • damageType string Required

          Values are BROKEN, BIRD_DEPOSITS, CHIP, CRACK, DENT, DENT_LOCAL_REPAIR, FADE, MULTIPLE_CHIPS, OFF_COLOUR_PANEL, PREVIOUS_REPAIR, RUST, SCUFF, SCRATCH, SCRATCH_LOCAL_REPAIR, WHEEL_SCUFF, STAINED, TORN_RIPPED, WORN, DIRTY, MISSING, BURNT, or OTHER.

    • videoUrl string

      An externally hosted video URL that we will embed in our listing page. Currently we only support YouTube.

    • images array[object] Required

      A list of image URLs that will be downloaded and then uploaded to our CDN. Images must be publicly accessible. We will require at least one image.

      Images will be displayed on the advert in the order that they are given. If you wish to reorder the images then resubmit the URLs in the order you would like.

      Hide images attributes Show images attributes object
      • url string

        A URL to a publicly hosted image that we will download

      • platformUrl string

        Our copy of your image, hosted on our CDN

      • uploaded boolean

        Indicates that we have downloaded your image and uploaded it to our CDN

      • tags array[string]

        A set of fixed values that are used to classify the image.

        Values are front_nearside, front_centre, front_offside, front_offside_wheel, front_offside_tyre, rear_offside, rear_offside_wheel, rear_offside_tyre, rear_centre, rear_nearside, rear_nearside_wheel, rear_nearside_tyre, front_nearside_wheel, front_nearside_tyre, passenger_seat, driver_seat, back_seat_row_1, back_seat_row_2, instrument_panel, boot, charging_cable, keys, service_history, convertible_roof_up, convertible_roof_down, dashboard, nearside, offside, infotainment, steering_wheel, damage_exterior, damage_wheel, damage_interior, damage_windscreen, exterior, interior, or damage.

    • capTaxonomy object
      Hide capTaxonomy attributes Show capTaxonomy attributes object
      • id string
      • code string
      • make string
      • model string
      • variant string
      • derivative string
    • 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.

    • requestedNetwork string

      The network that you would like the vehicle to be placed into.

      Depending on your account configuration, there may be multiple networks available to you. If no network is specified, then we will choose the most suitable network for the vehicle.

    • advertiser object
      Hide advertiser attributes Show advertiser attributes object
      • address object
        Hide address attributes Show address attributes object
        • address1 string
        • address2 string
        • town string
        • county string
        • postcode string
        • country string
        • latLong object
          Hide latLong attributes Show latLong attributes object
          • latitude number Required
          • longitude number Required
      • contact object
        Hide contact attributes Show contact attributes object
        • email string
        • title string
        • firstName string
        • lastName string
        • mobileNumber string
        • landlineNumber string
    • additionalData object

      A collection of questions and answers and notes from consumers selling vehicles through Consumer Direct

      Additional properties are NOT allowed.

      Hide additionalData attributes Show additionalData attributes object
      • mechanical_fails_start boolean
      • mechanical_bad_gearbox boolean
      • mechanical_unusual_noise boolean
      • mechanical_veers boolean
      • mechanical_warning_light boolean
      • mechanical_exhaust_smoke boolean
      • mechanical_leaks boolean
      • mechanical_note string
      • electrical_aircon_not_cold boolean
      • electrical_dashboard_not_working boolean
      • electrical_speakers_not_working boolean
      • electrical_satnav_not_working boolean
      • electrical_note string
      • odour_smoke boolean
      • odour_pet boolean
      • odour_damp boolean
      • odour_note string
      • bodywork_repairs boolean
      • bodywork_repairs_note string
      • bodywork_issues boolean
      • bodywork_issues_note string
      • vehicle_modifications boolean
      • vehicle_modifications_note string
      • c2b_top_nav_journey boolean
      • v5c_in_different_name boolean
      • test_name string
      • test_group string
      • c2b_valuation_range_lower integer(int32)
      • c2b_valuation_range_upper integer(int32)
      • taxi boolean
  • 400 application/json

    Bad Request

    One of:
  • 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
  • 429 application/json

    Too Many Requests

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

    Internal Server Error

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

    Bad Gateway

    Hide response attributes Show response attributes object
    • errorCode string Required
    • errorMessage string
PATCH /v1/stock/{stockId}
curl \
 --request PATCH 'https://api.dealerauction.co.uk/v1/stock/{stockId}' \
 --user "username:password" \
 --header "Content-Type: application/json"
Response examples (200)
{
  "id": "a10ab562-c0cd-4072-88eb-4115811f5aa1",
  "listingId": "cf17d47a-3ba5-452d-a18f-f03225aa6c27",
  "createdDate": "2023-04-19T11:07:18.883Z",
  "updatedDate": "2023-04-19T11:07:18.883Z",
  "publicReference": 202304198054016,
  "metadata": {
    "externalStockId": "string",
    "externalVendorId": "string"
  },
  "lifecycleState": "FORECOURT",
  "customerId": 123456,
  "vehicle": {
    "vrm": "AB17ABC",
    "category": "Car",
    "mileage": 51234,
    "yearOfManufacture": 2018,
    "dateOfRegistration": "2018-06-01",
    "ownershipCondition": "NEW",
    "vin": "AAAAA81KLJU982170",
    "make": "Citroen",
    "model": "Saxo",
    "derivative": 1.5,
    "derivativeId": "4965f54cdaea4226acde95e0d99b1acf",
    "trim": "SX",
    "bodyType": "Hatchback",
    "fuelType": "Petrol",
    "transmissionType": "Manual",
    "driveTrain": "Front Wheel Drive",
    "doors": 3,
    "keys": 2,
    "insuranceGroup": 10,
    "insuranceSecurityCode": "U",
    "v5CertificationSupplied": true,
    "colour": "Blue",
    "engineNumber": "FY6H0409181",
    "cylinders": 2,
    "engineSize": {
      "unit": "LITRE",
      "value": 1200
    },
    "motExpiry": "2017-01-01",
    "serviceHistory": "FULL_SERVICE_HISTORY",
    "plate": 17,
    "previousOwners": 2,
    "exDemo": false,
    "stolen": false,
    "imported": false,
    "exported": false,
    "scrapped": false,
    "writeoffCategory": "C"
  },
  "advert": {
    "state": "ACTIVE",
    "createdDate": "2023-04-19T11:07:18.883Z",
    "updatedDate": "2023-04-19T11:07:18.883Z",
    "auction": {
      "type": "BID",
      "lotId": 12,
      "startingPrice": {
        "value": 1500,
        "currency": "GBP"
      },
      "reservePrice": {
        "value": 1500,
        "currency": "GBP"
      },
      "askingPrice": {
        "value": 1500,
        "currency": "GBP"
      },
      "buyNowPrice": {
        "value": 1500,
        "currency": "GBP"
      },
      "startDate": "2023-04-19T11:07:18.883Z",
      "endDate": "2023-04-21T11:07:18.883Z"
    },
    "startDate": "2023-04-19T11:07:18.883Z",
    "endDate": "2023-04-23T11:07:18.883Z",
    "attentionGrabber": "This is a really great car",
    "description": "Some information about a car.\n\nAnd some more information with a line break.",
    "tradeVatStatus": "MARGINAL",
    "externalUrl": "https://some-url.com/a-page"
  },
  "features": [
    {
      "description": "DAB Radio",
      "standard": false,
      "category": "electronics"
    }
  ],
  "conditionReportUrl": "https://your-domain.com/condition-report.pdf",
  "condition": {
    "externalConditionGrade": "1",
    "surecheckGrade": "BRONZE",
    "damageItems": [
      {
        "zone": "WINDSCREEN",
        "damageType": "BROKEN"
      }
    ]
  },
  "videoUrl": "https://www.youtube.com/watch?v=yIQd2Ya0Ziw&ab_channel=Calm",
  "images": [
    {
      "url": "https://howtodrawforkids.com/wp-content/uploads/2022/01/9-cartoon-car-drawing-tutorial.jpg",
      "platformUrl": "https://howtodrawforkids.com/wp-content/uploads/2022/01/9-cartoon-car-drawing-tutorial.jpg",
      "uploaded": true,
      "tags": [
        "front_nearside"
      ]
    }
  ],
  "capTaxonomy": {
    "id": "string",
    "code": "string",
    "make": "string",
    "model": "string",
    "variant": "string",
    "derivative": "string"
  },
  "availableUntil": "2025-05-04T09:42:00Z",
  "requestedNetwork": "string",
  "advertiser": {
    "address": {
      "address1": "Line1",
      "address2": "Line2",
      "town": "Manchester",
      "county": "Manchester",
      "postcode": "A Postcode",
      "country": "United Kingdom",
      "latLong": {
        "latitude": 51.518562,
        "longitude": -0.143826
      }
    },
    "contact": {
      "email": "test.user@example.com",
      "title": "Mr",
      "firstName": "Test",
      "lastName": "User",
      "mobileNumber": "07222222222",
      "landlineNumber": "01611111111"
    }
  },
  "additionalData": {
    "mechanical_fails_start": true,
    "mechanical_bad_gearbox": true,
    "mechanical_unusual_noise": true,
    "mechanical_veers": true,
    "mechanical_warning_light": true,
    "mechanical_exhaust_smoke": true,
    "mechanical_leaks": true,
    "mechanical_note": "string",
    "electrical_aircon_not_cold": true,
    "electrical_dashboard_not_working": true,
    "electrical_speakers_not_working": true,
    "electrical_satnav_not_working": true,
    "electrical_note": "string",
    "odour_smoke": true,
    "odour_pet": true,
    "odour_damp": true,
    "odour_note": "string",
    "bodywork_repairs": true,
    "bodywork_repairs_note": "string",
    "bodywork_issues": true,
    "bodywork_issues_note": "string",
    "vehicle_modifications": true,
    "vehicle_modifications_note": "string",
    "c2b_top_nav_journey": true,
    "v5c_in_different_name": true,
    "test_name": "string",
    "test_group": "string",
    "c2b_valuation_range_lower": 42,
    "c2b_valuation_range_upper": 42,
    "taxi": true
  }
}
Response examples (400)
{
  "errorCode": "INVALID_STOCK_ITEM",
  "errorMessage": "An error message",
  "errors": [
    {
      "message": "An error has occurred",
      "key": "string"
    }
  ]
}
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}
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 (429)
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}
Response examples (500)
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}
Response examples (502)
{
  "errorCode": "SERVER_ERROR",
  "errorMessage": "An unexpected error has occurred"
}