---
title: "Defect"
url: "https://developers.vzconnect.com/apis/fleet-inspections-api/versions/e4689b0c-c26d-40d6-b023-5303083c4a3f/schemas/Defect"
---

> Full API specification: https://developers.vzconnect.com/apis/fleet-inspections-api/versions/e4689b0c-c26d-40d6-b023-5303083c4a3f.md

# Defect

Defect details of a vehicle or other asset

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Fleet Inspections API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
components:
  schemas:
    DefectSeverity:
      type: string
      description: Severity of the defect.
      enum:
        - MINOR
        - CRITICAL
    Identifier:
      maxLength: 120
      minLength: 1
      pattern: ^[A-Za-z0-9-]{1,120}$
      type: string
      description: Unique identifier for a given resource.
    DefectStatus:
      type: string
      description: Type of the defect.
      enum:
        - PENDING
        - FIXED
        - CERTIFIED
    Inspectable:
      type: object
      properties:
        inspectableType:
          $ref: "#/components/schemas/InspectableType"
        inspectableRegistrationNumber:
          maxLength: 120
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Registration number of the asset
          readOnly: true
        inspectableName:
          maxLength: 120
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Name of the asset
          readOnly: true
        inspectableId:
          $ref: "#/components/schemas/InspectableId"
        inspectableIdentificationNumber:
          maxLength: 120
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Identification number of the asset
          readOnly: true
      additionalProperties: false
      description: Asset under inspection
    ETag:
      maxLength: 120
      minLength: 1
      pattern: ^[A-Za-z0-9-]+$
      type: string
      description: ETag as described in [RFC
        9110](https://www.rfc-editor.org/rfc/rfc9110#name-etag)
      readOnly: true
    Link:
      title: Link
      required:
        - href
        - rel
      type: object
      properties:
        rel:
          maxLength: 10
          minLength: 4
          pattern: ^(appendix|next|prev|self)$
          type: string
          description: |
            Meaning of the values [described at IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml)
              - *appendix* - refers to documents serving as an appendix to the current resource
              - *next* - context is a part of a series, and that the next in the series is the link target
              - *prev* - context is a part of a series, and that the previous in the series is the link target
              - *self* - URI of a resource or current page of the collection
        method:
          type: string
          description: HTTP method to interact with linked resource
          enum:
            - GET
            - PUT
        title:
          maxLength: 120
          minLength: 1
          pattern: ^[^\n]+$
          type: string
          description: Relation type with the target resource as human-readable text
        href:
          maxLength: 2000
          minLength: 1
          pattern: ^[^\n]+$
          type: string
          description: URL of linked resource
          format: uri-reference
      additionalProperties: false
      description: Reference to another resource
    InspectableType:
      type: string
      description: >
        Type of an inspectable asset.
          - VEHICLE when Vehicle is inspected
          - POWERED_ASSET when assets that have a power source is inspected
          - NON_POWERED_ASSET when assets that do not have a power source is inspected
      enum:
        - VEHICLE
        - POWERED_ASSET
        - NON_POWERED_ASSET
    InspectableId:
      maxLength: 120
      minLength: 1
      pattern: ^[A-Za-z0-9-]{1,120}$
      type: string
      description: Unique ID for an inspectable, i.e. asset/vehicle (asset ID/vehicle ID).
    Defect:
      title: Defect
      required:
        - inspectable
        - status
      type: object
      properties:
        severity:
          $ref: "#/components/schemas/DefectSeverity"
        attachments:
          maxItems: 100
          minItems: 1
          uniqueItems: true
          type: array
          description: Attachments in the defect
          items:
            type: object
            properties:
              linkedAt:
                maxLength: 24
                minLength: 24
                type: string
                description: Link creation time as UTC in RFC 3339-ISO8601 internet profile
                format: date-time
                readOnly: true
              attachmentId:
                $ref: "#/components/schemas/Identifier"
            additionalProperties: false
            description: Attachment related to the defect
        status:
          $ref: "#/components/schemas/DefectStatus"
        inspectable:
          $ref: "#/components/schemas/Inspectable"
        reportResults:
          maxItems: 200
          minItems: 0
          uniqueItems: true
          type: array
          description: Report items related to the defect
          readOnly: true
          items:
            type: object
            properties:
              reportResultId:
                $ref: "#/components/schemas/Identifier"
              templateItemId:
                $ref: "#/components/schemas/Identifier"
              reportId:
                $ref: "#/components/schemas/Identifier"
              templateId:
                $ref: "#/components/schemas/Identifier"
            additionalProperties: false
            description: Report items related to the defect
        defectId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier of a defect.
          readOnly: true
        etag:
          $ref: "#/components/schemas/ETag"
        comment:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Notes about the defect
        links:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Related resources
          readOnly: true
          items:
            $ref: "#/components/schemas/Link"
        statusHistory:
          maxItems: 100
          minItems: 1
          uniqueItems: true
          type: array
          description: Historical statuses of the defect
          readOnly: true
          items:
            type: object
            properties:
              status:
                $ref: "#/components/schemas/DefectStatus"
              signatureAttachmentId:
                $ref: "#/components/schemas/Identifier"
            additionalProperties: false
            description: Defect status change information
      additionalProperties: false
      description: Defect details of a vehicle or other asset
```
