Documentation
Vehicles
vehicles.create
REST
ShippingPOST /api/v1/vehicles/createMCP tool
Livevehicles.createExposed 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
| Field | Type | Description |
|---|---|---|
| customer_idrequired | stringuuid | Whose garage this car goes in, as returned by customers.list, customers.find_by_contact or customers.create. |
| vin | stringmax 24 chars | The full 17-character VIN, if you have one. Partial VINs are refused. |
| year | integer1900–2100 | Model year. |
| make | stringmax 60 chars | Make, e.g. 'BMW'. |
| model | stringmax 60 chars | Model, e.g. 'M3'. |
| trim | stringmax 60 chars | Trim, e.g. 'Competition'. |
| color | stringmax 40 chars | Colour. |
| license_plate | stringmax 20 chars | Licence plate. |
| mileage | integer0–2000000 | Odometer reading. |
| vehicle_type | string | Size class for tiered pricing. Call vehicles.types for the list. One of:car, truck, suv, van, coupe, motorcycle, commercial, exotic |
Output
| Field | Type | Description |
|---|---|---|
| vehicle | object | — |
| vehicle.id | string | — |
| vehicle.customer_id | string | — |
| vehicle.label | string | null | — |
| vehicle.year | number | null | — |
| vehicle.make | string | null | — |
| vehicle.model | string | null | — |
| vehicle.trim | string | null | — |
| vehicle.color | string | null | — |
| vehicle.vin | string | null | — |
| vehicle.license_plate | string | null | — |
| vehicle.mileage | number | null | — |
| vehicle.vehicle_type | string | — |
| vehicle.created_at | string | — |
| reused | boolean | — |
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/create \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customer_id":"9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"}'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;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"]{
"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.
| 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. |
| 403 | insufficient_scope | The credential is read-only and this capability writes. |
| 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. |