> For the complete documentation index, see [llms.txt](https://motorweb.gitbook.io/motorweb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://motorweb.gitbook.io/motorweb/motorweb-reports/alerts.md).

# Alerts

Warnings and cautions returned alongside vehicle data.

MotorWeb adds alerts to a vehicle report when it finds something a buyer or insurer should know. An alert can mean the vehicle is reported stolen, the odometer looks inconsistent, the WOF has expired, or a dozen other things.

Alerts are returned **inside** the data they relate to, not in a separate list. An expired WOF alert sits inside `wof/expiry-date`. A stolen vehicle alert sits on the vehicle. This tells you what the alert is about without matching codes yourself.

### **Structure**

```xml
<expiry-date value="2017-05-11">11-May-2017
    <alert msg-code="VIR-10" type="alert">
        <head>Warrant Of Fitness (WOF) expired on 11-May-2017</head>
        <inline>WOF expired</inline>
    </alert>
</expiry-date>
```

<table><thead><tr><th width="150">Part</th><th>Description</th></tr></thead><tbody><tr><td><code>@type</code></td><td>Severity. Either <code>alert</code> or <code>caution</code>.</td></tr><tr><td><code>@msg-code</code></td><td>The alert code, for example <code>VIR-10</code>. Stable across versions.</td></tr><tr><td><code>head</code></td><td>The full message. Suitable for a heading or a detail line.</td></tr><tr><td><code>inline</code></td><td>A short form of the message. Suitable for display next to the value.</td></tr></tbody></table>

### **Severity**

<table><thead><tr><th width="150" align="center">Type</th><th>Meaning</th><th width="180">Convention</th></tr></thead><tbody><tr><td align="center"><code>alert</code></td><td>A serious issue. The vehicle is stolen, written off, has an unreliable odometer, or similar.</td><td>Displayed in red</td></tr><tr><td align="center"><code>caution</code></td><td>Something to look into. An expiring WOF, an unconfirmed owner, or similar.</td><td>Displayed in orange</td></tr></tbody></table>

{% hint style="warning" %}
**Display the text we send, do not hard-code your own.**

Use the `head` and `inline` values from the response. This text changes over time without warning, and new alert codes are added without a version change. Write your integration so an unknown `msg-code` still displays correctly.
{% endhint %}

### **Where alerts appear**

Alerts can attach to many points in the tree. The common ones are:

<table><thead><tr><th width="280">Location</th><th>Typical alerts</th></tr></thead><tbody><tr><td><code>vir-analysis</code></td><td>Report-level alerts covering the whole vehicle.</td></tr><tr><td><code>vehicle</code></td><td>Stolen, written off, damaged import, safety recall.</td></tr><tr><td><code>licence/expiry-date</code></td><td>Licence expired or expiring.</td></tr><tr><td><code>wof/expiry-date</code></td><td>WOF expired or expiring.</td></tr><tr><td><code>cof/expiry-date</code></td><td>COF expired or expiring.</td></tr><tr><td><code>owner</code></td><td>Owner not confirmed, owner not yet known to NZTA.</td></tr><tr><td><code>odometer-reading</code></td><td>Inconsistent or wound-back readings.</td></tr><tr><td><code>plate</code></td><td>Plate change history issues.</td></tr><tr><td><code>registration</code></td><td>Deregistered, cancelled or lapsed registration.</td></tr><tr><td><code>security-interests</code></td><td>Details on a registered security that do not match the vehicle.</td></tr></tbody></table>

### **Alert code families**

<table><thead><tr><th width="200">Prefix</th><th>Meaning</th></tr></thead><tbody><tr><td><code>VIR-…</code></td><td>The main alert set. Covers stolen, odometer, WOF, COF, licence, registration, ownership and security mismatches.</td></tr><tr><td><code>NOTE-…</code></td><td>Notes recorded against the vehicle, including water damage, fire damage, written off, safety recall and compulsory recall.</td></tr><tr><td><code>LTSA-…</code></td><td>Alerts sourced from historic LTSA records.</td></tr></tbody></table>

### **Retrieving the full alert list**

<mark style="color:green;">`GET`</mark> `https://robot.motorweb.co.nz/action/robotVirAlerts`

Returns every alert MotorWeb can produce, with a label and a full explanation for each. There are no parameters and no version segment. The response is `text/xml`.

Use it to build a local reference table, or to show your users a longer explanation than the `head` text allows.

The response has a different shape to the alerts embedded in reports:

```xml
<alerts>
    <alert type="alert" msg-code="VIR-01">
        <label>Vehicle is reported stolen</label>
        <explanation>
            <p>You need to contact the police directly and verify the vehicle's status.</p>
        </explanation>
    </alert>
</alerts>
```

Root element is `alerts`, and each `alert` carries `label` and `explanation` rather than `head` and `inline`.

```bash
curl --cert-type P12 --cert motorwebnz.p12:<CERTPASSWORD> \
  "https://robot.motorweb.co.nz/action/robotVirAlerts"
```

{% hint style="info" %}
This endpoint is the source of truth for alert codes and their meanings. Poll it when you want to refresh your reference data rather than hard-coding a list.

There is **no published schema** for this response. `alert-1.0.xsd` describes the alerts embedded in reports, not this document, and this document will not validate against it.
{% endhint %}

### **Sample explanations**

<details>

<summary>Expand to see a sample XML</summary>

```xml
<alerts>
    <alert type="alert" msg-code="VIR-01">
        <label> Vehicle is reported stolen </label>
        <explanation>
            <p> You need to contact the police directly and verify the vehicle's status. </p>
            <p> The numbers are </p>
            <list>
                <li>Northern region: 09 571 2800</li>
                <li>Central region: 04 472 3000</li>
                <li>Southern region: 03 363 7400</li>
            </list>
        </explanation>
    </alert>
    <alert type="caution" msg-code="VIR-26">
        <label> Inconsistent odometer readings - possibly around-the-clock, wound-back or human error </label>
        <explanation>
            <p> The vehicle's odometer readings appear to go backwards. </p>
            <p> A later odometer reading is lower than a previous odometer reading - refer to the odometer readings in the VIR </p>
            <p> Some possibilities for this could be due to: </p>
            <list>
                <li>The odometer has gone around-the-clock and reset back to zero.</li>
                <li>The odometer may have been tampered with and manually wound-back by someone trying to misrepresent the vehicle. </li>
                <li>The odometer has been replaced due to a mechanical fault.</li>
                <li>An odometer reading has been incorrectly entered into the Government records.</li>
            </list>
            <p> We suggest you get an independent mechanical inspection be performed by a company such as Vehicle Testing New Zealand (VTNZ). </p>
        </explanation>
    </alert>
    <alert type="alert" msg-code="VIR-02">
        <label> Odometer is known to be unreliable </label>
        <explanation>
            <p> The NZTA, MAF, or one of their agents, has physically inspected the vehicle's odometer and found that it has been tampered with. Contact the Transport Registry Center for more details on 0800 108 809. </p>
            <p> We recommended that you (the buyer) obtain an independent mechanical inspection before purchasing the vehicle. We recommend Vehicle Testing New Zealand (VTNZ). </p>
        </explanation>
    </alert>
    <alert type="caution" msg-code="VIR-24">
        <label> Current owner of this vehicle is not yet known to the NZTA </label>
        <explanation>
            <p> Both MR-13A and MR-13B forms are required to complete the Change of Ownership transaction. In this case the previous owner has completed the MR-13A form advising that they have sold the vehicle to another party. However, the current owner has not completed an MR-13B form to agree to accept ownership and liability for the vehicle. Hence the current vehicle owner is not yet officially known, and the previous owner is still technically responsible for the vehicle's parking tickets, fines, etc… </p>
            <p> We suggest that both you (the new buyer) and the current owner (seller) visit an NZTA agent (for example VTNZ or NZ Post) and complete the Change of Ownership procedure. Having the seller present is not a legal requirement. </p>
        </explanation>
    </alert>
    <alert type="caution" msg-code="VIR-23">
        <label> Identity of current owner has not been confirmed </label>
        <explanation>
            <p> The current owner has completed the required MR-13B form indicating that he has taken responsibility for the vehicle. </p>
            <p> However, they have not proved conclusively who they are by presenting suitable identification to an NZTA agent (for example driver's licence or passport). </p>
            <p> We suggest that both the seller and the new buyer visit an NZTA agent (for example VTNZ or NZ Post) and complete the Change of Ownership procedure. </p>
        </explanation>
    </alert>
    <alert type="caution" msg-code="VIR-29">
        <label> Vehicle's ownership has recently changed </label>
        <explanation>
            <p> The current registered owner has owned the vehicle for only a short period of time. If they are not a Registered Motor Vehicle Trader then you should question why they are selling the vehicle so soon after purchasing it. </p>
            <p> There could be mechanical or legal issues that you need to be aware of and we recommend that you; </p>
            <list>
                <li> Have an independent mechanical inspection from Vehicle Testing New Zealand (VTNZ) to check for mechanical faults. </li>
                <li> Establish proof of ownership. When there is a change of ownership, the NZTA automatically advise the seller of the change in ownership to ensure it was authorised. However this process can take several weeks and it is possible that the previous owner has not yet been made aware of the change, and therefore has not had a chance to dispute the change of ownership, or worse, report the vehicle stolen. In this case we advise you to contact the previous owner and confirm the change of ownership was legal (e.g. the vehicle has been purchased correctly and not stolen). </li>
            </list>
        </explanation>
    </alert>
    <alert type="alert" msg-code="VIR-07">
        <label> Licence (registration sticker) expired on ... </label>
        <explanation>
            <p> A vehicle must have a licence to legally be driven on the road. Licenses can be purchased for a period of 3 to 12 months. </p>
            <p> When this period passes, the licence has expired and must be renewed if the vehicle is to be used on a public road. </p>
            <p> Most vehicles need to be continuously licensed (there are some exceptions). This means that if the licence expired say 2 months ago, this 2 month period must still be paid for. You cannot save licensing fees by delaying your licence renewal. </p>
            <p> The current owner (vehicle seller) is responsible for paying all licence fees that are due up until the date that a Change of Ownership officially takes place. The new owner (vehicle buyer) is only responsible for licence fees incurred after the Change of Ownership takes place. </p>
            <p> Note: vehicles must have a valid WOF or COF to be re-licensed. </p>
        </explanation>
    </alert>
    <alert type="caution" msg-code="VIR-09">
        <label> Licence (registration sticker) will expire on ... </label>
        <explanation>
            <p> This is an advisory message simply telling you that this vehicle's licence will expire in the near future. </p>
            <p> A vehicle must have a licence to legally be driven on the road. Licenses can be purchased for a period of 3 to 12 months. </p>
            <p> When this period passes, the licence has expired and must be renewed if the vehicle is to be used. </p>
            <p> Most vehicles need to be continuously licensed (there are some exceptions). This means that if the licence expired say 2 months ago, this 2 month period must still be paid for. You cannot save licensing fees by delaying your licence renewal. </p>
        </explanation>
    </alert>
    <alert type="alert" msg-code="VIR-10">
        <label> Warrant Of Fitness (WOF) expired on ... </label>
        <explanation>
            <p> The WOF is a vehicle inspection that checks that minimum safety standards are met, and indicates that the vehicle is roadworthy. </p>
            <p> Without a current WOF certificate, this vehicle cannot legally be on the road. </p>
            <p> All vehicles over 5 years old, have WOFs issued for a 6 month period. </p>
            <p> For vehicles newer than 5 years, WOFs are issued for a 12 month period. </p>
            <p> We suggest you have a WOF inspection before you purchase the vehicle as it may reveal faults that are costly to fix. </p>
            <p> This can be done at any number of WOF inspection stations across New Zealand (for example Vehicle Testing New Zealand). </p>
            <p> If the vehicle does not pass its initial inspection, you have 28 days to rectify faults and have the vehicle rechecked by the same inspection station at no extra charge. </p>
        </explanation>
    </alert>
    <alert type="caution" msg-code="VIR-11">
        <label> Warrant Of Fitness (WOF) will expire on ... </label>
        <explanation>
            <p> This is an advisory message simply telling you that this vehicle WOF will expire in the near future. </p>
            <p> The WOF is a vehicle inspection that checks that minimum safety standards are met, and indicates that the vehicle is roadworthy. </p>
            <p> Without a current WOF certificate, this vehicle cannot legally be on the road. </p>
            <p> All vehicles over 5 years old, have WOFs issued for a 6 month period. </p>
```

</details>

\### \*\*Which reports return alerts\*\*

<table><thead><tr><th width="300">Report</th><th>Alerts returned</th></tr></thead><tbody><tr><td><a href="/motorweb/motorweb-reports/vir.md">VIR</a></td><td>Yes</td></tr><tr><td><a href="/motorweb/motorweb-reports/motor-check.md">Motor Check</a></td><td>Yes</td></tr><tr><td><a href="/motorweb/motorweb-reports/motor-check-redbook.md">Motor Check + RedBook</a></td><td>Yes</td></tr><tr><td><a href="/motorweb/motorweb-reports/asset-check.md">Asset Check</a></td><td>Yes</td></tr><tr><td><a href="/motorweb/motorweb-reports/bvi.md">BVI</a></td><td>Only when your account holds the alerts privilege for this report</td></tr><tr><td><a href="/motorweb/motorweb-reports/chassis-check.md">Chassis Check</a></td><td>Only when your account holds the alerts privilege for this report</td></tr><tr><td><a href="/motorweb/motorweb-reports/current-owner-check.md">Current Owner Check</a></td><td>Yes, on the owner element</td></tr><tr><td><a href="/motorweb/motorweb-reports/advanced-vehicle-check.md">Advanced Vehicle Check</a></td><td>Yes</td></tr></tbody></table>

### **XSD**

`alert-1.0.xsd` defines the alert structure **as embedded in vehicle reports** — the `head` and `inline` form shown at the top of this page.

{% embed url="<https://www.motorweb.co.nz/action/robotSchema/alert-1.0.xsd>" %}

The `/action/robotVirAlerts` reference document has no published schema.

**Notes:**

* Always render `head` and `inline` from the response
* Handle unknown `msg-code` values. New codes are added without a version change
* An element can carry more than one alert
* Alert severity is only ever `alert` or `caution`
