# com.pimstash.carcare.vehicle

> A Vehicle in Car Care: one car, truck or bike whose maintenance is tracked. Its Service Items reference it by record key.

- Kind: record
- Record key: any
- Authority: carcare.pimstash.com
- Lexicon: 1
- Published by [lexicons.pimstash.com](https://lexicon.garden/identity/did:plc:kl7rkydjioe5qsucfce3uubx), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:kl7rkydjioe5qsucfce3uubx/com.pimstash.carcare.vehicle)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:kl7rkydjioe5qsucfce3uubx/com.pimstash.carcare.vehicle/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:kl7rkydjioe5qsucfce3uubx/com.pimstash.carcare.vehicle/analytics)

## Record (`com.pimstash.carcare.vehicle`)

Type: record · key any

### Properties

- `cover` (blob)
  - Constraints: maxSize: 1000000, accept: image/jpeg, image/webp, image/avif
- `createdAt` (string · datetime, required)
- `engine` (string)
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `links` (array)
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#link`
- `make` (string)
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `model` (string)
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `name` (string, required)
  - Constraints: minLength: 1, maxLength: 1000, maxGraphemes: 100
- `notes` (string)
  - Constraints: maxLength: 10000, maxGraphemes: 1000
- `odometerAt` (string · datetime): The calendar date of the reading, as a datetime at UTC midnight read in UTC.
- `odometerMeters` (integer, required): Latest odometer reading, in whole meters.
  - Constraints: minimum: 0
- `recallMarks` (array): The Recall Marks set on this Vehicle, at most one per NHTSA campaign. A recall with none is open.
  - Constraints: maxLength: 500
  - `items` (ref)
    - Reference: `#recallMark`
- `updatedAt` (string · datetime)
- `variant` (ref): The Open Labor Project variant this Vehicle is, stored by Find Specs or at create. Cleared when Year, Make or Model changes.
  - Reference: `#variant`
- `vin` (string): Vehicle identification number. The Car Care App keeps it on the device and never writes it here; a reader should expect it absent.
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `year` (integer)
  - Constraints: minimum: 1, maximum: 9999

## #link (`com.pimstash.carcare.vehicle#link`)

Type: object

A labelled link: a manual, a parts page, a forum thread.

### Properties

- `label` (string)
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `url` (string · uri, required)
  - Constraints: maxLength: 3000

## #recallMark (`com.pimstash.carcare.vehicle#recallMark`)

Type: object

One recall marked by its owner: fixed on this Vehicle, or not applicable to it.

### Properties

- `campaign` (string, required): The NHTSA campaign number, e.g. 10V174000.
  - Constraints: maxLength: 32
- `mark` (string, required)
  - Constraints: enum: fixed | notApplicable

## #variant (`com.pimstash.carcare.vehicle#variant`)

Type: object

A provider variant of the Vehicle's year, make and model, with the descriptive fields Specs and Ask a Mechanic read.

### Properties

- `drivetrain` (string)
  - Constraints: maxLength: 64
- `engine` (string)
  - Constraints: maxLength: 1000, maxGraphemes: 100
- `engineSlug` (string)
  - Constraints: maxLength: 256
- `source` (string, required)
  - Constraints: maxLength: 64, knownValues: olp
- `vehicleId` (string, required): The provider's vehicle id.
  - Constraints: maxLength: 256
- `yearRange` (string)
  - Constraints: maxLength: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "link": {
      "description": "A labelled link: a manual, a parts page, a forum thread.",
      "properties": {
        "label": {
          "maxGraphemes": 100,
          "maxLength": 1000,
          "type": "string"
        },
        "url": {
          "format": "uri",
          "maxLength": 3000,
          "type": "string"
        }
      },
      "required": [
        "url"
      ],
      "type": "object"
    },
    "main": {
      "description": "A Vehicle in Car Care: one car, truck or bike whose maintenance is tracked. Its Service Items reference it by record key.",
      "key": "any",
      "record": {
        "properties": {
          "cover": {
            "accept": [
              "image/jpeg",
              "image/webp",
              "image/avif"
            ],
            "maxSize": 1000000,
            "type": "blob"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "engine": {
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "links": {
            "items": {
              "ref": "#link",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "make": {
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "model": {
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "name": {
            "maxGraphemes": 100,
            "maxLength": 1000,
            "minLength": 1,
            "type": "string"
          },
          "notes": {
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "odometerAt": {
            "description": "The calendar date of the reading, as a datetime at UTC midnight read in UTC.",
            "format": "datetime",
            "type": "string"
          },
          "odometerMeters": {
            "description": "Latest odometer reading, in whole meters.",
            "minimum": 0,
            "type": "integer"
          },
          "recallMarks": {
            "description": "The Recall Marks set on this Vehicle, at most one per NHTSA campaign. A recall with none is open.",
            "items": {
              "ref": "#recallMark",
              "type": "ref"
            },
            "maxLength": 500,
            "type": "array"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          },
          "variant": {
            "description": "The Open Labor Project variant this Vehicle is, stored by Find Specs or at create. Cleared when Year, Make or Model changes.",
            "ref": "#variant",
            "type": "ref"
          },
          "vin": {
            "description": "Vehicle identification number. The Car Care App keeps it on the device and never writes it here; a reader should expect it absent.",
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "year": {
            "maximum": 9999,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "name",
          "odometerMeters",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "recallMark": {
      "description": "One recall marked by its owner: fixed on this Vehicle, or not applicable to it.",
      "properties": {
        "campaign": {
          "description": "The NHTSA campaign number, e.g. 10V174000.",
          "maxLength": 32,
          "type": "string"
        },
        "mark": {
          "enum": [
            "fixed",
            "notApplicable"
          ],
          "type": "string"
        }
      },
      "required": [
        "campaign",
        "mark"
      ],
      "type": "object"
    },
    "variant": {
      "description": "A provider variant of the Vehicle's year, make and model, with the descriptive fields Specs and Ask a Mechanic read.",
      "properties": {
        "drivetrain": {
          "maxLength": 64,
          "type": "string"
        },
        "engine": {
          "maxGraphemes": 100,
          "maxLength": 1000,
          "type": "string"
        },
        "engineSlug": {
          "maxLength": 256,
          "type": "string"
        },
        "source": {
          "knownValues": [
            "olp"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "vehicleId": {
          "description": "The provider's vehicle id.",
          "maxLength": 256,
          "type": "string"
        },
        "yearRange": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "source",
        "vehicleId"
      ],
      "type": "object"
    }
  },
  "id": "com.pimstash.carcare.vehicle",
  "lexicon": 1
}
```
