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

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

# Attachment

Inspection attachment: photo, signature, document, comment. *name* would be used as file name if enclosure is uploaded.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Fleet Inspections API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
components:
  schemas:
    AttachmentType:
      type: string
      description: Type of attachment, example Signature, Comment, Photo
      enum:
        - SIGNATURE
        - COMMENT
        - PHOTO
    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
    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.
```
