# Warranty

object type

A Warranty — THE WARRANTY INSTANCE: one sold order line under one WarrantyTerms template. Born by the ENGINE when the sale completes (paid AND delivered) for every variant line whose product carries an active product-attached template or whose variant names a manufacturer carrying an active manufacturer-attached template (one warranty per matching template); never created on the wire. The policy is SNAPSHOTTED at birth (provider · durationDays → expiresAt = startsAt + durationDays), so later template edits never rewrite an issued warranty. `active → expired` is the scheduler’s over expiresAt; `active → claimed` is fileClaimWarranty (a warranty_claim CsCase linked both ways). The serial number is optional and stamped through updateWarranty. Listings keep expired warranties as coverage history (the settled-payment class — a status filter narrows to active); every warranty stays reachable by id from the order line’s warrantyIds.

## Fields

| Field | Type | Notes |
| --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
| `sysId` | [String](/types/#scalars) `String!` | The group-scoped human-facing system id (WR-…). |
| `type` | [String](/types/#scalars) `String!` | The kind of record — always `Warranty` here. |
| `caption` | [String](/types/#scalars) `String!` | The record’s display name — what people see it called. |
| `status` | [String](/types/#scalars) `String!` | The FSM state: active \| claimed \| expired. |
| `parentId` | [ID](/types/#scalars) `ID!` | The sold Order; rootId = the org group; parentId!== rootId always. |
| `rootId` | [ID](/types/#scalars) `ID!` | The org-group family root. |
| `createdAt` | [String](/types/#scalars) `String!` | When the record was created, as a UTC timestamp. |
| `updatedAt` | [String](/types/#scalars) `String!` | When the record last changed, as a UTC timestamp. |
| `revisionNum` | [Int](/types/#scalars) `Int!` | How many times this record has been edited; the first save is 0. |
| `revision` | [ID](/types/#scalars) `ID!` | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
| `refCaptions` | [RefCaption](/types/RefCaption/) `[RefCaption!]!` | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
| `organizationId` | [ID](/types/#scalars) `ID!` | The selling Organization (copied from the Order at birth). |
| `orderLineNo` | [Int](/types/#scalars) `Int!` | The sold line — the Order’s 1-based lineNo (frozen at placed; the cross-document addressing key). |
| `variantId` | [ID](/types/#scalars) `ID!` | The sold Variant (the line’s variantId). |
| `productId` | [ID](/types/#scalars) `ID!` | The Variant’s Product (resolved at birth). |
| `warrantyTermsId` | [ID](/types/#scalars) `ID!` | The WarrantyTerms template the warranty was issued under (a pointer — the policy is snapshotted on the record). |
| `provider` | [WarrantyProvider](/types/WarrantyProvider/) `WarrantyProvider!` | WHO honors the warranty — snapshotted from the terms at birth (the claim’s routing). |
| `durationDays` | [Int](/types/#scalars) `Int!` | The coverage duration in days — snapshotted from the terms at birth. |
| `quantity` | [String](/types/#scalars) `String!` | The covered units — the line’s quantity at birth (the inventory decimal-string quantity shape). |
| `startsAt` | [String](/types/#scalars) `String!` | The coverage start — the sale’s completion instant (UTC ISO-8601). |
| `expiresAt` | [String](/types/#scalars) `String!` | The coverage end = startsAt + durationDays days (UTC ISO-8601); the scheduler sweeps active → expired on it. |
| `consumerId` | [ID](/types/#scalars) | The registered Consumer the order was for (from the Order’s customer capture, when present) — the customer-scoped listing axis. |
| `serialNumber` | [String](/types/#scalars) | The unit’s serial number — optional; stamped through updateWarranty (at most 128 characters). |
| `caseId` | [ID](/types/#scalars) | The warranty_claim CsCase the claim linked (stamped by fileClaimWarranty; present from claimed onward). |

## Used by

- [fileClaimWarranty](/reference/selling/fileClaimWarranty/)
- [updateWarranty](/reference/warranty/updateWarranty/)
- [warranty](/reference/warranty/warranty/)
