> 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/motor-check-redbook.md).

# Motor Check + RedBook

A Motor Check with RedBook codes attached.

<mark style="color:green;">`GET`</mark> `https://robot.motorweb.co.nz/b2b/mc2rb/{version}`

Returns the same data as a [Motor Check](/motorweb/motorweb-reports/motor-check.md), plus a `redbook-codes` element holding the RedBook models that match the vehicle.

{% hint style="warning" %}
This path has no `/generate/` segment. It is `/b2b/mc2rb/{version}`, not `/b2b/mc2rb/generate/{version}`.
{% endhint %}

### **Environments**

<table><thead><tr><th width="214" align="center">Environment</th><th>Base URL</th></tr></thead><tbody><tr><td align="center">UAT</td><td><code>https://robot.uat.motorweb.co.nz</code></td></tr><tr><td align="center">Production</td><td><code>https://robot.motorweb.co.nz</code></td></tr></tbody></table>

### **Versions**

<table><thead><tr><th width="150" align="center">Version</th><th>Notes</th></tr></thead><tbody><tr><td align="center"><strong>1.0</strong></td><td><strong>Current version.</strong> The only version accepted.</td></tr></tbody></table>

### **Access**

Your account must hold the Motor Check + RedBook privilege. Without it the request returns `400` with `MotorWeb-Error-Code: BAD-ACCOUNT`.

### **Headers**

No request headers are required.

| Result  | Content type |
| ------- | ------------ |
| Success | `text/xml`   |
| Error   | `text/plain` |

### **Body**

```
< no body required >
```

### **Query Parameters**

<table><thead><tr><th width="180">Name</th><th>Value</th></tr></thead><tbody><tr><td><code>plateOrVin</code></td><td>A registration plate (6 characters or fewer) or a VIN (exactly 17 characters). Required unless you supply <code>vehicleId</code> or <code>stockNumber</code>.</td></tr><tr><td><code>vehicleId</code></td><td>The ID of a vehicle already held under your account.</td></tr><tr><td><code>stockNumber</code></td><td>Your own reference for a vehicle already held under your account.</td></tr><tr><td><code>specificReason</code></td><td>Why private owner information is required, under section 241 of the Land Transport Act. Mandatory on most accounts.</td></tr><tr><td><code>widen</code></td><td>Optional boolean. Defaults to <code>false</code>. See below.</td></tr></tbody></table>

#### widen

RedBook matching filters candidate models on VIN, model code, engine, body style, capacity, doors, seats, fuel type, transmission, import status and other criteria.

* `widen=false` (default) applies the standard filter chain. If no model matches, no codes are returned.
* `widen=true` relaxes criteria whenever a filter removes every remaining candidate. This finds a match more often, at the cost of accuracy.

### **Response**

{% tabs %}
{% tab title="200" %}

```xml
<mc2rb version="1.0" vehicle-id="-1268761924" billing-user="MotorWeb Development" id="-1268761932" reference="749990de" timestamp="2025-03-07T12:04:02.446" user="MotorWeb Development">
    <vir-analysis version="4.0">
        <vehicle>
            <registration>
                <first-registration-date-in-new-zealand value="2011-04-05">5-Apr-2011</first-registration-date-in-new-zealand>
                <registration-status code="A">Active</registration-status>
                <cause-of-last-registration code="N">New</cause-of-last-registration>
                <registered-overseas value="false">No</registered-overseas>
                <last-registration-date value="2011-04-05">5-Apr-2011</last-registration-date>
            </registration>
            <licence>
                <expiry-date value="2016-12-31">31-Dec-2016
                    <alert msg-code="VIR-07" type="alert">
                        <head>Licence (registration sticker) expired on 31-Dec-2016</head>
                        <inline>Licence expired</inline>
                    </alert>
                </expiry-date>
                <licence-type code="L">Licence</licence-type>
                <issue-date value="2015-12-01">1-Dec-2015</issue-date>
                <continuous value="true">Yes</continuous>
            </licence>
            <year-of-manufacture value="2011">2011</year-of-manufacture>
            <make>Mitsubishi</make>
            <model>ASX 2WD 2.0P CVT Sport</model>
            <mvr-model>ASX</mvr-model>
            <body-style code="SW">Wagon</body-style>
            <vehicle-type code="7">Passenger Car/Van</vehicle-type>
            <vin>JMFXTGA2WBZ001111</vin>
            <main-colour>BLACK</main-colour>
            <cc-rating unit="cc" value="1998">1,998</cc-rating>
            <fuel-type code="1">Petrol</fuel-type>
            <odometer-unit code="K">Km</odometer-unit>
            <transmission>
                <type code="C" has-gears="false">CVT</type>
            </transmission>
            <model-code>BE4SP45;</model-code>
            <sub-model-spec>2.0P/CVT/SV/5S</sub-model-spec>
        </vehicle>
    </vir-analysis>
    <redbook-codes>
        <redbook-ref>
            <fifteen-digit>NZVMITS2011AEAA</fifteen-digit>
            <eight-digit>MITS11AA</eight-digit>
            <year>2011</year>
            <make>Mitsubishi</make>
            <family>ASX</family>
            <description>2WD Wagon 5dr CVT 6sp 2.0i</description>
        </redbook-ref>
    </redbook-codes>
</mc2rb>
```

{% endtab %}

{% tab title="400" %}

```
No vehicle identifiers specified
```

or

```
There are no matching models in the RedBook database
```

{% endtab %}
{% endtabs %}

### **Fields worth noting**

<table><thead><tr><th width="220">Element</th><th>Description</th></tr></thead><tbody><tr><td><code>redbook-codes</code></td><td>Wraps the matches. Absent when no model matched.</td></tr><tr><td><code>redbook-ref</code></td><td>Repeats. One entry per matching RedBook model. More than one entry means the vehicle could not be narrowed to a single model.</td></tr><tr><td><code>fifteen-digit</code></td><td>The 15-character RedBook code.</td></tr><tr><td><code>eight-digit</code></td><td>The 8-character RedBook code.</td></tr></tbody></table>

{% hint style="info" %}
The root element is `mc2rb`, not `vir`. The vehicle data sits inside `vir-analysis`, the same as a Motor Check.
{% endhint %}

### **XSD**

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

### **Errors**

Errors return `text/plain` with the message in the body. A `MotorWeb-Error-Code` response header carries a machine-readable code.

<table><thead><tr><th width="80">HTTP</th><th width="170">Error code header</th><th>Message and cause</th></tr></thead><tbody><tr><td>400</td><td><code>BAD-PARAM</code></td><td><code>No vehicle identifiers specified</code></td></tr><tr><td>400</td><td><code>BAD-PARAM</code></td><td><code>Cannot specify both vehicleId and plateOrVin</code></td></tr><tr><td>400</td><td><code>BAD-PARAM</code></td><td><code>specificReason not specified</code></td></tr><tr><td>400</td><td><code>NO-MATCH</code></td><td><code>There are no matching models in the RedBook database</code> — try <code>widen=true</code>.</td></tr><tr><td>400</td><td><code>NOT-FOUND</code></td><td><code>Vehicle not found for vehicle ID: {id}</code></td></tr><tr><td>400</td><td><code>BAD-ACCOUNT</code></td><td>Your account does not hold the Motor Check + RedBook privilege.</td></tr><tr><td>400</td><td><code>MC-21</code>, <code>MC-22</code>, <code>MC-23</code></td><td>Errors passed through from NZTA.</td></tr><tr><td>400</td><td><code>EXTERNAL-ISSUE</code></td><td>NZTA is unavailable. Check <a href="/motorweb/motorweb-reports/ping.md">Ping</a> and retry.</td></tr><tr><td>401</td><td>—</td><td>Certificate authentication failed.</td></tr></tbody></table>

**Example cURL command:**

```bash
# Production
curl --cert-type P12 --cert motorwebnz.p12:<CERTPASSWORD> \
  "https://robot.motorweb.co.nz/b2b/mc2rb/1.0?plateOrVin=ABC123&specificReason=state+your+specific+reason"

# With widened matching
curl --cert-type P12 --cert motorwebnz.p12:<CERTPASSWORD> \
  "https://robot.motorweb.co.nz/b2b/mc2rb/1.0?plateOrVin=ABC123&specificReason=state+your+specific+reason&widen=true"
```

**Notes:**

* Authentication is mutual TLS with a MotorWeb-issued client certificate
* Your account must hold the Motor Check + RedBook privilege
* `redbook-ref` repeats. Handle more than one match
* For RedBook valuations rather than codes, see [Chassis Check + RedBook Valuation](/motorweb/motorweb-reports/chassis-check-redbook-valuation.md) or [RedBook Match and Valuation](/motorweb/additional-services/redbook-match-and-valuation.md)
