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

# Evidence review & templates

> Analyze evidence documents against a template, read the answers, and manage templates.

These endpoints power [evidence review](https://docs.vendexlabs.com/guides/evidence-review.md) and [templates](https://docs.vendexlabs.com/guides/templates.md). All routes take an `account-id` query parameter. Reads require **viewer**; writes require **editor** (`member`) or above. Analysis requires the **Enterprise** plan.

## Analyze a document

**POST /vendor-assessments/documents/\{document\_id}/analyze?account-id=\{uuid}\&template-id=\{uuid}**

Starts an evidence review of an uploaded assessment document. `template-id` is optional; the organization's active template is used when it's left out. The analysis runs in the background, so poll the extraction endpoint for the result.

**GET /vendor-assessments/documents/\{document\_id}/extraction?account-id=\{uuid}**

Returns the latest analysis for the document: its status, the extracted report facts (auditor, period, scope, exceptions), the report checks, the template it ran against, and one answer per template item.

Each answer includes:

```json theme={null}
{
  "id": "6c1f…",
  "item_key": "encryption_at_rest",
  "verdict": "yes",
  "confidence": "high",
  "rationale": "The report describes AES-256 encryption for stored customer data.",
  "citation": "CC6.1",
  "citation_page": 42,
  "evidence_quote": "Customer data is encrypted at rest using AES-256…",
  "quote_verified": true,
  "resolution_state": "pending"
}
```

`verdict` is one of `yes`, `review`, `gap`, or `exception`. `quote_verified` is `true` only when the quote was found in the PDF on the cited page.

## Resolve an answer

**PATCH /vendor-assessments/evidence-answers/\{answer\_id}?account-id=\{uuid}**

Records your decision on an answer. Body: `{ "resolution_state": "accepted" }`. Valid values: `pending`, `accepted`, `reviewed`, `flagged`.

## Templates

Base path: `/evidence-templates`. Built-in templates are read-only; duplicate one to customize it. Item keys are generated by the server from the label and never change.

| Method | Path | Purpose |
| - | - | - |
| `GET` | `/evidence-templates` | List built-in and custom templates. |
| `POST` | `/evidence-templates` | Create a template, or duplicate one. |
| `POST` | `/evidence-templates/full` | Create a template with its domains and items in one call. |
| `GET` | `/evidence-templates/{template_id}` | Get a template with its domains and items. |
| `PATCH` | `/evidence-templates/{template_id}` | Rename or update a template. |
| `DELETE` | `/evidence-templates/{template_id}` | Delete a custom template. |
| `POST` | `/evidence-templates/{template_id}/domains` | Add a domain. |
| `PATCH` · `DELETE` | `/evidence-templates/{template_id}/domains/{domain_id}` | Update or remove a domain. |
| `POST` | `/evidence-templates/{template_id}/domains/{domain_id}/items` | Add an item to a domain. |
| `PATCH` · `DELETE` | `/evidence-templates/{template_id}/items/{item_id}` | Update or remove an item. |


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