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

# Contracts API

> Manage contract numbering series and reusable contract templates for bookings and supplier agreements.

## Endpoints

| Method | Path                                  | Description                                                 |
| ------ | ------------------------------------- | ----------------------------------------------------------- |
| GET    | `/v1/contract-series`                 | List numbering series configured for the workspace.         |
| POST   | `/v1/contract-series`                 | Create a new numbering series.                              |
| GET    | `/v1/contract-series/:id`             | Retrieve a numbering series.                                |
| PUT    | `/v1/contract-series/:id`             | Update a numbering series.                                  |
| DELETE | `/v1/contract-series/:id`             | Delete a numbering series.                                  |
| POST   | `/v1/contract-series/:id/set-default` | Mark a series as the default for booking engine issuance.   |
| GET    | `/v1/contract-templates`              | List contract templates with optional locale filtering.     |
| POST   | `/v1/contract-templates`              | Create a contract template (optionally with a translation). |
| GET    | `/v1/contract-templates/:id`          | Retrieve a contract template (optionally localized).        |
| PUT    | `/v1/contract-templates/:id`          | Update template content or metadata.                        |
| DELETE | `/v1/contract-templates/:id`          | Delete a contract template.                                 |

<Info>
  All endpoints require workspace-scoped API keys. Read operations use `contract-series:read` or `contract-templates:read`. Mutations require the corresponding `:write` scope.
</Info>

## Key concepts

* **Contract series** control numbering, prefixes, and reset periods used when issuing contracts from bookings or workflows.
* **Contract templates** store the base legal text, variables, and optional localized HTML bodies rendered when generating PDFs or e-sign payloads.
* Localization is handled through optional `translation` payloads and the `locale` query parameter when fetching templates.
* Setting a default series pins the numbering scheme used by the booking engine across automatic contract issuance flows.
* Template JSON payloads retain structured sections/variables; keep them as JSON objects rather than strings.
* Webhooks fire on create/update/delete events (`contract-series.*`, `contract-template.*`) so downstream systems can sync changes.
