Documentation
Vehicles
vehicles.decode_vin
REST
ShippingPOST /api/v1/vehicles/decode_vinMCP tool
Livevehicles.decode_vinExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Vehicles domain.
Operating contract
Turns seventeen characters into a car: year, make, model, trim and body class, plus the vehicle SIZE this product prices on.
USE THIS BEFORE vehicles.create, not after. A VIN typed off a windscreen is the most reliable thing a customer can give you, and a decoded record beats four questions and a guess about whether an F-150 is a truck.
vehicle_type IS THE FIGURE THAT MOVES MONEY. It is what booking.availability, booking.deposit_due and every price tier are read at, and it is derived from the body class rather than from the model name — which is why a VIN beats asking.
THIS DOES NOT TOUCH THIS SHOP'S RECORDS. It decodes; it files nothing. vehicles.find_by_vin is the read that says whether this shop already has the car, and it is worth making first — decoding a VIN the shop already holds and creating a second record is how a customer's history splits in two.
decoded: false MEANS THE LOOKUP DID NOT ANSWER, and that is not the same as a bad VIN. The upstream register can be slow, down, or simply hold nothing for an import or a very new model. Keep the raw VIN and ask the customer rather than reporting the car does not exist.
TRIM IS NOT TITLE-CASED, deliberately — trims are usually initialisms (XLT, SE, GT) and title-casing turns them into nonsense. Quote it as returned.
One VIN, entirely returned, so nothing is truncated.
Who may call it
- Permission
customers.accessThe caller must hold Customers at the ACT level. A read-only dashboard grant on the same section is refused.- Plan
- Every planNo plan gate. Available on every Service VIN plan.
- Retries
naturalNaturally idempotent — running it twice leaves the same world as running it once. A retrying integration needs no key.- Rate class
writeCounted against the write budget, which is tighter than a read.
Input
| Field | Type | Description |
|---|---|---|
| vinrequired | stringmax 17 chars, min 11 chars | The vehicle's VIN, as read off the car or given by the customer. Case and spacing do not matter. |
Output
| Field | Type | Description |
|---|---|---|
| vin | string | — |
| decoded | boolean | — |
| year | number | null | — |
| make | string | null | — |
| model | string | null | — |
| trim | string | null | — |
| body_class | string | null | — |
| vehicle_type | string | null | — |
Examples
Built from this capability's own schema — required fields and the ones carrying a default, and nothing invented. Paste one and it validates.
export SERVICEVIN_API_KEY=svk_live_…
curl -X POST https://www.servicevin.com/api/v1/vehicles/decode_vin \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"vin":"…"}'const res = await fetch("https://www.servicevin.com/api/v1/vehicles/decode_vin", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"vin": "…"
}),
});
// Success and failure are both envelopes. Switch on error.code, never
// on error.message — the codes are stable, the messages are for people.
const payload = await res.json();
if (!res.ok) throw new Error(payload.error.code);
const data = payload.data;import os, requests
res = requests.post(
"https://www.servicevin.com/api/v1/vehicles/decode_vin",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={
"vin": "…"
},
timeout=30,
)
payload = res.json()
if not res.ok:
raise RuntimeError(payload["error"]["code"])
data = payload["data"]{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "vehicles.decode_vin",
"arguments": {
"vin": "…"
}
}
}Refusals
The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.
| Status | Code | When |
|---|---|---|
| 404 | not_found | The id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both. |
| 403 | forbidden | This login does not hold customers.access. |
| 422 | validation_error | An argument was wrong. The message names the field. |
| 429 | rate_limited | Too many write calls. Back off and retry. |
| 500 | internal_error | Something failed on our side. Nothing was changed. |