openapi: 3.0.1
info:
  title: Vendors API
  description: Provides access to the vendors that are part of a Hyperproof organization.
  version: '1.0'
servers:
  - url: https://api.hyperproof.app/v1/vendors
    description: Hyperproof US
  - url: https://api.hyperproofgov.app/v1/vendors
    description: Hyperproof Gov
  - url: https://api.hyperproof.eu/v1/vendors
    description: Hyperproof EU
security:
  - oauth2: []
paths:
  /:
    get:
      summary: Get Vendors
      description: >
        `GET /[?status]`


        #### Description


        Retrieves detailed information about all vendors within an organization,
        including their profiles, statuses, and associated metadata.
      operationId: get-vendors
      parameters:
        - name: status
          in: query
          description: Filters vendors by the provided object status
          schema:
            type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorCollection'
              example:
                - id: f96d2b0c-9894-49ca-b26a-afd53268e760
                  orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
                  name: Hyperproof
                  category: Compliance
                  ownerId: e99e616e-6211-22ff-b755-633587729bf9
                  vendorStatus: approved
                  tolerance: high
                  assessedRiskLevel: moderate
                  assessedRiskLevelValue: ''
                  riskLevel: moderate
                  riskLevelIsOverridden: false
                  riskLevelOverrideReasoning: ''
                  riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
                  riskLevelOverriddenOn: '2024-09-04T12:00:00.0000000+00:00'
                  contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                  contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                  freshnessPolicy: manual
                  freshForDuration: PT720H
                  freshness: fresh
                  freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                  freshAsOfNote: Initial freshness set
                  customFields:
                    - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                      fieldName: Sponsor
                      fieldType: text
                      textValue: John Smith
                  contacts:
                    - givenName: Jane
                      surname: Doe
                      email: jane.doe@example.com
                  createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                  createdOn: '2023-09-12T18:26:10.0053650+00:00'
                  updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                  updatedOn: '2023-09-12T18:26:10.0053650+00:00'
                  status: active
    post:
      summary: Add Vendor
      description: >
        `POST /`


        #### Description


        Creates a new vendor within an organization, adding its details and
        initializing it for use in vendor management processes.
      operationId: add-vendor
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorPost'
            example:
              name: Test Vendor from API
              category: API
              ownerId: e99e616e-6211-22ff-b755-633587729bf9
              vendorStatus: approved
              tolerance: high
              riskLevel: moderate
              riskLevelIsOverridden: false
              riskLevelOverriddenBy: ''
              contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
              contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
              contacts:
                - givenName: Jane
                  surname: Doe
                  email: jane.doe@example.com
              customFields:
                - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                  textValue: Antonio Moreno
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vendor'
              example:
                id: f96d2b0c-9894-49ca-b26a-afd53268e760
                orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
                name: Hyperproof
                category: Compliance
                ownerId: e99e616e-6211-22ff-b755-633587729bf9
                vendorStatus: approved
                tolerance: high
                assessedRiskLevel: moderate
                assessedRiskLevelValue: ''
                riskLevel: moderate
                riskLevelIsOverridden: false
                riskLevelOverrideReasoning: ''
                riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
                riskLevelOverriddenOn: '2024-09-04T12:00:00.0000000+00:00'
                contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                freshnessPolicy: manual
                freshForDuration: PT720H
                freshness: fresh
                freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                freshAsOfNote: Initial freshness set
                customFields:
                  - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                    fieldName: Sponsor
                    fieldType: text
                    textValue: John Smith
                contacts:
                  - givenName: Jane
                    surname: Doe
                    email: jane.doe@example.com
                createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                createdOn: '2023-09-12T18:26:10.0053650+00:00'
                updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                updatedOn: '2023-09-12T18:26:10.0053650+00:00'
                status: active
    patch:
      summary: Update Vendors
      description: >
        `PATCH /`


        #### Description


        Updates all existing vendors within an organization, modifying their
        attributes such as names, descriptions, statuses, or risk information.
      operationId: patch-vendors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorBulkPatch'
            example:
              vendorIds:
                - string
              patch:
                name: Test Vendor from API Update
                category: API Category 2
                ownerId: e99e616e-6211-22ff-b755-633587729bf9
                vendorStatus: approved
                tolerance: high
                riskLevel: moderate
                riskLevelIsOverridden: false
                riskLevelOverriddenBy: ''
                contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                freshnessPolicy: manual
                freshForDuration: PT720H
                freshness: fresh
                freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                freshAsOfNote: Updating expired vendor freshness
                status: active
                customFields:
                  - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                    textValue: Antonio Moreno
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vendor'
              example:
                id: f96d2b0c-9894-49ca-b26a-afd53268e760
                orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
                name: Hyperproof
                category: Compliance
                ownerId: e99e616e-6211-22ff-b755-633587729bf9
                vendorStatus: approved
                tolerance: high
                assessedRiskLevel: moderate
                assessedRiskLevelValue: ''
                riskLevel: moderate
                riskLevelIsOverridden: false
                riskLevelOverrideReasoning: ''
                riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
                riskLevelOverriddenOn: '2024-09-04T12:00:00.0000000+00:00'
                contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                freshnessPolicy: manual
                freshForDuration: PT720H
                freshness: fresh
                freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                freshAsOfNote: Initial freshness set
                customFields:
                  - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                    fieldName: Sponsor
                    fieldType: text
                    textValue: John Smith
                contacts:
                  - givenName: Jane
                    surname: Doe
                    email: jane.doe@example.com
                createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                createdOn: '2023-09-12T18:26:10.0053650+00:00'
                updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                updatedOn: '2023-09-12T18:26:10.0053650+00:00'
                status: active
  /filter:
    put:
      summary: Get Vendors Filtered
      description: >
        `PUT /filter`


        #### Description


        Retrieves a list of vendors that match the specified filter criteria,
        such as status, category, or risk level.
      operationId: get-vendors-filtered
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorFilter'
            example:
              vendorIds:
                - string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorCollection'
              example:
                - id: f96d2b0c-9894-49ca-b26a-afd53268e760
                  orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
                  name: Hyperproof
                  category: Compliance
                  ownerId: e99e616e-6211-22ff-b755-633587729bf9
                  vendorStatus: approved
                  tolerance: high
                  assessedRiskLevel: moderate
                  assessedRiskLevelValue: ''
                  riskLevel: moderate
                  riskLevelIsOverridden: false
                  riskLevelOverrideReasoning: ''
                  riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
                  riskLevelOverriddenOn: '2024-09-04T12:00:00.0000000+00:00'
                  contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                  contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                  freshnessPolicy: manual
                  freshForDuration: PT720H
                  freshness: fresh
                  freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                  freshAsOfNote: Initial freshness set
                  customFields:
                    - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                      fieldName: Sponsor
                      fieldType: text
                      textValue: John Smith
                  contacts:
                    - givenName: Jane
                      surname: Doe
                      email: jane.doe@example.com
                  createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                  createdOn: '2023-09-12T18:26:10.0053650+00:00'
                  updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                  updatedOn: '2023-09-12T18:26:10.0053650+00:00'
                  status: active
  /{vendorId}:
    get:
      summary: Get Vendor
      description: >
        `GET /{vendorId}`


        #### Description


        Retrieves detailed information about a specific vendor by its ID,
        including its profile, status, and associated metadata.
      operationId: get-vendor
      parameters:
        - name: vendorId
          in: path
          description: Unique ID of the vendor.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vendor'
              example:
                id: f96d2b0c-9894-49ca-b26a-afd53268e760
                orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
                name: Hyperproof
                category: Compliance
                ownerId: e99e616e-6211-22ff-b755-633587729bf9
                vendorStatus: approved
                tolerance: high
                assessedRiskLevel: moderate
                assessedRiskLevelValue: ''
                riskLevel: moderate
                riskLevelIsOverridden: false
                riskLevelOverrideReasoning: ''
                riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
                riskLevelOverriddenOn: '2024-09-04T12:00:00.0000000+00:00'
                contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                freshnessPolicy: manual
                freshForDuration: PT720H
                freshness: fresh
                freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                freshAsOfNote: Initial freshness set
                customFields:
                  - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                    fieldName: Sponsor
                    fieldType: text
                    textValue: John Smith
                contacts:
                  - givenName: Jane
                    surname: Doe
                    email: jane.doe@example.com
                createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                createdOn: '2023-09-12T18:26:10.0053650+00:00'
                updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                updatedOn: '2023-09-12T18:26:10.0053650+00:00'
                status: active
    patch:
      summary: Update Vendor
      description: >
        `PATCH /{vendorId}`


        #### Description


        Updates an existing vendor with new values, modifying its attributes
        such as name, description, status, or risk information.
      operationId: patch-vendor
      parameters:
        - name: vendorId
          in: path
          description: Unique ID of the vendor to update.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorPatch'
            example:
              name: Test Vendor from API Update
              category: API Category 2
              ownerId: e99e616e-6211-22ff-b755-633587729bf9
              vendorStatus: approved
              tolerance: high
              riskLevel: moderate
              riskLevelIsOverridden: false
              riskLevelOverriddenBy: ''
              contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
              contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
              freshnessPolicy: manual
              freshForDuration: PT720H
              freshness: fresh
              freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
              freshAsOfNote: Updating expired vendor freshness
              status: active
              customFields:
                - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                  textValue: Antonio Moreno
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vendor'
              example:
                id: f96d2b0c-9894-49ca-b26a-afd53268e760
                orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
                name: Hyperproof
                category: Compliance
                ownerId: e99e616e-6211-22ff-b755-633587729bf9
                vendorStatus: approved
                tolerance: high
                assessedRiskLevel: moderate
                assessedRiskLevelValue: ''
                riskLevel: moderate
                riskLevelIsOverridden: false
                riskLevelOverrideReasoning: ''
                riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
                riskLevelOverriddenOn: '2024-09-04T12:00:00.0000000+00:00'
                contractStartDate: '2024-09-04T12:00:00.0000000+00:00'
                contractEndDate: '2025-09-04T12:00:00.0000000+00:00'
                freshnessPolicy: manual
                freshForDuration: PT720H
                freshness: fresh
                freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
                freshAsOfNote: Initial freshness set
                customFields:
                  - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
                    fieldName: Sponsor
                    fieldType: text
                    textValue: John Smith
                contacts:
                  - givenName: Jane
                    surname: Doe
                    email: jane.doe@example.com
                createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                createdOn: '2023-09-12T18:26:10.0053650+00:00'
                updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
                updatedOn: '2023-09-12T18:26:10.0053650+00:00'
                status: active
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://accounts.hyperproof.app/oauth/token
          scopes:
            vendor.read: Grants read access to vendors
            vendor.update: Grants update access to vendors
  schemas:
    Vendor:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the vendor.
        orgId:
          type: string
          description: The unique identifier for the organization.
        name:
          type: string
          description: The name of the vendor.
        category:
          type: string
          description: The category of the vendor.
        ownerId:
          type: string
          description: The unique identifier for the owner of the vendor.
        vendorStatus:
          $ref: '#/components/schemas/VendorStatus'
        tolerance:
          $ref: '#/components/schemas/VendorTolerance'
        assessedRiskLevel:
          description: >-
            The inherent risk of the vendor calculated from the most recent
            vendor questionnaire.
          $ref: '#/components/schemas/VendorRiskLevel'
        assessedRiskLevelValue:
          type: number
          format: double
          description: The numeric value associated with the assessed risk level.
        riskLevel:
          description: >-
            The residual risk of the vendor after applying the mitigation from
            linked controls to the assessedRiskLevel.
          $ref: '#/components/schemas/VendorRiskLevel'
        riskLevelIsOverridden:
          type: boolean
          description: >-
            Flag indicating whether the calculated risk level has been
            overridden.
        riskLevelOverrideReasoning:
          type: string
          description: The reasoning provided for overriding the calculated risk level.
        riskLevelOverriddenBy:
          type: string
          description: The unique identifier for the user who overrode the risk level.
        riskLevelOverriddenOn:
          type: string
          description: The date when the risk level was overridden (ISO 8601 format).
        health:
          $ref: '#/components/schemas/Health'
        contractStartDate:
          type: string
          description: The start date of the vendor contract (ISO 8601 format).
        contractEndDate:
          type: string
          description: The end date of the vendor contract (ISO 8601 format).
        freshnessPolicy:
          $ref: '#/components/schemas/FreshnessPolicy'
        freshForDuration:
          type: string
          description: The duration after which vendor becomes stale.
        freshness:
          $ref: '#/components/schemas/Freshness'
        freshAsOfDate:
          type: string
          description: The date when the vendor was last marked 'fresh'.
        freshAsOfNote:
          type: string
          description: The note populated when the vendor was marked 'fresh'.
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldObjectValue'
        contacts:
          $ref: '#/components/schemas/ExternalContactCollection'
        createdBy:
          type: string
          description: The unique identifier of the user who created the vendor.
        createdOn:
          type: string
          format: date-time
          description: The date the vendor was created (ISO-8601 format).
        updatedBy:
          type: string
          description: The unique identifier of the user who last updated the vendor.
        updatedOn:
          type: string
          format: date-time
          description: The date the vendor was last updated (ISO-8601 format).
        status:
          $ref: '#/components/schemas/ObjectStatus'
      example:
        id: f96d2b0c-9894-49ca-b26a-afd53268e760
        orgId: f5cd56b9-6725-4d1a-88ad-e7486240fbd3
        name: Hyperproof
        category: Compliance
        ownerId: e99e616e-6211-22ff-b755-633587729bf9
        vendorStatus: approved
        tolerance: high
        assessedRiskLevel: moderate
        assessedRiskLevelValue: 40
        riskLevel: moderate
        riskLevelIsOverridden: false
        riskLevelOverrideReasoning: ''
        riskLevelOverriddenBy: e99e616e-6211-22ff-b755-633587729bf9
        riskLevelOverriddenOn: '2024-09-04T12:00:00Z'
        health: atRisk
        contractStartDate: '2024-09-04T12:00:00Z'
        contractEndDate: '2025-09-04T12:00:00Z'
        freshnessPolicy: manual
        freshForDuration: PT720H
        freshness: fresh
        freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
        freshAsOfNote: Initial freshness set
        customFields:
          - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
            fieldName: Sponsor
            fieldType: text
            textValue: John Smith
        contacts:
          - givenName: Jane
            surname: Doe
            email: jane.doe@example.com
        createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
        createdOn: '2023-09-12T18:26:10.005365Z'
        updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
        updatedOn: '2023-09-12T18:26:10.005365Z'
        status: active
    VendorFilter:
      type: object
      properties:
        vendorIds:
          type: array
          description: List of unique identifiers for vendors to return.
          items:
            type: string
      required:
        - vendorIds
      example:
        vendorIds:
          - 23b806db-bad2-4f7a-b8d1-ac1177909992
          - 23b402db-bad2-4f7a-b8d1-ac1177909992
    VendorPost:
      type: object
      properties:
        name:
          type: string
          description: The name of the vendor.
        category:
          type: string
          description: The category of the vendor.
        ownerId:
          type: string
          description: >-
            The unique identifier for the user who will be the owner of the
            vendor.
        groupId:
          type: string
          description: The unique identifier of the group to assign to the vendor.
        vendorStatus:
          $ref: '#/components/schemas/VendorStatus'
        tolerance:
          $ref: '#/components/schemas/VendorTolerance'
        contractStartDate:
          type: string
          format: date-time
          description: The start date of the vendor's contract.
        contractEndDate:
          type: string
          format: date-time
          description: The end date of the vendor's contract.
        contacts:
          type: array
          description: List of external contacts to associate with the vendor.
          items:
            $ref: '#/components/schemas/ExternalContactRequest'
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldObjectValuePatch'
      required:
        - name
        - ownerId
        - vendorStatus
      example:
        name: Test Vendor from API
        category: API
        ownerId: e99e616e-6211-22ff-b755-633587729bf9
        vendorStatus: approved
        tolerance: high
        contractStartDate: '2024-09-04T12:00:00Z'
        contractEndDate: '2025-09-04T12:00:00Z'
        contacts:
          - givenName: Jane
            surname: Doe
            email: jane.doe@example.com
        customFields:
          - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
            textValue: Antonio Moreno
    VendorPatch:
      type: object
      properties:
        name:
          type: string
          description: The name of the vendor.
        category:
          type: string
          description: >-
            The category of the vendor. If set, clearCategory must not be set.
            If set to an empty string, the category will be cleared.
        clearCategory:
          type: boolean
          description: Clears the category if 'true'. If set, category must not be set.
        ownerId:
          type: string
          description: >-
            The unique identifier for the user who will be the owner of the
            vendor.
        groupId:
          type: string
          description: >-
            The unique identifier of the group to assign to the vendor. If set,
            clearGroupId must not be set.
        clearGroupId:
          type: boolean
          description: >-
            Clears the group unique identifier if `true`. If set, groupId must
            not be set.
        vendorStatus:
          $ref: '#/components/schemas/VendorStatus'
        tolerance:
          $ref: '#/components/schemas/VendorTolerance'
        riskLevel:
          $ref: '#/components/schemas/VendorRiskLevel'
        riskLevelIsOverridden:
          type: boolean
          description: >-
            Flag indicating whether the calculated risk level has been
            overridden.
        riskLevelOverrideReasoning:
          type: string
          description: The reasoning provided for overriding the calculated risk level.
        contractStartDate:
          type: string
          format: date-time
          description: >-
            The start date of the vendor's contract. If set,
            clearContractStartDate must not be set.
        contractEndDate:
          type: string
          format: date-time
          description: >-
            The end date of the vendor's contract. If set, clearContractEndDate
            must not be set.
        clearContractStartDate:
          type: boolean
          description: >-
            Clears the contract start date if 'true'. If set, contractStartDate
            must not be set.
        clearContractEndDate:
          type: boolean
          description: >-
            Clears the contract end date if 'true'. If set, contractEndDate must
            not be set.
        freshnessPolicy:
          $ref: '#/components/schemas/FreshnessPolicy'
        freshForDuration:
          type: string
          description: >-
            Sets the duration after which the vendor becomes stale. Supply as a
            string in standard ISO-8601 duration format ex: P1Y3M2D or PT720H.
        freshness:
          $ref: '#/components/schemas/Freshness'
        freshAsOfDate:
          type: string
          description: The date when the vendor is being marked 'fresh'.
        freshAsOfNote:
          type: string
          description: The note to populate when the vendor is marked 'fresh'.
        resetFreshnessNote:
          type: string
          description: The note to populate when freshness is reset.
        status:
          $ref: '#/components/schemas/ObjectStatus'
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldObjectValuePatch'
      example:
        name: Test Vendor from API Update
        category: API Category 2
        ownerId: e99e616e-6211-22ff-b755-633587729bf9
        vendorStatus: approved
        tolerance: high
        riskLevel: moderate
        riskLevelIsOverridden: true
        riskLevelOverrideReasoning: Business decision to accept higher risk
        contractStartDate: '2024-09-04T12:00:00Z'
        contractEndDate: '2025-09-04T12:00:00Z'
        freshnessPolicy: manual
        freshForDuration: PT720H
        freshness: fresh
        freshAsOfDate: 2025-01-12T18:26:10.00.5365Z
        freshAsOfNote: Updating expired vendor freshness
        status: active
        customFields:
          - fieldId: ceb912ab-519b-11ee-a644-522476618ae8
            textValue: Antonio Moreno
    VendorCollection:
      type: array
      items:
        $ref: '#/components/schemas/Vendor'
    VendorBulkPatch:
      type: object
      properties:
        vendorIds:
          type: array
          description: List of unique identifiers of the vendors to update.
          items:
            type: string
        patch:
          $ref: '#/components/schemas/VendorPatch'
      required:
        - vendorIds
        - patch
      example:
        vendorIds:
          - 23b806db-bad2-4f7a-b8d1-ac1177909992
          - 23b402db-bad2-4f7a-b8d1-ac1177909992
        patch:
          category: Updated Category
          vendorStatus: rejected
    VendorRiskLevel:
      type: string
      description: The risk level of the vendor.
      enum:
        - notSet
        - veryHigh
        - high
        - moderate
        - low
        - veryLow
    VendorTolerance:
      type: string
      description: The tolerance of the vendor.
      enum:
        - notSet
        - veryHigh
        - high
        - moderate
        - low
        - veryLow
    VendorStatus:
      type: string
      description: The current state of the vendor.
      enum:
        - notSet
        - preassessment
        - approved
        - active
        - inactive
        - expired
        - rejected
    ExternalContactRequest:
      type: object
      properties:
        givenName:
          type: string
          description: The given name for the external contact.
        surname:
          type: string
          description: The surname for the external contact.
        email:
          type: string
          description: The email address for the external contact.
      required:
        - givenName
        - surname
        - email
      example:
        givenName: Jane
        surname: Doe
        email: jane.doe@example.com
    ExternalContact:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the external contact.
        orgId:
          type: string
          description: The unique identifier for the organization.
        givenName:
          type: string
          description: The given name of the external contact.
        surname:
          type: string
          description: The surname of the external contact.
        email:
          type: string
          description: The email address of the external contact.
        objectType:
          type: string
          description: >-
            The type of the Hyperproof object the external contact is associated
            with.
        objectId:
          type: string
          description: >-
            The id of the Hyperproof object the external contact is associated
            with.
        status:
          type: string
          enum:
            - active
            - archived
            - deleted
          description: The status of the external contact.
        createdOn:
          type: string
          format: date-time
          description: The date the external contact was created (ISO-8601 format).
        createdBy:
          type: string
          description: The unique identifier of the user who created the external contact.
        updatedOn:
          type: string
          format: date-time
          description: The date the external contact was updated (ISO-8601 format).
        updatedBy:
          type: string
          description: >-
            The unique identifier of the user who last updated the external
            contact.
        permissions:
          type: array
          description: List of permissions the API user has on the external contact.
          items:
            type: string
      example:
        id: d88d505d-5199-11ee-a644-522476618ae8
        orgId: ce83e3cd-5199-11ee-a644-522476618ae8
        givenName: John
        surname: Smith
        email: john.smith@example.com
        status: active
        objectType: vendor
        objectId: e99e616e-6211-22ff-b755-633587729bf9
        createdBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
        createdOn: '2023-09-12T18:26:10.005365Z'
        updatedBy: 82d7c228-8bcd-11e9-a94b-ab3de8494987
        updatedOn: '2023-09-12T18:26:10.005365Z'
        permissions: []
    ExternalContactCollection:
      type: array
      items:
        $ref: '#/components/schemas/ExternalContact'
    CustomFieldObjectValue:
      type: array
      items:
        type: object
        properties:
          fieldId:
            type: string
            description: Unique identifier for the custom field
          fieldName:
            type: string
            description: Name of the custom field
          fieldType:
            type: string
            description: Type of field
            enum:
              - text
              - number
              - date
              - user
              - textSingleSelect
              - textMultiSelect
          numberFormat:
            type: string
            description: Format if the field type is `number`
            enum:
              - decimal
              - percentage
          textValue:
            type: string
            description: Value if the field type is `text`
          numberValue:
            type: number
            description: Value if the field type is `number`
          dateValue:
            type: string
            description: Value if the field type is `date`
          userValue:
            type: string
            description: Value if the field type is `user`
          selection:
            type: string
            description: Value for `textSingleSelect`
          selections:
            type: array
            description: List of values for `textMultiSelect`
            items:
              type: string
    CustomFieldObjectValuePatch:
      type: object
      properties:
        fieldId:
          type: string
          description: Unique identifier for the custom field
        textValue:
          type: string
          description: Value if the field type is `text`
        numberValue:
          type: number
          description: Value if the field type is `number`
        dateValue:
          type: string
          description: Value if the field type is `date`
        userValue:
          type: string
          description: Value if the field type is `user`
        selections:
          type: array
          description: List of values for `textMultiSelect`
          items:
            type: string
    ObjectStatus:
      type: string
      description: The status of the object
      enum:
        - active
        - archived
    FreshnessPolicy:
      type: string
      description: >-
        The freshness policy of an object. Set to 'manual' with a
        'freshAsOfDate' value otherwise 'freshness' will be set to 'unknown'.
      enum:
        - none
        - manual
    Freshness:
      type: string
      description: >-
        The freshness status of an object. Cannot be set if 'freshnessPolicy' is
        'none' and 'freshAsOfDate' is null.
      enum:
        - noFreshness
        - fresh
        - expired
        - unknown
    Health:
      type: string
      description: Health status
      enum:
        - critical
        - atRisk
        - healthy
        - notAvailable
