> ## 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.

# Data model

> How vendors, relationships, review cycles, documents, questions and the rest fit together.

Almost everything in Vensight hangs off a **vendor**. This page explains how the
collections relate, so you can model them in your own warehouse.

```mermaid theme={null}
erDiagram
  VENDORS ||--o{ RELATIONSHIPS : "seen by the vendor as"
  VENDORS ||--o{ REVIEW_CYCLES : "is reviewed in"
  DOCUMENT_REQUIREMENTS ||--o{ DOCUMENTS : "is asked for as"
  VENDORS ||--o{ DOCUMENTS : "is asked for"
  DOCUMENTS ||--o{ DOCUMENT_SUBMISSIONS : "is answered by"
  QUESTIONS ||--o{ QUESTION_ANSWERS : "is answered as"
  VENDORS ||--o{ QUESTION_ANSWERS : "gives"
  REVIEW_CYCLES ||--o{ DOCUMENTS : "groups"
  REVIEW_CYCLES ||--o{ QUESTION_ANSWERS : "groups"
  VENDORS ||--o{ CONTRACTS : "signs"
  VENDORS ||--o{ INVOICES : "raises"
  VENDORS ||--o{ INCIDENTS : "has"
```

## The vendor

[`vendors`](https://docs.vensight.ai/api-reference/vendors/list) has one record per vendor in your portfolio. It
holds the vendor's details **and** the state of your relationship with it: its tier, its
status, which queue (`pipeline_stage`) it is in, who the analyst is, and its key dates.
Every other collection that belongs to a vendor carries `vendor_id`, which matches the
vendor's `id`.

[`relationships`](https://docs.vensight.ai/api-reference/relationships/list) is the same relationship **as the
vendor sees it**: the vendor's own view of you as a client, with a status written from
their side (`pending_items`, `active`). Today each vendor has one, with your workspace.
Use `vendors` for your own reporting; use `relationships` if you need to know what the
vendor is being shown.

## Reviews

A **review cycle** ([`review-cycles`](https://docs.vensight.ai/api-reference/review-cycles/list)) is a period
in which a vendor is reviewed: its onboarding, each yearly renewal, and each periodic
scorecard. Documents and answers asked for during a cycle carry its `cycle_id`.

## Documents: requirements, requests and submissions

These three are easy to confuse:

| Collection | One record per | Example |
| - | - | - |
| [`document-requirements`](https://docs.vensight.ai/api-reference/document-requirements/list) | document **you ask for**, in your library | “SOC 2 Type II report, every year, from Tier 1 and 2 vendors” |
| [`documents`](https://docs.vensight.ai/api-reference/documents/list) | time a document is **asked of a vendor** (a document request) | “Oakmere’s SOC 2 report for 2026, due 31 October” |
| [`document-submissions`](https://docs.vensight.ai/api-reference/document-submissions/list) | **upload** against a request, including ones replaced later | “Oakmere’s second attempt, accepted” |

So a requirement produces a request for each vendor it applies to, and each request
collects one or more submissions until one is accepted. `documents.requirement_id` points
at the requirement and `document-submissions.request_id` points at the request.

The file itself cannot be downloaded through the API. `storage_path` is an internal key,
not a link.

## Questions and answers

[`questions`](https://docs.vensight.ai/api-reference/questions/list) is your question library. `surface` says
where a question is asked: in the vendor's application, in a scorecard, or in Selection &
Due Diligence (answered by your own team; the vendor never sees those).

[`question-answers`](https://docs.vensight.ai/api-reference/question-answers/list) has one record per vendor per
question asked, with its review state. A question can be a follow-up to another
(`parent_question_id`) and can ask for a document, which then appears in `documents` with
its `question_id`.

[`screening-answers`](https://docs.vensight.ai/api-reference/screening-answers/list) is different: the answers to
your **tier-screening** questions, used to set a vendor's tier. Each one keeps the wording
it was asked under, so a later change to the question does not rewrite the record.

## Contracts, invoices, incidents and requests

* [`contracts`](https://docs.vensight.ai/api-reference/contracts/list): agreements with a vendor. A statement of
  work (`doc_kind` `sow`) points at its master agreement through `governed_by_id`.
* [`invoices`](https://docs.vensight.ai/api-reference/invoices/list): invoices the vendor submits, through approval
  to payment.
* [`incidents`](https://docs.vensight.ai/api-reference/incidents/list): problems logged against a vendor.
* [`requests`](https://docs.vensight.ai/api-reference/requests/list): requests from your own staff for new software
  or for access to a tool. `vendor_id` is set only when the request is about a vendor you
  already have.

## Risk signals

* [`watchlist-alerts`](https://docs.vensight.ai/api-reference/watchlist-alerts/list): screening matches against a
  vendor.
* [`subprocessors`](https://docs.vensight.ai/api-reference/subprocessors/list): the vendor's own suppliers that
  handle your data (fourth parties).

## History

| Collection | What it is | Changes after it is written? |
| - | - | - |
| [`events`](https://docs.vensight.ai/api-reference/events/list) | Each vendor's timeline, as people read it on the vendor's page | No |
| [`settings-changes`](https://docs.vensight.ai/api-reference/settings-changes/list) | Every change to your workspace settings, with before and after | No |
| [`changes`](https://docs.vensight.ai/api-reference/changes/list) | One entry for every create or update in every collection, in order | No |

`events` is written for people and does not cover everything. `changes` is written by the
database for every change, which is why it is the one to use for keeping in sync.

## Names to watch

* A collection's address uses hyphens (`/v1/document-submissions`). Its event names and the
  `resource` field on `changes` use underscores (`document_submissions.created`).
* `documents` means document **requests**, not files.
* A few fields named `…_at` hold a date rather than a timestamp (`invoices.received_at`,
  `invoices.due_at`, `review-cycles.due_at`). Each field's description says which.


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