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

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

# Report

Inspection 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:
    Identifier:
      maxLength: 120
      minLength: 1
      pattern: ^[A-Za-z0-9-]{1,120}$
      type: string
      description: Unique identifier for a given resource.
    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
    InspectionStatus:
      type: string
      description: >
        Overall status of all related CRITICAL defects. Calculated only when
        *relatedDefects* are included into the response.
          - PASSED when no CRITICAL defects were reported
          - FAILED when at least one reported CRITICAL defect is PENDING
          - RESOLVED when all CRITICAL defects are FIXED or CERTIFIED and at least one has status FIXED
          - CERTIFIED when all reported CRITICAL defects are CERTIFIED
      enum:
        - PASSED
        - FAILED
        - RESOLVED
        - CERTIFIED
    AnalyticsTraceEvent:
      title: Analytics trace event
      required:
        - name
        - timestamp
      type: object
      properties:
        name:
          maxLength: 20
          minLength: 18
          pattern: ^(inspection\.started|inspection\.submitted)$
          type: string
          description: Type of event related to the originating occurrence
        traceId:
          maxLength: 32
          minLength: 32
          pattern: ^[a-f0-9]{32}$
          type: string
          description: Unique identifier for a distributed trace the event is part of
          readOnly: true
        analyticsEventId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier of an analytics event.
          readOnly: true
        timestamp:
          maxLength: 24
          minLength: 24
          type: string
          description: Time when the event occurred in RFC 3339-ISO8601 internet profile
          format: date-time
      additionalProperties: false
      description: >
        Named occurrence at an instant in time. It provides additional specifics
        about the occurrence.

        Examples of Events might include things like uncaught exceptions, button
        clicks, user logout, network connection severed, etc.
    ReportType:
      type: string
      description: Type of the inspection report.
      enum:
        - PRE_TRIP
        - POST_TRIP
    ReportItemResult:
      title: Report Item Result
      required:
        - resultType
        - templateItemId
      type: object
      properties:
        templateItemId:
          $ref: "#/components/schemas/Identifier"
        attachments:
          maxItems: 1
          minItems: 0
          uniqueItems: true
          type: array
          description: Attachments for the report item result
          items:
            type: object
            properties:
              attachmentId:
                $ref: "#/components/schemas/Identifier"
            description: Attachment related to the report item result
        resultType:
          type: string
          description: Result of the Report Item.
          enum:
            - OK
            - DEFECT
        resultId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier of a report which the Item belongs to.
          readOnly: true
        resultValue:
          maxLength: 256
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Result outcome, depends on the Report Item type. Not applicable to
            CHECK items.
        defects:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Defects raised for a Report Item
          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
              defectId:
                $ref: "#/components/schemas/Identifier"
            additionalProperties: false
            description: Defect related to the report item
      additionalProperties: false
      description: Template Item result within a given report.
    Attachment:
      title: Attachment
      required:
        - attachmentType
        - author
      type: object
      properties:
        data:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Various media for an attachment
          readOnly: true
          items:
            type: object
            properties:
              rel:
                maxLength: 120
                minLength: 1
                pattern: ^(enclosure)$
                type: string
                description: |
                  Meaning of the values [described at IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml)
                    - *enclosure* - media, typically photo or document related to the resource, potentially large and might require special handling
              href:
                maxLength: 2000
                minLength: 1
                pattern: ^[^\n]+$
                type: string
                description: URL of relevant data
                format: uri
              method:
                type: string
                description: HTTP method to interact with data
                enum:
                  - GET
                  - PUT
              length:
                maximum: 6291456
                minimum: 1
                type: integer
                description: Size of a data referenced in *href* in bytes
                format: int32
              tags:
                maxItems: 100
                minItems: 0
                uniqueItems: true
                type: array
                description: Labels and attributes of a data enclosure
                readOnly: true
                items:
                  maxLength: 120
                  minLength: 1
                  pattern: ^[a-z0-9]+$
                  type: string
                  description: Individual label or attribute of a data enclosure
                  readOnly: true
            additionalProperties: false
        name:
          maxLength: 120
          minLength: 1
          pattern: ^[^\n]+$
          type: string
          description: Name of an attachment.
          nullable: true
        comment:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Attachment details
          nullable: true
        enclosure:
          required:
            - contentLength
            - contentType
          type: object
          properties:
            contentLength:
              maximum: 6291456
              minimum: 1
              type: integer
              description: Size of media in bytes
              format: int32
            contentType:
              maxLength: 120
              minLength: 3
              pattern: ^(image\/jpeg|image\/png)$
              type: string
              description: Media type specifying format of the contents. See [RFC
                9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type)
                for details
          additionalProperties: false
          description: Related media, typically photo or document, potentially large and
            thus requiring separate upload facility
          writeOnly: true
        attachmentId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier of an attachment.
          readOnly: true
        author:
          required:
            - authorType
          type: object
          properties:
            name:
              maxLength: 120
              minLength: 1
              pattern: ^[^\n]+$
              type: string
              description: Name of the author created an attachment.
              readOnly: true
            authorId:
              maxLength: 120
              minLength: 1
              pattern: ^[A-Za-z0-9-]{1,120}$
              type: string
              description: Unique identifier of the author created an attachment.
              readOnly: true
            authorType:
              type: string
              description: Person that created an attachment
              enum:
                - OPERATOR
                - COMPLIANCE_MANAGER
          additionalProperties: false
          description: Person that created an attachment
        attachmentType:
          $ref: "#/components/schemas/AttachmentType"
        links:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Related resources
          readOnly: true
          items:
            $ref: "#/components/schemas/Link"
      additionalProperties: true
      description: |
        Inspection attachment: photo, signature, document, comment.

        *name* would be used as file name if enclosure is uploaded.
    Operator:
      type: object
      properties:
        operatorType:
          $ref: "#/components/schemas/OperatorType"
        operatorName:
          maxLength: 120
          minLength: 1
          pattern: ^[^\n]+$
          type: string
          description: Name of an operator.
          readOnly: true
        operatorId:
          $ref: "#/components/schemas/Identifier"
      additionalProperties: false
      description: Person performing an inspection
    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
    InspectionType:
      type: string
      description: An inspectionType can be of an enum
      enum:
        - DVIR
    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).
    AttachmentType:
      type: string
      description: Type of attachment, example Signature, Comment, Photo
      enum:
        - SIGNATURE
        - COMMENT
        - PHOTO
    OperatorType:
      type: string
      description: Role of a person who prepared the report
      enum:
        - DRIVER
    Report:
      title: Report
      required:
        - inspectable
        - inspectionType
        - operator
        - reportType
        - results
        - submittedAt
        - templateId
      type: object
      properties:
        submittedAt:
          maxLength: 24
          minLength: 24
          type: string
          description: Report submitted time as UTC in RFC 3339-ISO8601 internet profile
          format: date-time
        templateId:
          $ref: "#/components/schemas/Identifier"
        inspectable:
          $ref: "#/components/schemas/Inspectable"
        relatedDefectsStatus:
          allOf:
            - $ref: "#/components/schemas/InspectionStatus"
            - maxLength: 120
              minLength: 1
              pattern: ^[^\n]+$
              type: string
              readOnly: true
        analyticsEvents:
          maxItems: 100
          minItems: 0
          type: array
          description: Analytics events related to the report
          items:
            $ref: "#/components/schemas/AnalyticsTraceEvent"
        reportType:
          $ref: "#/components/schemas/ReportType"
        reportId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier for a report.
          readOnly: true
        results:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Outcomes of inspection items
          items:
            $ref: "#/components/schemas/ReportItemResult"
        defects:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Defects in the report outside of *results*
          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
              defectId:
                $ref: "#/components/schemas/Identifier"
            additionalProperties: false
            description: Defects related to the report outside of *results*
        attachments:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Attachments in the report
          items:
            oneOf:
              - allOf:
                  - $ref: "#/components/schemas/Attachment"
                  - 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
                    additionalProperties: true
                    description: Attachment related to the report
                    readOnly: true
              - 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: true
                description: Attachment related to the report
        comment:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: Notes about the report
          nullable: true
        operator:
          $ref: "#/components/schemas/Operator"
        links:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Related resources
          readOnly: true
          items:
            $ref: "#/components/schemas/Link"
        inspectionType:
          $ref: "#/components/schemas/InspectionType"
      additionalProperties: false
      description: Inspection details of a vehicle or other asset
```
