> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vensight.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a contract

> Fetch one record from contracts by its `id`.



## OpenAPI

````yaml /openapi.json get /contracts/{id}
openapi: 3.1.0
info:
  title: Vensight API
  version: 1.0.0
  summary: Read every vendor and vendor-relationship record in your workspace.
  description: >-
    The Vensight API is read-only. Every collection is cursor-paginated and can
    be

    filtered to what has changed since a timestamp, so a warehouse can stay
    current with

    incremental pulls; webhooks push the same changes as they happen.
servers:
  - url: https://app.vensight.ai/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: vendors
    x-group: Vendors
    description: Every vendor in the portfolio, with its tier, status and pipeline stage.
  - name: relationships
    x-group: Relationships
    description: The vendor-side view of each lender relationship.
  - name: contracts
    x-group: Contracts
    description: Agreements on file, their dates, value and version chain.
  - name: invoices
    x-group: Invoices
    description: Invoices raised by vendors, through approval to payment confirmation.
  - name: incidents
    x-group: Incidents
    description: Incidents logged against a vendor, with severity and resolution.
  - name: documents
    x-group: Documents
    description: >-
      Every document asked of a vendor (a document request), and where that
      request has got to.
  - name: document-submissions
    x-group: Document submissions
    description: Each upload attempt against a document request, including superseded ones.
  - name: document-requirements
    x-group: Document requirements
    description: >-
      The document library: which documents the lender asks for, of whom, and
      how often.
  - name: questions
    x-group: Questions
    description: 'The question library: what is asked, of whom, and where.'
  - name: question-answers
    x-group: Question answers
    description: What each vendor answered, its review state and which cycle it belongs to.
  - name: review-cycles
    x-group: Review cycles
    description: Onboarding, renewal and scorecard periods, open and closed.
  - name: requests
    x-group: Requests
    description: Vendor Catalog and access requests raised inside the workspace.
  - name: watchlist-alerts
    x-group: Watchlist alerts
    description: Screening hits recorded against a vendor.
  - name: subprocessors
    x-group: Subprocessors
    description: Fourth parties a vendor has declared.
  - name: events
    x-group: Events
    description: >-
      The vendor timeline as a person reads it: the history log on each vendor's
      page.
  - name: settings-changes
    x-group: Settings changes
    description: Every configuration change, with its before-and-after diff.
  - name: screening-answers
    x-group: Screening answers
    description: >-
      Tier-screening answers, each carrying the wording it was asked under at
      the time.
  - name: changes
    x-group: Changes
    description: >-
      The change feed: one entry for every create or update, in order. Read it
      to catch up after a missed webhook.
  - name: webhooks
    x-group: Webhooks
    description: What Vensight sends to your endpoint.
paths:
  /contracts/{id}:
    get:
      tags:
        - contracts
      summary: Retrieve a contract
      description: Fetch one record from contracts by its `id`.
      operationId: getContracts
      parameters:
        - name: id
          in: path
          required: true
          description: The record's `id`.
          schema:
            type: string
            format: uuid
            example: 9c2a7d10-4e8b-4f3a-b6d2-1a7e5c9f0b84
      responses:
        '200':
          description: The record.
          content:
            application/json:
              schema:
                type: object
                required:
                  - object
                  - data
                properties:
                  object:
                    type: string
                    const: contracts
                    example: contracts
                  data:
                    $ref: '#/components/schemas/Contracts'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '502':
          $ref: '#/components/responses/ReadFailed'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    Contracts:
      type: object
      description: Agreements on file, their dates, value and version chain.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Unique id of this record. Stable for the life of the record; use it
            as your primary key.
          example: 9c2a7d10-4e8b-4f3a-b6d2-1a7e5c9f0b84
        vendor_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The vendor the agreement is with. `null` for a master template not
            yet tied to a vendor.
          example: 6f1c2a4e-8b1d-4c3a-9e57-2d4b8a1f0c93
        title:
          type: string
          description: Name of the agreement.
          example: Master Services Agreement
        doc_kind:
          type: string
          description: >-
            Kind of agreement: `msa` for a master services agreement, `sow` for
            a statement of work under one. Other kinds may appear.
          example: msa
        status:
          type: string
          enum:
            - draft
            - active
            - signed
            - terminated
            - analyzing
            - pending_review
          description: >-
            Where the agreement stands.


            - `draft`: No longer used. Every contract that held it was converted
            to `active`, and new contracts are never given it.

            - `active`: In force. A contract stays `active` after its end or
            renewal date passes; the product shows it as Expired, but that is
            worked out from `ends_on` / `renews_on`, not stored here.

            - `signed`: No longer used. Every contract that held it was
            converted to `active`, and new contracts are never given it.

            - `terminated`: Ended early.

            - `analyzing`: Being read by Vensight AI after upload — every
            contract uploaded with a file goes through it. Its dates are not yet
            relied on.

            - `pending_review`: Read by Vensight AI and waiting for a person at
            the lender to check and approve it, which makes it `active`. Its
            dates are not yet relied on.
          example: active
        version_label:
          type:
            - string
            - 'null'
          description: Which version this is, as labelled.
          example: v2
        value_cents:
          type:
            - integer
            - 'null'
          description: >-
            Total value of the agreement in **cents** (US dollars). `125000000`
            is $1,250,000.
          example: 125000000
        starts_on:
          type:
            - string
            - 'null'
          format: date
          description: When the agreement starts.
          example: '2024-03-01'
        ends_on:
          type:
            - string
            - 'null'
          format: date
          description: When the agreement ends.
          example: '2027-02-28'
        effective_on:
          type:
            - string
            - 'null'
          format: date
          description: When the agreement takes effect, if different from `starts_on`.
          example: '2024-03-01'
        renews_on:
          type:
            - string
            - 'null'
          format: date
          description: When it next renews.
          example: '2027-03-01'
        auto_renews:
          type:
            - boolean
            - 'null'
          description: Whether it renews automatically unless notice is given.
          example: true
        non_renewal_notice_by:
          type:
            - string
            - 'null'
          format: date
          description: Last day to give notice of non-renewal.
          example: '2026-12-01'
        out_clause_days:
          type:
            - integer
            - 'null'
          description: Days of notice needed to end the agreement early.
          example: 90
        deadline_on:
          type:
            - string
            - 'null'
          format: date
          description: The next contract deadline the lender is tracking.
          example: '2026-12-01'
        signed_on:
          type:
            - string
            - 'null'
          format: date
          description: When it was signed.
          example: '2024-02-26'
        uploaded_on:
          type:
            - string
            - 'null'
          format: date
          description: When the agreement was added to Vensight.
          example: '2024-02-27'
        term_label:
          type:
            - string
            - 'null'
          description: The term, as written.
          example: 3 years
        payment_terms:
          type:
            - string
            - 'null'
          description: Payment terms, as written.
          example: Net 30
        governing_law:
          type:
            - string
            - 'null'
          description: Which law governs the agreement.
          example: State of California
        signing_authority:
          type:
            - string
            - 'null'
          description: Who signed for the lender.
          example: Chief Operating Officer
        governed_by_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            For a statement of work, the master agreement it falls under.
            Matches another contract's `id`.
          example: b9d4e7f1-6a2c-4583-8e17-0f3c5a8d2b69
        governed_by_version_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Which version of that master agreement this statement of work is
            tied to.
          example: 9c2a7d10-4e8b-4f3a-b6d2-1a7e5c9f0b84
        superseded_by_id:
          type:
            - string
            - 'null'
          format: uuid
          description: If replaced, the contract that replaced it.
          example: null
        terminated_on:
          type:
            - string
            - 'null'
          format: date
          description: When it was ended early.
          example: null
        file_name:
          type:
            - string
            - 'null'
          description: Name of the uploaded file.
          example: oakmere-msa-v2.pdf
        file_size_kb:
          type:
            - integer
            - 'null'
          description: Size of the uploaded file in kilobytes.
          example: 412
        created_at:
          type: string
          format: date-time
          description: When the record was created.
          example: '2026-09-09T02:14:07.221Z'
        updated_at:
          type: string
          format: date-time
          description: >-
            When the record last changed. This is the field `updated_since`
            filters on, and the order records are returned in.
          example: '2026-09-09T02:14:07.221Z'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_query
                - invalid_id
                - missing_credential
                - invalid_credential
                - not_found
                - unknown_resource
                - read_failed
                - not_yet_provisioned
                - unavailable
              description: >-
                Stable. Branch on this, never on `message`. Every code is
                explained on the Errors page.
              example: invalid_query
            message:
              type: string
              description: Written for a person reading a log. May be reworded.
              example: >-
                vendor is not a filter on invoices. Accepted: limit, cursor,
                updated_since, vendor_id, status, business_unit.
  responses:
    BadRequest:
      description: >-
        The query could not be understood. An unknown filter is refused rather
        than ignored, so a mistyped parameter fails loudly instead of quietly
        returning everything.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_query
              message: >-
                vendor is not a filter on invoices. Accepted: limit, cursor,
                updated_since, vendor_id, status, business_unit.
    Unauthorized:
      description: >-
        No key was sent, the `Authorization` header was not `Bearer <key>`, or
        the key is unknown or revoked.
      headers:
        WWW-Authenticate:
          schema:
            type: string
            example: Bearer realm="Vensight API"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_credential
              message: That API key is not valid.
    NotFound:
      description: No record with that id.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: No vendors record with that id.
    ReadFailed:
      description: Vensight could not read its own data. Retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: read_failed
              message: That could not be read just now.
    Unavailable:
      description: >-
        Vensight is briefly unavailable, usually mid-deploy. Retry after the
        number of seconds in `Retry-After`.
      headers:
        Retry-After:
          schema:
            type: integer
            example: 30
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_yet_provisioned
              message: >-
                The API is still being switched on for this workspace. Try again
                shortly.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your key as `Authorization: Bearer vsk_live_…`. `X-Api-Key:
        vsk_live_…` is accepted as well, for loaders that cannot set an
        Authorization header. A key in the query string is never accepted —
        query strings end up in logs.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.