---
title: "Solve for a target drive-away price"
method: POST
path: "/v1/quote/target-drive-away"
---

# Solve for a target drive-away price

`POST /v1/quote/target-drive-away`

## Request

- Base URL: `https://pricing-api.vyro.com.au`
- URL: `https://pricing-api.vyro.com.au/v1/quote/target-drive-away`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Works back from a drive-away price. Send a normal quote request plus a `target`; the engine finds the largest value for one dutiable line (by default the first, i.e. the vehicle price), on a whole-`increment` grid, whose drive-away does not exceed the target, and returns the full quote at that value. Every statutory charge is recomputed at the solved value. Duty is stepped (per $100 or $200), so an exact match is not always possible: `solution.shortfall` reports the gap, which is never negative (the quote never exceeds the target).

## Request body

- union
  - object: A PricingRequest plus the drive-away target to solve for.
    - `target` TargetDriveAwayTarget, required
      - `driveAway` integer, required: Target drive-away in cents (at most $100m).
      - `adjustLineIndex` integer: Index into `pricingInputs.dutiable` of the line to solve. Default 0.
      - `increment` integer: Solve on this grid, in cents. Default 100 (whole dollars).
  - object: A PricingRequest plus the drive-away target to solve for.
    - `target` TargetDriveAwayTarget, required
      - `driveAway` integer, required: Target drive-away in cents (at most $100m).
      - `adjustLineIndex` integer: Index into `pricingInputs.dutiable` of the line to solve. Default 0.
      - `increment` integer: Solve on this grid, in cents. Default 100 (whole dollars).

## Response `200`

Solved quote

- TargetDriveAwayResponse
  - `target` object, required
    - `driveAway` integer, required
    - `adjustLineIndex` integer, required
    - `increment` integer, required
  - `solution` object, required
    - `lineDescription` string, required: Description of the solved dutiable line.
    - `originalValue` integer, required: The line value you sent, in cents.
    - `solvedValue` integer, required: The line value that produces the target, in cents.
    - `adjustment` integer, required: solvedValue - originalValue. Negative means a discount is required.
    - `driveAway` integer, required: Drive-away achieved at the solved value, in cents.
    - `shortfall` integer, required: target - achieved drive-away, in cents. Never negative.
    - `exact` boolean, required: True when the achieved drive-away equals the target.
    - `iterations` integer, required: Engine evaluations used by the solver.
  - `quote` PricingResponse, required: Returns the staged quote. Totals are presented per stage plus a drive-away sum, while `categories` exposes the full ledger of line items with the rule IDs that generated them so third parties can trace how the engine augmented their inputs.
    - `currency` string, required: ISO 4217 currency code. Currently always `AUD`.
    - `pricingCode` string, required: Echoes the jurisdiction that was priced.
    - `financialYear` string, required: Financial year derived from `purchaseDate` (format: YYYY-YYYY).
    - `categories` object, required: Mirrors the three pricing stages. Each array begins with the exact line items you sent in the matching `pricingInputs` bucket and then includes any derived adjustments. For instance, the `dutiable` array will show your base price, accessories, and dealer delivery followed by lookup-generated items; `onRoad` contains caller-provided extras plus NSW duty/registration/CTP rows; `additional` lists rebates or promotions applied after taxes.
      - `dutiable` PricingLineItem[], required
        - `value` integer, required: Amount in cents (AUD).
        - `description` string: Readable label safe for invoice or UI display.
        - `ruleId` string: Identifier of the rule that generated this line item.
        - `tax` TaxDetail: Describes which tax regime applies to a line item and how the amount was interpreted.
          - `code` 'GST' | 'VAT' | 'NONE': Tax identifier (GST by default).
          - `jurisdiction` string: Optional ISO-style jurisdiction for multi-region deployments.
          - `rateBps` integer: Tax rate expressed in basis points (e.g. 1000 = 10%).
          - `mode` 'inclusive' | 'exclusive' | 'exempt': Whether `value` already includes tax, requires tax to be applied, or is exempt.
          - `source` 'caller' | 'engine': Indicates whether the caller provided the tax metadata or the engine defaulted it.
          - `metadata` object: Optional structured metadata for downstream reporting.
        - `amounts` MonetaryBreakdown: Net/tax/gross representation of a monetary amount in cents.
          - `beforeTax` integer, required: Amount in cents before tax is applied.
          - `taxAmount` integer, required: Tax component in cents.
          - `afterTax` integer, required: Amount in cents after tax (this mirrors `value` in most responses).
          - `currency` string: ISO 4217 currency code. Defaults to `AUD`.
        - `components` PricingLineItemComponent[]: Optional breakdown of sub-components rolled into this line item.
          - `description` string, required
          - `value` integer, required
          - `tax` TaxDetail: Describes which tax regime applies to a line item and how the amount was interpreted.
            - `code` 'GST' | 'VAT' | 'NONE': Tax identifier (GST by default).
            - `jurisdiction` string: Optional ISO-style jurisdiction for multi-region deployments.
            - `rateBps` integer: Tax rate expressed in basis points (e.g. 1000 = 10%).
            - `mode` 'inclusive' | 'exclusive' | 'exempt': Whether `value` already includes tax, requires tax to be applied, or is exempt.
            - `source` 'caller' | 'engine': Indicates whether the caller provided the tax metadata or the engine defaulted it.
            - `metadata` object: Optional structured metadata for downstream reporting.
          - `amounts` MonetaryBreakdown: Net/tax/gross representation of a monetary amount in cents.
            - `beforeTax` integer, required: Amount in cents before tax is applied.
            - `taxAmount` integer, required: Tax component in cents.
            - `afterTax` integer, required: Amount in cents after tax (this mirrors `value` in most responses).
            - `currency` string: ISO 4217 currency code. Defaults to `AUD`.
      - `onRoad` PricingLineItem[], required
        - `value` integer, required: Amount in cents (AUD).
        - `description` string: Readable label safe for invoice or UI display.
        - `ruleId` string: Identifier of the rule that generated this line item.
        - `tax` TaxDetail: Describes which tax regime applies to a line item and how the amount was interpreted.
          - `code` 'GST' | 'VAT' | 'NONE': Tax identifier (GST by default).
          - `jurisdiction` string: Optional ISO-style jurisdiction for multi-region deployments.
          - `rateBps` integer: Tax rate expressed in basis points (e.g. 1000 = 10%).
          - `mode` 'inclusive' | 'exclusive' | 'exempt': Whether `value` already includes tax, requires tax to be applied, or is exempt.
          - `source` 'caller' | 'engine': Indicates whether the caller provided the tax metadata or the engine defaulted it.
          - `metadata` object: Optional structured metadata for downstream reporting.
        - `amounts` MonetaryBreakdown: Net/tax/gross representation of a monetary amount in cents.
          - `beforeTax` integer, required: Amount in cents before tax is applied.
          - `taxAmount` integer, required: Tax component in cents.
          - `afterTax` integer, required: Amount in cents after tax (this mirrors `value` in most responses).
          - `currency` string: ISO 4217 currency code. Defaults to `AUD`.
        - `components` PricingLineItemComponent[]: Optional breakdown of sub-components rolled into this line item.
          - `description` string, required
          - `value` integer, required
          - `tax` TaxDetail: Describes which tax regime applies to a line item and how the amount was interpreted.
            - `code` 'GST' | 'VAT' | 'NONE': Tax identifier (GST by default).
            - `jurisdiction` string: Optional ISO-style jurisdiction for multi-region deployments.
            - `rateBps` integer: Tax rate expressed in basis points (e.g. 1000 = 10%).
            - `mode` 'inclusive' | 'exclusive' | 'exempt': Whether `value` already includes tax, requires tax to be applied, or is exempt.
            - `source` 'caller' | 'engine': Indicates whether the caller provided the tax metadata or the engine defaulted it.
            - `metadata` object: Optional structured metadata for downstream reporting.
          - `amounts` MonetaryBreakdown: Net/tax/gross representation of a monetary amount in cents.
            - `beforeTax` integer, required: Amount in cents before tax is applied.
            - `taxAmount` integer, required: Tax component in cents.
            - `afterTax` integer, required: Amount in cents after tax (this mirrors `value` in most responses).
            - `currency` string: ISO 4217 currency code. Defaults to `AUD`.
      - `additional` PricingLineItem[], required
        - `value` integer, required: Amount in cents (AUD).
        - `description` string: Readable label safe for invoice or UI display.
        - `ruleId` string: Identifier of the rule that generated this line item.
        - `tax` TaxDetail: Describes which tax regime applies to a line item and how the amount was interpreted.
          - `code` 'GST' | 'VAT' | 'NONE': Tax identifier (GST by default).
          - `jurisdiction` string: Optional ISO-style jurisdiction for multi-region deployments.
          - `rateBps` integer: Tax rate expressed in basis points (e.g. 1000 = 10%).
          - `mode` 'inclusive' | 'exclusive' | 'exempt': Whether `value` already includes tax, requires tax to be applied, or is exempt.
          - `source` 'caller' | 'engine': Indicates whether the caller provided the tax metadata or the engine defaulted it.
          - `metadata` object: Optional structured metadata for downstream reporting.
        - `amounts` MonetaryBreakdown: Net/tax/gross representation of a monetary amount in cents.
          - `beforeTax` integer, required: Amount in cents before tax is applied.
          - `taxAmount` integer, required: Tax component in cents.
          - `afterTax` integer, required: Amount in cents after tax (this mirrors `value` in most responses).
          - `currency` string: ISO 4217 currency code. Defaults to `AUD`.
        - `components` PricingLineItemComponent[]: Optional breakdown of sub-components rolled into this line item.
          - `description` string, required
          - `value` integer, required
          - `tax` TaxDetail: Describes which tax regime applies to a line item and how the amount was interpreted.
            - `code` 'GST' | 'VAT' | 'NONE': Tax identifier (GST by default).
            - `jurisdiction` string: Optional ISO-style jurisdiction for multi-region deployments.
            - `rateBps` integer: Tax rate expressed in basis points (e.g. 1000 = 10%).
            - `mode` 'inclusive' | 'exclusive' | 'exempt': Whether `value` already includes tax, requires tax to be applied, or is exempt.
            - `source` 'caller' | 'engine': Indicates whether the caller provided the tax metadata or the engine defaulted it.
            - `metadata` object: Optional structured metadata for downstream reporting.
          - `amounts` MonetaryBreakdown: Net/tax/gross representation of a monetary amount in cents.
            - `beforeTax` integer, required: Amount in cents before tax is applied.
            - `taxAmount` integer, required: Tax component in cents.
            - `afterTax` integer, required: Amount in cents after tax (this mirrors `value` in most responses).
            - `currency` string: ISO 4217 currency code. Defaults to `AUD`.
    - `totals` Totals, required: Aggregated cents-per-stage plus the final drive-away amount.
      - `dutiable` integer, required: Sum of `categories.dutiable`.
      - `onRoad` integer, required: Sum of `categories.onRoad`.
      - `additional` integer, required: Sum of `categories.additional`.
      - `driveAway` integer, required: dutiable + onRoad + additional.
      - `tax` PricingTaxTotals: Aggregated tax (GST/VAT) amounts per pricing stage.
        - `dutiable` integer, required: Sum of tax across `categories.dutiable`.
        - `onRoad` integer, required: Sum of tax across `categories.onRoad`.
        - `additional` integer, required: Sum of tax across `categories.additional`.
        - `overall` integer, required: dutiable + onRoad + additional tax.
    - `metadata` PricingResponseMetadata, required: Trace data for auditing and debugging.
      - `rulesVersion` string, required: Semantic identifier for the active rule set.
      - `appliedRules` string[], required: Ordered list of rule IDs executed during the quote.
      - `appliedConcessions` string[], required: Concession identifiers that affected this quote.
      - `warnings` string[], required: Non-fatal warnings surfaced during the calculation.
      - `taxEffectiveDate` string, date, required: Date actually used to select tax rules.
      - `taxFinancialYear` string, required: Financial year derived from the effective tax date.
      - `taxDatePolicy` 'legacy' | 'error' | 'prior_year', required: Controls how the engine responds when `registration.startDate` is outside the supported tax rule range.
      - `taxFallbackApplied` boolean, required: True when prior-year fallback was applied.

## Other responses

- `400`: Invalid input (including INVALID_TARGET)
- `401`: Authentication required
- `403`: Showroom access denied
- `422`: TARGET_NOT_ACHIEVABLE - the target is below the drive-away with the adjusted line at 0 (on-road charges and other lines alone exceed it).
- `500`: Server error

---

[API](https://skmtc.dev/vyro/apis/pricing-api.md) - [All operations](https://skmtc.dev/vyro/apis/pricing-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vyro/apis/pricing-api/revisions/cbb70392151c?raw)
