# Valuation Predict

## Overview

The Valuation API can be used to determine new vehicles' present retail and trade values and their residual values. Read more about our [valuation methodology](/valuation/valuation/valuation-approach.md) or how we use [confidence score](/valuation/valuation/autograb-confidence-score.md) on our responses.&#x20;

## Value a vehicle using an AutoGrab ID

> Value a vehicle using an AutoGrab ID

```json
{"openapi":"3.1.1","info":{"title":"AutoGrab API","version":"2.0.0"},"servers":[{"url":"https://api.autograb.com.au"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"ApiKey"}},"schemas":{"SinglePrediction":{"type":"object","properties":{"success":{"type":"boolean","default":true},"prediction":{"type":"object","properties":{"id":{"type":"string","description":"The unique pricing record ID"},"vehicle_id":{"type":"string","description":"The Vehicle ID of the vehicle that was priced"},"created_at":{"type":"string","description":"The date when the preidction was made"},"kms":{"type":"number","description":"The odometer reading that the valuation is based off. This is usually the same as the input provided, but if no odometer reading was specified, the average reading for the vehicle provided will be used instead."},"price":{"type":"number","description":"The predicted retail price"},"score":{"type":"number","description":"The pricing confidence score. This indicates the estimated degree of accuracy for the price prediction."},"retail_price":{"type":"number","description":"The predicted retail price"},"trade_price":{"type":"number","description":"The predicted trade price"},"adjustment":{"$ref":"#/components/schemas/AppliedPriceAdjustment"}}},"bounds":{"type":"object","properties":{"retail":{"type":"object","properties":{"lower":{"type":"number","description":"The predicted lower retail price bound"},"upper":{"type":"number","description":"The predicted upper retail price bound"}}},"trade":{"type":"object","properties":{"lower":{"type":"number","description":"The predicted lower trade price bound"},"upper":{"type":"number","description":"The predicted upper trade price bound"}}}}},"max_offer":{"type":"object","properties":{"reconditioning":{"type":"number"},"profit_margin":{"type":"number"},"lot":{"type":"number"},"transport":{"type":"number"},"admin":{"type":"number"},"price":{"type":"number"}}}}},"AppliedPriceAdjustment":{"allOf":[{"$ref":"#/components/schemas/PriceAdjustment"},{"type":"object","properties":{"type":{"description":"The granularity of the price adjustment. Vehicle price adjustments are applied to the whole vehicle and set using /valuations/adjustments, whereas pricing_record adjustments are set for a specific record using /valuations/history.","type":"string","enum":["account","vehicle","pricing_record"]}}}]},"PriceAdjustment":{"type":"object","properties":{"vehicle_id":{"type":"string"},"type":{"type":"string","enum":["account","vehicle","pricing_record"]},"enabled":{"description":"If the adjustment is enabled, it will be applied to new pricing requests for the vehicle id","type":"boolean"},"trade_adjustment":{"$ref":"#/components/schemas/PercentageOrFixedValue"},"retail_adjustment":{"$ref":"#/components/schemas/PercentageOrFixedValue"},"overrides":{"description":"If a price request falls within the kilometer ranges of any of your trade price overrides, your custom price will be returned instead of the adjusted AutoGrab trade price","type":"array","items":{"$ref":"#/components/schemas/PriceOverride"}}}},"PercentageOrFixedValue":{"type":"object","description":"Either a percentage of a total or a fixed value","properties":{"amount":{"description":"The value","type":"number"},"type":{"description":"Determines if the value is a percentage of a total value or a fixed amount","type":"string","enum":["fixed","percentage"]}}},"PriceOverride":{"type":"object","properties":{"id":{"description":"A unique ID that identifies the price override","type":"string"},"min_kms":{"description":"The minimum odometer reading that this override will apply at","type":"number"},"max_kms":{"description":"The maximum odometer reading that this override will apply at","type":"number"},"trade_price":{"description":"The trade price override, if applicable","type":"number"},"retail_price":{"description":"The retail price override, if applicable","type":"number"}}},"ErrorSchema":{"type":"object","properties":{"error":{"type":"boolean","default":true},"message":{"type":"string","description":"Error message"}}},"Region":{"type":"string","enum":["au","nz","uk","my"]}}},"paths":{"/v2/valuations/predict":{"post":{"summary":"Value a vehicle using an AutoGrab ID","description":"Value a vehicle using an AutoGrab ID","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinglePrediction"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}}},"tags":["Valuations"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["vehicle_id"],"properties":{"region":{"$ref":"#/components/schemas/Region"},"vehicle_id":{"type":"string","description":"The AutoGrab Vehicle ID which corresponds to the vehicle that should be valued"},"kms":{"type":"number","description":"The odometer reading of the vehicle. If no reading is provided, the average value will be subsituted"},"rrp_overwrite":{"type":"number"},"rrp_adjustment":{"type":"number"},"condition_score":{"type":"number"},"rego":{"type":"string","description":"The registration plate of the vehicle, for reference purposes only"},"state_for_pricing":{"type":"string","description":"state to be used for state based valuations instead of national"},"state":{"type":"string","description":"The registration state of the vehicle, if applicable"},"vin":{"type":"string","description":"The VIN of the vehicle, for reference purposes only"}}}}},"description":"request body"}}}}}
```

## Pricing ID

The payload returned by price prediction requests will include an ID, which you can use to refer to the pricing request in the future. The `/v2/valuations/history/{PRICING_ID}` method will return the response from a previous pricing request, and you can also use the Pricing ID to track price changes with the **Price Changes API**.

To get a paginated list of all your previous price predictions, you can use the `/v2/valuations/history` endpoint.

#### Condition Score <a href="#condition-score" id="condition-score"></a>

You can manipulate the valuation returned by the prediction endpoint by supplying a condition score. The condition score can be between `1` and `5`. A condition of 1 is poor, and 5 is excellent.

Supplying any other numbers will return the default trade\_price, which assumes excellent condition.

If you're building a user interface that allows the user to choose a condition, it is recommended that you follow the industry standard in the table below.

<table><thead><tr><th width="162">Condition</th><th>Condition Score</th></tr></thead><tbody><tr><td>Poor</td><td><code>1</code></td></tr><tr><td>Fair</td><td><code>2</code></td></tr><tr><td>Average</td><td><code>3</code></td></tr><tr><td>Good</td><td><code>4</code></td></tr><tr><td>Excellent</td><td><code>5</code></td></tr></tbody></table>

## Features

### Positive Equity

The positive equity feature identifies if the vehicle is in positive equity and the current equity position. To add an equity calculation to the Predict call, use `features=equity`

```json
{
    "success": true,
    "prediction": {
        "id": "599aff94-7c79-4b9c-a976-ff39c3892190",
        "vehicle_id": "4825547834130432",
        "kms": 20000,
        "price": 32669,
        "score": 0.8515,
        "retail_price": 32669,
        "trade_price": 27769,
        "adjustment": null
    },
    "equity": {
        "positive_equity": true,
        "equity_position": 15769
    }
}
```

### Valuation Bounds

If you require the upper and lower bounds used to calculate a prediction, you can use `features=bounds`.

{% code title="Example request body including the features array." overflow="wrap" %}

```json
curl --location 'https://api.autograb.com.au/v2/valuations/predict' \
--header 'Content-Type: application/json' \
--header 'ApiKey: YOURKEY' \
--data '{
    "region": "au",
    "vehicle_id": "5804870883868672",
    "kms": 30000,
    "features":["bounds"]
}'
```

{% endcode %}

{% code title="Example response with the bounds for the valuation included." %}

```json
{
    "success": true,
    "prediction": {
        "id": "e2813b16-1012-41b5-9ea3-3b65675c50fd",
        "vehicle_id": "5804870883868672",
        "kms": 57306,
        "price": 20622,
        "score": 0.9239,
        "retail_price": 20622,
        "trade_price": 17122,
        "adjustment": null
    },
    "bounds": {
        "retail": {
            "lower": 19622,
            "upper": 21872
        },
        "trade": {
            "lower": 16122,
            "upper": 18372
        }
    }
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devhub.autograb.com/valuation/valuation-predict.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
