tread.io FileAttachments API

The FileAttachments API from tread.io — 10 operation(s) for fileattachments.

OpenAPI Specification

treadio-fileattachments-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Horizon API V1 AccountExternalTruckIdentifier FileAttachments API
  version: '1.0'
  contact:
    name: Tread
    url: https://tread.io
    email: developers@tread.io
  description: 'This is the Version 1 implementation.


    When in doubt we default to the practices outlined [here](https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api#advanced-queries)'
  license:
    name: Private
    url: https://tread.io
servers:
- description: production
  url: https://api.tread-horizon.com
security:
- bearerAuth: []
tags:
- name: FileAttachments
paths:
  /v1/bulk_downloads:
    parameters:
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Bulk download FileAttachments
      tags:
      - FileAttachments
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/BulkDownload-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-bulk_downloads
      x-stoplight:
        id: qxegczlt0vjwh
      x-internal: true
      description: "This endpoint starts a bulk download of `FileAttachments`. \n\nThe `job_ids` and `filter[jobs]` params are mutually exclusive and at least one of these is required.\n\nOn success the caller should subscribe to the `BulkDownloadResult` `RTU` using the `id` in the response."
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDownload-Create'
  /v1/companies/{company-id}/orders/{order-id}/file_attachments:
    parameters:
    - schema:
        type: string
        format: uuid
      name: company-id
      in: path
      required: true
      description: Company ID
    - schema:
        type: string
        format: uuid
      name: order-id
      in: path
      required: true
      description: Order ID
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a FileAttachment on an Order for a Company
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-companies-company-id-orders-order_id-file_attachments
      x-stoplight:
        id: wio0e2z2gq5wo
      description: 'Create a `FileAttachment` related to an `Order`. Requires permission to create attachment on `Order`—`create_order_attachments`.


        * If you''re using a `DirectUpload` then you must use the `application/json` mime-type and `file` must be the `DirectUpload`''s `signed_id`

        * If you''re using a file then you must use the `multipart/form-data` mime-type and `file` must be a file.'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
      tags:
      - FileAttachments
    get:
      summary: Retrieve all FileAttachments for a given Order
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    x-stoplight:
                      id: tj07k22i6yxkl
                    type: array
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-companies-company-id-orders-order_id-file_attachments
      x-stoplight:
        id: nmvovd2feee9c
      description: Retrieve all `FileAttachments` for a given `Order`
      tags:
      - FileAttachments
      parameters:
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/page-limit'
  /v1/direct_uploads:
    parameters:
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a DirectUpload
      tags:
      - FileAttachments
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/DirectUpload-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-direct_uploads
      x-stoplight:
        id: tgme583womicv
      description: 'Create a `DirectUpload`.


        The `checksum` _must_ be calculated exactly the way `rails` expects it ([javascript example](https://github.com/rails/rails/blob/main/activestorage/app/javascript/activestorage/file_checksum.js)).


        You should upload the file to `direct_upload.url` using any provided headers from `direct_upload.headers`.


        Once this is done you can use `signed_id` in place of a file in any endpoint that accepts file uploads.'
      x-internal: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DirectUpload-Create'
  /v1/driver_days/{driver-day-id}/file_attachments:
    parameters:
    - schema:
        type: string
      name: driver-day-id
      in: path
      required: true
      description: Driver Day ID
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a FileAttachment on a DriverDay
      tags:
      - FileAttachments
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-driver_days-driver-day-id-file_attachments
      x-stoplight:
        id: 8nu308410yk0c
      description: 'Create a `FileAttachment` related to a `DriverDay`. Requires permission to create attachment on `DriverDay`—`create_driver_day_attachments`.


        * If you''re using a `DirectUpload` then you must use the `application/json` mime-type and `file` must be the `DirectUpload`''s `signed_id`

        * If you''re using a file then you must use the `multipart/form-data` mime-type and `file` must be a file.'
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              $ref: '#/components/schemas/FileAttachment-Create'
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
    get:
      summary: Retrieve all FileAttachments for a given DriverDay
      tags:
      - FileAttachments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: gd8jklxjcxcvl
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-driver_days-driver-day-id-file_attachments
      x-stoplight:
        id: 2wcbb9rjtaj7i
      description: Retrieve all `FileAttachments` for a given `DriverDay`
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/page-after'
  /v1/file_attachments/{id}:
    parameters:
    - schema:
        type: string
        format: uuid
      name: id
      in: path
      required: true
      description: 'The ID of the file attachment you''re operating on '
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve a FileAttachment by ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-file_attachments-file_attachment_id
      x-stoplight:
        id: flpyoj876qp2p
      description: Read a specific `FileAttachment`
      tags:
      - FileAttachments
    patch:
      summary: Update a FileAttachment by ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: patch-v1-file_attachments-file_attachment_id
      x-stoplight:
        id: am4r9ekeskla9
      description: "Update `FileAttachment` by ID. Requires permission to edit attachment on a particular object: \n\nFor Projects: `edit_project_attachments`\\\nFor Orders: `edit_order_attachments`\\\nFor Jobs: `edit_job_attachments`\\\nFor Loads: `edit_load_attachments`\\\nFor Driver Days: `edit_driver_day_attachments`\\\nFor Settlements: `edit_settlement_attachments`\\\n\nDrivers and Foremen that have this permission, can only edit `FileAttachments` that they have added."
      tags:
      - FileAttachments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Update'
    delete:
      summary: Delete a FileAttachment by ID
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: delete-v1-file_attachments-file_attachment_id
      x-stoplight:
        id: tgfqi473ukd0j
      description: "Delete `FileAttachment` by ID. Requires permission to delete attachment on a particular object: \n\nFor Projects: `delete_project_attachments`\\\nFor Orders:`delete_order_attachments`\\\nFor Jobs: `delete_job_attachments`\\\nFor Loads: `delete_load_attachments`\\\nFor Driver Days: `delete_driver_day_attachments`\\\nFor Settlements: `delete_settlement_attachments`\\\n\nDrivers and Foremen that have this permission, can only delete `FileAttachments` that they have added."
      tags:
      - FileAttachments
  /v1/jobs/{job-id}/file_attachments:
    parameters:
    - schema:
        type: string
        format: uuid
      name: job-id
      in: path
      required: true
      description: 'The ID of the job you''re operating on '
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a FileAttachment on a Job
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-jobs-job_id-file_attachments
      x-stoplight:
        id: wy2nbmoa1w8ve
      description: 'Create a `FileAttachment` related to an `Job`. Requires permission to create attachment on `Job`—`create_job_attachments`.


        * If you''re using a `DirectUpload` then you must use the `application/json` mime-type and `file` must be the `DirectUpload`''s `signed_id`

        * If you''re using a file then you must use the `multipart/form-data` mime-type and `file` must be a file.'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
      tags:
      - FileAttachments
      x-internal: true
    get:
      summary: Retrieve all FileAttachments for a given Job
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: bws8um7tyq6zq
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-jobs-job_id-file_attachments
      x-stoplight:
        id: pbhvztovzeq3q
      description: Retrieve all `FileAttachments` for a given `Job`
      tags:
      - FileAttachments
      parameters:
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/page-limit'
  /v1/jobs/{job-id}/files:
    parameters:
    - schema:
        type: string
        format: uuid
      name: job-id
      in: path
      description: Job ID
      required: true
    - $ref: '#/components/parameters/Accept-Language'
    get:
      summary: Retrieve all associated FileAttachments for a Job
      tags:
      - FileAttachments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: zcvhcyrqhy1os
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-jobs-job-id-files
      x-stoplight:
        id: z4p1ctnwuedlr
      description: "This endpoint retrieves all associated `FileAttachments` for a `Job`, specifically:\n * all `FileAttachments` on the `Job`\n * all `FileAttachments` on the `Job's` `Loads`\n * all `FileAttachments` on `Tickets` connected to this `Job`\n\n"
      parameters:
      - $ref: '#/components/parameters/page-limit'
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
  /v1/loads/{load-id}/file_attachments:
    parameters:
    - schema:
        type: string
        format: uuid
      name: load-id
      in: path
      required: true
      description: 'The ID of the load you''re operating on '
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a FileAttachment on a Load
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-loads-load-id-file_attachments
      x-stoplight:
        id: ic212tirenvan
      description: 'Create a `FileAttachment` related to an `Load`. Requires permission to create attachment on `Load`—`create_load_attachments`.


        * If you''re using a `DirectUpload` then you must use the `application/json` mime-type and `file` must be the `DirectUpload`''s `signed_id`

        * If you''re using a file then you must use the `multipart/form-data` mime-type and `file` must be a file.'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
      tags:
      - FileAttachments
    get:
      summary: Retrieve all FileAttachments for a given Load
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    x-stoplight:
                      id: 121cwskv2zirr
                    type: array
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-loads-load-id-file_attachments
      x-stoplight:
        id: g4ldnfvd0tf8g
      description: Retrieve all `FileAttachments` for a given `Load`
      tags:
      - FileAttachments
      parameters:
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/page-limit'
  /v1/orders/{order-id}/file_attachments:
    parameters:
    - schema:
        type: string
        format: uuid
      name: order-id
      in: path
      required: true
      description: 'The ID of the order you''re operating on '
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a FileAttachment on an Order
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-orders-order_id-file_attachments
      x-stoplight:
        id: hc7nwzlt5x6ae
      description: 'Create a `FileAttachment` related to an `Order`. Requires permission to create attachment on `Order`—`create_order_attachments`.


        * If you''re using a `DirectUpload` then you must use the `application/json` mime-type and `file` must be the `DirectUpload`''s `signed_id`

        * If you''re using a file then you must use the `multipart/form-data` mime-type and `file` must be a file.'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
      tags:
      - FileAttachments
      deprecated: true
    get:
      summary: Retrieve all FileAttachments for a given Order
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    x-stoplight:
                      id: tj07k22i6yxkl
                    type: array
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-orders-order_id-file_attachments
      x-stoplight:
        id: rqdbk8gf13faa
      description: Retrieve all `FileAttachments` for a given `Order`
      tags:
      - FileAttachments
      parameters:
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/page-limit'
      deprecated: true
  /v1/projects/{project-id}/file_attachments:
    parameters:
    - schema:
        type: string
        format: uuid
      name: project-id
      in: path
      description: 'The ID of the project you''re operating on '
      required: true
    - $ref: '#/components/parameters/Accept-Language'
    post:
      summary: Create a FileAttachment on a Project
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/FileAttachment-Read'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
        '415':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/ModelError'
      operationId: post-v1-projects-project_id-file_attachments
      x-stoplight:
        id: 423h0z6d6mc7b
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
          application/json:
            schema:
              $ref: '#/components/schemas/FileAttachment-Create'
      description: 'Create a `FileAttachment` related to a `Project`. Requires permission to create attachment on `Project`—`create_project_attachments`.


        * If you''re using a `DirectUpload` then you must use the `application/json` mime-type and `file` must be the `DirectUpload`''s `signed_id`

        * If you''re using a file then you must use the `multipart/form-data` mime-type and `file` must be a file.'
      tags:
      - FileAttachments
    get:
      summary: Retrieve all FileAttachments for a given Project
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    x-stoplight:
                      id: hvcshzfiz4hlu
                    items:
                      $ref: '#/components/schemas/FileAttachment-Read'
          headers:
            Link:
              schema:
                type: string
              description: Contains prev and next links for pagination
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/Error'
        '406':
          $ref: '#/components/responses/Error'
      operationId: get-v1-projects-project_id-file_attachments
      x-stoplight:
        id: tfbkyg0njj4tt
      description: Retrieve all `FileAttachments` for a given `Project`
      tags:
      - FileAttachments
      parameters:
      - $ref: '#/components/parameters/page-after'
      - $ref: '#/components/parameters/page-before'
      - $ref: '#/components/parameters/page-limit'
components:
  responses:
    ModelError:
      description: ''
      content:
        application/json:
          schema:
            type: object
            $ref: '#/components/schemas/ModelError-Response'
    Error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            $ref: '#/components/schemas/Error-Response'
    UnauthenticatedError:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            $ref: '#/components/schemas/UnauthenticatedError-Response'
  schemas:
    DirectUpload-Read:
      title: DirectUpload-Read
      x-stoplight:
        id: ge5fs3tk8yb8k
      type: object
      required:
      - id
      - byte_size
      - checksum
      - content_type
      - created_at
      - filename
      - key
      - service_name
      - signed_id
      - direct_upload
      properties:
        id:
          type: string
          x-stoplight:
            id: lzwkhbbuc30lt
          format: uuid
        byte_size:
          type: integer
          x-stoplight:
            id: zdq5i2km7dbdd
        checksum:
          type: string
          x-stoplight:
            id: pfgyb7ctywy3o
        content_type:
          type: string
          x-stoplight:
            id: id6fbesbolbxu
        created_at:
          type: string
          x-stoplight:
            id: qkkile7jxkghk
          format: date-time
        filename:
          type: string
          x-stoplight:
            id: nh2lxjat0biia
        key:
          type: string
          x-stoplight:
            id: saakohyy5kvvz
        metadata:
          type: object
          x-stoplight:
            id: zlk0ufjqtjaxq
        service_name:
          type: string
          x-stoplight:
            id: br0ew9wo8145q
        signed_id:
          type: string
          x-stoplight:
            id: zvuflukjwdj16
        direct_upload:
          type: object
          x-stoplight:
            id: e4cw0bh9x1t4n
          required:
          - url
          properties:
            url:
              type: string
              x-stoplight:
                id: l0qwu7ya2mng0
              format: uri
            headers:
              type: object
              x-stoplight:
                id: jgxk00g0qfrub
      additionalProperties: false
    FileAttachment-Create:
      title: FileAttachment-Create
      x-stoplight:
        id: 6ov5mmeta4q9b
      type: object
      required:
      - file
      properties:
        file:
          x-stoplight:
            id: vhz4kd26m4atp
          anyOf:
          - x-stoplight:
              id: nax3vntqjrgyh
            format: binary
          - x-stoplight:
              id: zeyj90b4r3ds5
          type: string
        category:
          $ref: '#/components/schemas/FileAttachmentCategory'
        description:
          type: string
          x-stoplight:
            id: u5wjqpawbht5v
      additionalProperties: false
    Error-Response:
      title: Error-Response
      x-stoplight:
        id: 52cydhphee3qe
      type: object
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
      additionalProperties: false
    TreadId:
      title: TreadId
      x-stoplight:
        id: 43k4t5tl359m4
      type: object
      required:
      - tread_id
      properties:
        tread_id:
          type: string
          x-stoplight:
            id: zi3ld7djflw6f
          pattern: ^[0-9A-F]{6}$
          minLength: 6
          maxLength: 6
          example: ABC123
          description: Tread ID
      additionalProperties: false
    FileAttachmentCategory:
      title: FileAttachmentCategory
      x-stoplight:
        id: baiohh0t8x4x2
      enum:
      - Inspection Report
      - Site Map
      - Scale Ticket (External)
      - Scale Ticket (Internal)
      - Timesheet
      - Other
      default: Other
    Discardable:
      title: Discardable
      x-stoplight:
        id: 46axlb8u5wjay
      type: object
      required:
      - discarded_at
      properties:
        discarded_at:
          type: string
          x-stoplight:
            id: cy8t6fecoyxbo
          format: date-time
          nullable: true
      additionalProperties: false
    Error:
      title: Error
      x-stoplight:
        id: 3g57kkik3l464
      type: object
      description: An Error.
      required:
      - code
      properties:
        code:
          type: string
          x-stoplight:
            id: 7o9x1t8v0bgfo
      additionalProperties: false
    JobState:
      title: JobState
      x-stoplight:
        id: qyb8p2t

# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/treadio/refs/heads/main/openapi/treadio-fileattachments-api-openapi.yml