Skip to main content
Documentation

Vehicles

vehicles.create

Add a vehicle to a customer's garage
WritesWrite budget

REST

Shipping
POST /api/v1/vehicles/create

MCP tool

Live
vehicles.create

Exposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Vehicles domain.

Operating contract

Creates one car in one customer's garage. It needs SOME identity — a make and model, a VIN, or a plate — because a row with none of those is not a car anybody can find again.

A VIN, if given, must be a full 17 characters. A partial scan is refused rather than stored: three attempts at one VIN is how one car became three records, and the refusal says so.

IT MAY RESOLVE RATHER THAN CREATE. If this shop already holds a live vehicle with that VIN in the SAME customer's garage, you get that car back with reused: true and nothing is written. If the VIN belongs to a DIFFERENT customer, this refuses and names the vehicle, because moving a car between garages is a person's decision.

vehicle_type drives the shop's tiered pricing. Call vehicles.types for the list rather than guessing a label.

Returns the vehicle; its id is the vehicle_id that jobs.list and quotes.list take.

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

FieldTypeDescription
customer_idrequiredstringuuid

Whose garage this car goes in, as returned by customers.list, customers.find_by_contact or customers.create.

vinstringmax 24 chars

The full 17-character VIN, if you have one. Partial VINs are refused.

yearinteger1900–2100

Model year.

makestringmax 60 chars

Make, e.g. 'BMW'.

modelstringmax 60 chars

Model, e.g. 'M3'.

trimstringmax 60 chars

Trim, e.g. 'Competition'.

colorstringmax 40 chars

Colour.

license_platestringmax 20 chars

Licence plate.

mileageinteger0–2000000

Odometer reading.

vehicle_typestring

Size class for tiered pricing. Call vehicles.types for the list.

One of: car, truck, suv, van, coupe, motorcycle, commercial, exotic

Output

FieldTypeDescription
vehicleobject

vehicle.idstring

vehicle.customer_idstring

vehicle.labelstring | null

vehicle.yearnumber | null

vehicle.makestring | null

vehicle.modelstring | null

vehicle.trimstring | null

vehicle.colorstring | null

vehicle.vinstring | null

vehicle.license_platestring | null

vehicle.mileagenumber | null

vehicle.vehicle_typestring

vehicle.created_atstring

reusedboolean

Examples

Built from this capability's own schema — required fields and the ones carrying a default, and nothing invented. Paste one and it validates.

curl
export SERVICEVIN_API_KEY=svk_live_…

curl -X POST https://www.servicevin.com/api/v1/vehicles/create \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customer_id":"9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"}'

TypeScript (fetch)
const res = await fetch("https://www.servicevin.com/api/v1/vehicles/create", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "customer_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
  }),
});

// 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;

Python (requests)
import os, requests

res = requests.post(
    "https://www.servicevin.com/api/v1/vehicles/create",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "customer_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"])
data = payload["data"]

MCP tools/call — https://www.servicevin.com/api/mcp
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "vehicles.create",
    "arguments": {
      "customer_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
    }
  }
}

Refusals

The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.

StatusCodeWhen
404not_foundThe id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both.
403forbiddenThis login does not hold customers.access.
403insufficient_scopeThe credential is read-only and this capability writes.
422validation_errorAn argument was wrong. The message names the field.
429rate_limitedToo many write calls. Back off and retry.
500internal_errorSomething failed on our side. Nothing was changed.