Skip to main content
Documentation

Warranties

warranties.list

Search the warranty registry by customer, expiry or coverage
Read-onlyRead budget

REST

Shipping
POST /api/v1/warranties/list

MCP tool

Live
warranties.list

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

Operating contract

The shop's register of cover it has sold, soonest expiry first — because the ones about to lapse are the ones anybody needs to act on.

status IS DERIVED AGAINST THE SHOP'S CALENDAR DAY, not read off a column. A warranty whose expiry passed last night is expired here whether or not the nightly sweep has caught up, which is the answer a customer standing at the counter needs.

The filter shortcuts are the questions people actually ask: active is still covered, expiring lapses within the next 60 days, expired has run out, closed was voided or claimed out.

days_to_expiry is negative once a warranty has lapsed and NULL for a lifetime warranty, which has no expiry at all. Null is not zero — do not report a lifetime warranty as expiring today.

q matches a warranty number ('W-42', '42'), a customer name, or a full 17-character VIN, and works out which you meant from the shape of what you typed.

Every id here is what warranties.certificate takes. customer_id is customers.get's, and job_id is jobs.get's.

TRUNCATION: total is the exact number of warranties matching the filter and omitted is how many are not in this response. When omitted is not 0, call again with page incremented — never tell a shop what is expiring from a truncated list, because the ones it has not seen are the ones it would have acted on.

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
readCounted against the read budget — the widest of the four.

Partial answers

omitted is how many matching records are not in the response, and 0 is a real answer meaning you have all of them. Continue with page.

Do not summarise from a truncated response

When `omitted` is not 0 there are more warranties matching this filter. Call again with `page` set to one more than the `page` on this response.

Input

FieldTypeDescription
filterstring

all, active, expiring (within 60 days), expired, or closed.

Default: "all"One of: all, active, expiring, expired, closed
qstringmax 120 chars

A warranty number, a customer name, or a full VIN.

customer_idstringuuid

One customer's id, as returned by customers.list or customers.get.

job_idstringuuid

One job's id, as returned by jobs.list — the cover issued off that work.

pageinteger1–1000

1-based page number. Defaults to 1.

Default: 1
limitinteger1–100

How many warranties per page, 1-100. Defaults to 50.

Default: 50

Output

FieldTypeDescription
itemsobject[]

items[].idstring

items[].numberstring

items[].typestring

items[].statusstring

items[].coveragestring | null

items[].term_monthsnumber | null

items[].starts_onstring | null

items[].expires_onstring | null

items[].days_to_expirynumber | null

items[].customer_idstring

items[].customer_namestring

items[].vehicle_idstring | null

items[].job_idstring | null

items[].invoice_idstring | null

items[].materialstring | null

totalnumber

pagenumber

page_countnumber

omittednumber

expiring_soon_daysnumber

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/warranties/list \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filter":"all","page":1,"limit":50}'

TypeScript (fetch)
const res = await fetch("https://www.servicevin.com/api/v1/warranties/list", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "filter": "all",
    "page": 1,
    "limit": 50
  }),
});

// 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/warranties/list",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "filter": "all",
    "page": 1,
    "limit": 50
},
    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": "warranties.list",
    "arguments": {
      "filter": "all",
      "page": 1,
      "limit": 50
    }
  }
}

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.
422validation_errorAn argument was wrong. The message names the field.
429rate_limitedToo many read calls. Back off and retry.
500internal_errorSomething failed on our side. Nothing was changed.