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

# Analyze a document with a language model

> `POST /documents/{id}/extract`

Runs the text already extracted from the document through a language model and returns what it made of it: a summary with its key points, a category taken from the ones configured for the tenant, a sensitivity label, the kinds of personal data it recognized, and tags it proposes - preferring tags already in use. The summary and its key points are written in the caller's account language, then in the language of the caller's settings, then in English, and the answer names the language used; the kinds of personal data are always named in English.

Asked with `language` or with `summaryOnly`, the call produces the summary section alone - the summary with its key points and the kinds of personal data - and the answer leaves out the category, the sensitivity and the tags. This is how a summary is read in another language or in a view that only reads the document, such as the Sign View; such a summary is never stored on the document. A `language` that is not one of the tenant's active languages, or that the caller's settings disable, is refused before anything is generated.

Only the summary is written back, into the document's own summary field, and only when the caller may edit the document and asked for neither `language` nor `summaryOnly`; storing it advances the document's version, which the answer reports. The category, the sensitivity, the personal-data findings and the tags are proposals that the client decides what to do with. Personal data is reported by kind, never quoted.

Asked with `extractTermDates`, the same call also detects the contract's term, reading it straight from the document's PDF. Every value found comes back as a suggestion with the verbatim passage it was read from, where that passage is printed - page and rectangles - and how certain that placement is; a value the platform worked out rather than read is marked as such, and several candidates for one field may come back for the caller to choose from. Nothing of the term is written to the document: applying a suggestion is an ordinary edit. When nothing can be detected the answer says why - a main file that is not a PDF, a document whose workflow state keeps it from being edited, a scan without a text layer, or a failure the caller may retry. With the term asked for, a failure of the other results does not fail the call: they come back unavailable together with the reason. The answer waits for both, which can take up to about two minutes for a long contract. For a file that is not a PDF yet, converting the file to PDF can detect the term instead.

A document whose text has not been extracted yet - because extraction has not run, or produced nothing - answers with empty analysis results rather than an error, so this can be called without checking the extraction state first. The term detection does not depend on that extraction.

---

**Token authorization:** Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.

**Required user rights:** `llm_extraction`



## OpenAPI

````yaml /api-v1/openapi.json post /documents/{id}/extract
openapi: 3.0.3
info:
  title: Circularo API v1
  description: >-
    Circularo API v1 is the REST API that powers the Circularo platform and its
    first-party clients — the web app, the mobile apps and the Microsoft 365
    add-ins.


    This API spans the full surface of Circularo's functionality — document
    management, signing and sharing, workflow processing, administration, and
    configuration. It is **not** a stable contract and may change between
    releases without prior notice. It stays available for existing integrations
    while they move to Circularo API v2; new integrations belong on API v2.


    ## Authentication


    Most endpoints act on behalf of a signed-in user and require a token. Obtain
    a session token by signing in with `POST /login` — when multi-factor
    authentication is active, the token stays locked until you unlock it with a
    second factor — or use a long-lived API key. Send it as the `token` query
    parameter or in an `Authorization: Bearer` header. A session token expires
    after a period without use. Each endpoint's description lists the rights and
    roles it requires.


    Endpoints usable without signing in identify the environment by the request
    address or by the `tenant` query parameter. Endpoints for share recipients
    authenticate with the share token instead, together with a one-time password
    where the share is protected.
  termsOfService: https://terms.circularo.com/
  contact:
    name: Circularo
    url: https://developers.circularo.com/
    email: support@circularo.com
  version: 26.2.0
servers:
  - url: https://sandbox.circularo.com/api/v1
security:
  - Token: []
tags:
  - name: ACLs
    description: >-
      An ACL (access control list) is a named bundle of rights carried by groups
      — a user holds a right only because one of their groups carries an ACL
      that grants it. Create, search, update and delete ACLs; which rights an
      ACL grants is set on the rights, and which groups carry it is set on the
      groups. Deleting an ACL detaches it from every right and group.
  - name: API Keys
    description: >-
      An API key is a long-lived credential for connecting an external system to
      Circularo. It acts with the rights of the user who owns it and stays valid
      as long as it is in regular use. Create, list and revoke your own API keys
      — the secret is returned only once, at creation, so store it securely. A
      key can also be issued for a SCIM client, in which case only the SCIM
      endpoints accept it.
  - name: Attachments
    description: >-
      An attachment is a supporting file filed alongside a document, separate
      from its main file. Add, download, replace, rename and delete the
      attachments of a document, download all of them at once as a ZIP archive,
      or read an attachment of a draft. An attachment is addressed by the
      document identifier and its file hash.
  - name: Certificates
    description: >-
      Download the signing certificates configured for the instance as a ZIP
      archive of PKCS#12 files, for use by external signing components, and
      check whether they have changed since your last download so you can skip
      an unnecessary one. Both endpoints are meant for those components and
      authenticate with a pre-shared key rather than a user token.
  - name: Configuration
    description: >-
      The signed-in user's own account — profile and preferences, password,
      authentication factors and recovery codes, saved search filters,
      signature, initials and profile images, device push tokens, and
      introductory guides. Every endpoint acts on the caller only; other users'
      accounts are managed through the user endpoints.
  - name: Contacts
    description: >-
      A contact is an address-book entry owned by the user who created it,
      optionally shared with other users and groups, who can then pick it as a
      recipient when sharing documents. Create, search, update and delete
      contacts, change who they are shared with, and import or export them as
      CSV or JSON, previewing an import file before it is applied.
  - name: Counters
    description: >-
      A counter issues sequential identifiers, such as document numbers,
      following a pattern that combines fixed text, date segments and
      incrementing digits or letters — for example `ID-{year}-{###}`. A counter
      can restart whenever one of its date segments changes, such as at the
      start of each year. Create, read and update counters, and take the next
      value from one.
  - name: Definitions
    description: >-
      Definitions describe how documents are structured and processed. A
      metadata definition is a document type — its fields, its form, its
      processing options and the workflow it follows; a workflow definition is a
      set of states and the actions that move a document between them. Create,
      read, update and delete both kinds, list the actions available in a
      workflow state, put individual transitions behind a right, and export a
      metadata definition together with everything it depends on.
  - name: Documents
    description: >-
      A document is the central record of Circularo — a main file together with
      the metadata its metadata definition describes, optional attachments, and
      the workflow that moves it through its states. Create, read, edit and
      delete documents; sign, seal or annotate them; convert or merge their
      files; clone, rename or transfer them to a new owner; control who may read
      and edit them; and download their audit trail. Operations that change a
      document carry the version you last read, so a change made in the meantime
      is not silently overwritten.
  - name: Drafts
    description: >-
      A draft is the unfinished state of a document being prepared — created,
      edited, cloned or signed — kept privately for the user who started it and
      never shared. Create, list, search, update and delete drafts; an update
      replaces the whole draft and carries the version you last read. A draft is
      removed automatically once the document operation it was prepared for
      succeeds.
  - name: Enums
    description: >-
      An enumeration is a tenant-wide reference list — a definition declaring
      its fields, some of which may be unique, and the records that fill it —
      that supplies the values of list-type metadata fields. Create, search,
      update and delete enumerations and their records, share records with users
      and groups, and import or export records as CSV or JSON. Fields can be
      added to an existing enumeration but never removed or retyped.
  - name: Export
    description: >-
      An exporter turns a selection of documents into a downloadable output —
      such as a CSV or XLSX listing, PDF files, the original files, or a ZIP
      archive of a folder tree. List the exporters available to you, select the
      documents with a search query, and tune the output with exporter-specific
      options. Large exports run in the background; count the documents first to
      learn whether the result comes back directly or as a background job.
  - name: Fields
    description: >-
      A global field is a metadata field declared once per tenant and reused by
      many metadata definitions, which makes its values searchable and
      aggregatable across document types. Create, read, search, export and
      delete global fields, see which definitions use a field, and check whether
      a field name is available. A global field is never updated in place —
      delete it and create it again.
  - name: Files
    description: >-
      A file is a stored binary, identified by its hash, that documents,
      attachments, signatures and profiles refer to. Upload, download (including
      byte ranges), inspect, rename, relabel and replace files; convert them to
      PDF or PDF/A, or merge several into one PDF; upload signature, initials
      and profile images; and check your storage capacity. Public files, such as
      branding assets, can be downloaded without authentication.
  - name: Folders
    description: >-
      A folder organizes documents into a tree — either your personal tree,
      which is yours alone, or the shared tree. Create, read, rename and delete
      folders, move items within a tree, hand documents over to the other tree,
      or take them out of a tree entirely. Moving documents into the shared tree
      can grant them the rights of the target folder; deleted folders go to the
      trash, from which they can be restored.
  - name: Groups
    description: >-
      A group bundles users and carries the permissions granted to them — it
      holds ACLs, and its members receive the rights those ACLs grant. An
      organization is represented as a group too. Create, search, update and
      delete groups, add them to and remove them from ACLs, find the groups that
      grant a particular right, and resolve group display names. Membership is
      managed from the user side.
  - name: Inbox
    description: >-
      The inbox is where internal users act on the documents in their workflow.
      Execute a workflow action on a document, comment on its workflow, cancel
      the workflow and archive the document, or reset it to its start state.
      Cancelling or resetting a workflow does not withdraw the shares already
      sent to recipients.
  - name: Languages
    description: >-
      Languages and their translation keys hold the interface texts of the
      tenant. Add, activate, deactivate and delete languages; create, update,
      rename and delete translation keys, one at a time or in bulk; read
      translations per key or per language, including as a flat map for client
      localization; and import or export languages as JSON files. An imported
      language always arrives inactive.
  - name: LDAP
    description: >-
      Synchronize users and groups from Active Directory into Circularo. The
      synchronization only creates and updates — it never deletes anything and
      never writes back to the directory — and a dry run previews its result
      without applying it.
  - name: Links
    description: >-
      A link connects two documents that relate to each other. Link two
      documents, list the links of a document, or remove a link. Links have no
      direction — each pair of documents is linked at most once.
  - name: Login
    description: >-
      Sign in and inspect the sessions of the signed-in user. Sign in with a
      username and password to obtain a session token; when multi-factor
      authentication is active, the token stays locked until you unlock it with
      a second factor or a recovery code, and you can have a new code sent. Read
      the current sign-in status, the rights you hold, and your active sessions.
  - name: Logout
    description: >-
      End sign-in sessions. Sign out of the current session or another of your
      own, or — as an administrator — end every session of a user at once, for
      example when an account may be compromised. Ending a user's sessions
      leaves their API keys working.
  - name: Logs
    description: >-
      The audit log is the record of significant actions across the system — who
      did what, to which entity, and when. Search it with a structured query and
      page through large results with a scroll, which you release when done, or
      read a single entry. What you see depends on your role: the activity that
      concerns you, your organization's activity, or the whole tenant's. Entries
      are written in batches, so the most recent actions may appear with a short
      delay.
  - name: Nafath
    description: >-
      Verify a person's identity through Nafath, the Saudi national digital
      identity platform — to sign in, to link the identity to an account, to
      verify a share recipient, or to authorize a signature. Start a check,
      which the person confirms in the Nafath app, and poll its status until it
      completes; Nafath reports the outcome through a callback.
  - name: Notifications
    description: >-
      A notification informs a user about an event that concerns them. These
      endpoints cover your in-app notifications: list and search them, count the
      unread ones, mark them as read, and delete them. You can also list the
      delivery channels — in-app, e-mail and push — and the notification types,
      which each user switches on or off per channel.
  - name: OAuth
    description: >-
      Connect to external identity and service providers over OAuth 2.0, such as
      Microsoft, Google or Dropbox. Sign in through a provider, which can also
      create the account, or connect a provider account to your own — such as a
      cloud storage — then obtain a fresh access token for it or disconnect it.
      A provider can also verify a share recipient or authorize a signature. A
      client that cannot rely on the session cookie, such as a native app,
      exchanges a one-time code for a login token.
  - name: Ping
    description: >-
      Check that Circularo API v1 is reachable and answering. No authentication
      is required; the check covers the API itself, not storage or background
      services.
  - name: Plans
    description: >-
      A plan is a named entry in the catalogue of service offerings that
      subscriptions refer to; it carries no limits or billing of its own — those
      belong to the subscription. Create, search and update plans, which is an
      administrative task, and read a single plan.
  - name: Revisions
    description: >-
      A revision is a snapshot of a whole document, taken by the operations that
      change it. List the revisions of a document, read one, compare two of
      them, restore a document to an earlier revision, or undo the changes made
      to its main file since the last snapshot, such as annotations or
      signatures. Restoring is refused for a document that is signed or waiting
      for action unless you force it.
  - name: Rights
    description: >-
      A right is a named permission to use a feature or perform an action. Users
      never hold rights directly: a right lists the ACLs that grant it, and
      users receive it through the ACLs of their groups. Create, read, search,
      update and delete rights, including rights scoped to particular metadata
      definitions, workflows and actions.
  - name: SAML
    description: >-
      Sign in through a SAML 2.0 identity provider configured for the tenant, an
      organization or a group. Start the sign-in, which redirects to the
      identity provider; the provider posts the result back to the callback,
      which either sets the session cookie or redirects to your client with a
      one-time code that you exchange for a login token. Download the service
      provider metadata to register Circularo with the identity provider.
  - name: SCIM
    description: >-
      Provision users and groups automatically from an identity provider over
      SCIM 2.0 (RFC 7643 and RFC 7644). Create, read, replace, patch and
      deprovision accounts and groups within your organization, and discover the
      supported schemas, resource types and service provider configuration. SCIM
      clients authenticate with a SCIM API key in an `Authorization: Bearer`
      header, SCIM must be enabled for the tenant, and errors follow the SCIM
      format instead of the common error body.
  - name: Search
    description: >-
      Search and analyze documents. Select documents with a structured query of
      filter, must, should and must-not clauses, and add aggregations, which are
      written in Elasticsearch syntax; page through results with an offset or a
      scroll, count documents for several searches at once, or locate the page a
      document is on. Run the stored dashboards for chart-ready analytics, or
      build reports that pair each document with its transaction across the
      organization.
  - name: Settings
    description: >-
      Settings configure the behaviour and appearance of Circularo at a chosen
      scope — tenant, organization, role, group or user. A value not set at one
      scope is inherited from the scope above it, down to the shipped defaults.
      Read the settings in force for you, the settings of one scope or what it
      inherits, and write them whole or property by property; tailor the e-mails
      sent at a scope and send a trial one; replace the single sign-on signing
      keys; and try out a language model configuration before saving it.
  - name: Share
    description: >-
      A share sends a document to one recipient — an internal user or an
      external person without a Circularo account — to view, edit, sign,
      approve, review or accept it; the shares of a document together form its
      transaction. As the sender, send a document to its recipients in parallel
      or in a set order, then edit, remind, search or call off the shares, or
      get the document's permanent public link. As a recipient, open the share
      with its share token — plus a one-time password where the share is
      protected by an SMS or e-mail code, a password or an identity check — then
      read and download the document, sign it or complete your action, comment
      on it, reject it, or delegate it to somebody else.
  - name: Stamps
    description: >-
      A stamp is a reusable visual mark — a design of shape, frame, colours and
      lines of text, rendered into an image — that is placed on documents during
      signing. A stamp is either personal, belonging to one user, or shared
      across an organization. Create, read, search, edit and delete stamps;
      deleting a stamp does not affect the documents already stamped with it.
  - name: Static
    description: >-
      Download the client-side installers that hardware signature capture
      requires: the Wacom tablet driver and the Wacom SigCaptX signature capture
      tool for Windows.
  - name: Stripe
    description: >-
      Self-service billing through Stripe for organization administrators. List
      the subscription products on sale, start paying for a new subscription,
      change what it holds or stop it from renewing, read its billing summary,
      and open the billing portal. Stripe itself reports payment events through
      the webhook endpoint.
  - name: Subscriptions
    description: >-
      A subscription holds what an organization or a user is entitled to — the
      limits of its plan, the usage consumed against them, its period and its
      commercial details. Create, read, search and edit subscriptions and search
      their recorded history; this is mostly administrative, and organization
      administrators may edit only the commercial details. Any user can ask the
      sales team about a larger plan.
  - name: Support
    description: >-
      Send a support ticket — a technical problem, a question, a feature request
      or a subscription inquiry — to the support address of your environment,
      with optional attachments. Replies come back to you by e-mail.
  - name: Tags
    description: >-
      Tags label documents for categorization and filtering. A private tag is
      visible only to the user who set it; a public tag is visible to everyone
      who can see the document and can be searched for. List the tags in use,
      and add, remove or replace tags on many documents at once. Tagging
      requires only read access to a document.
  - name: Templates
    description: >-
      A template is a reusable starting point for documents — a document
      together with recipient roles, the fields placed for each of them, and
      share settings — from which a transaction can be started again and again.
      Create, search, update and delete templates, share them with other users
      and groups, and export or import them, previewing an import file before it
      is applied.
  - name: Users
    description: >-
      A user is an account in the tenant. Create, search, update and delete
      accounts, in bulk where needed; manage their group membership, signing
      certificates, linked external identities, and signature, initials and
      profile images; and list the rights a user holds. The account flows that
      run before sign-in — self-registration, activation and password reset —
      belong here as well. A deleted account is kept as a historical record.
  - name: Verify
    description: >-
      Verify the signatures, seals and timestamps on a document — looked up by
      its identifier or by a signature identifier, or uploaded as a file, in
      which case the result also tells whether the file is known to Circularo
      and whether it has been modified. Verification works with or without
      signing in and can include the detailed validation reports of the DSS
      (Digital Signature Service).
  - name: Webhooks
    description: >-
      A webhook notifies an external system of document events in real time —
      such as a document being created, edited or deleted, a signature being
      requested, delegated, rejected or cancelled, and a document being signed
      or completed. Register a callback URL for your tenant or organization,
      secured by Basic authentication or a signing secret, and list, update or
      delete webhooks. Each event is delivered once, without retries.
  - name: WOPI
    description: >-
      Web Application Open Platform Interface (WOPI) endpoints through which an
      online office editor — Microsoft Office Online or Collabora Online — opens
      and edits files directly in the browser. Issue a token for the editor and
      list the file types it can open; the editor itself then reads the file
      information and content, manages locks, and writes the edited content back
      to Circularo.
  - name: WS
    description: >-
      Pass messages between a user's devices in real time over a WebSocket
      connection — for example, a phone sending a photo or a hand-drawn
      signature to the browser session where the user is working. The browser
      opens the connection with a session token, or with a share token and
      one-time password, and receives a connection token; the other device sends
      messages into the connection with that token alone.
paths:
  /documents/{id}/extract:
    post:
      tags:
        - Documents
      summary: Analyze a document with a language model
      description: >-
        `POST /documents/{id}/extract`


        Runs the text already extracted from the document through a language
        model and returns what it made of it: a summary with its key points, a
        category taken from the ones configured for the tenant, a sensitivity
        label, the kinds of personal data it recognized, and tags it proposes -
        preferring tags already in use. The summary and its key points are
        written in the caller's account language, then in the language of the
        caller's settings, then in English, and the answer names the language
        used; the kinds of personal data are always named in English.


        Asked with `language` or with `summaryOnly`, the call produces the
        summary section alone - the summary with its key points and the kinds of
        personal data - and the answer leaves out the category, the sensitivity
        and the tags. This is how a summary is read in another language or in a
        view that only reads the document, such as the Sign View; such a summary
        is never stored on the document. A `language` that is not one of the
        tenant's active languages, or that the caller's settings disable, is
        refused before anything is generated.


        Only the summary is written back, into the document's own summary field,
        and only when the caller may edit the document and asked for neither
        `language` nor `summaryOnly`; storing it advances the document's
        version, which the answer reports. The category, the sensitivity, the
        personal-data findings and the tags are proposals that the client
        decides what to do with. Personal data is reported by kind, never
        quoted.


        Asked with `extractTermDates`, the same call also detects the contract's
        term, reading it straight from the document's PDF. Every value found
        comes back as a suggestion with the verbatim passage it was read from,
        where that passage is printed - page and rectangles - and how certain
        that placement is; a value the platform worked out rather than read is
        marked as such, and several candidates for one field may come back for
        the caller to choose from. Nothing of the term is written to the
        document: applying a suggestion is an ordinary edit. When nothing can be
        detected the answer says why - a main file that is not a PDF, a document
        whose workflow state keeps it from being edited, a scan without a text
        layer, or a failure the caller may retry. With the term asked for, a
        failure of the other results does not fail the call: they come back
        unavailable together with the reason. The answer waits for both, which
        can take up to about two minutes for a long contract. For a file that is
        not a PDF yet, converting the file to PDF can detect the term instead.


        A document whose text has not been extracted yet - because extraction
        has not run, or produced nothing - answers with empty analysis results
        rather than an error, so this can be called without checking the
        extraction state first. The term detection does not depend on that
        extraction.


        ---


        **Token authorization:** Authorize using a token — either a session
        token obtained from login or an API key — to call this endpoint.


        **Required user rights:** `llm_extraction`
      operationId: requestDocumentsPostExtract
      parameters:
        - in: path
          name: id
          description: Identifier of the document to analyze.
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
            minLength: 1
            example: a0d01c9d-f72f-4c57-af11-e26bda19cc59
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestDocumentsPostExtract'
      responses:
        '200':
          description: >-
            Returns what the model extracted - empty results when the document
            has no extracted text - and the term suggestions when they were
            asked for.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseDocumentsExtraction'
        '400':
          description: >-
            The document identifier or the body is malformed, or the language
            asked for is not one the caller may choose.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 400
                type: VALIDATION:INPUT_INVALID
                message: Invalid input
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 401
                type: AUTH:UNAUTHORIZED
                message: Authentication failed
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '403':
          description: >-
            The caller lacks a required right or access, or the AI features are
            not configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 403
                type: AUTH:ACCESS_DENIED
                message: Access denied
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '404':
          description: No document of that identifier is available to the caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 404
                type: RESOURCE:NOT_FOUND
                message: Resource not found
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '429':
          description: >-
            Too many term detections were asked for in a short time; wait as
            long as the `Retry-After` header says. Calls without
            `extractTermDates` are not limited this way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 429
                type: SYSTEM:RATE_LIMIT_EXCEEDED
                message: Rate limit exceeded
                requestId: 3fa85f6457174562b3fc2c963f66afa6
        '500':
          description: The language model could not be reached or did not answer usably.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                status: 500
                type: SYSTEM:INTERNAL_ERROR
                message: Internal error
                requestId: 3fa85f6457174562b3fc2c963f66afa6
      security:
        - Token: []
components:
  schemas:
    requestDocumentsPostExtract:
      type: object
      properties:
        extractTermDates:
          type: boolean
          description: >-
            Whether to also detect the contract's term - its expiration date,
            its renewal with the renewal period, notice and limits, and the
            notice of a contract that runs until it is terminated - and return
            every value found as a suggestion together with the passage it was
            read from and where that passage is printed. The term is read
            straight from the document's PDF, so it does not depend on the text
            extraction the other results come from. Nothing of it is written to
            the document. It cannot be asked for together with `language` or
            `summaryOnly`. Asking for it requires the right to use the document
            term (`use_document_terms`) and edit access to this document.
          example: false
          default: false
          nullable: true
        language:
          type: string
          pattern: ^[a-z][a-z-]+$
          minLength: 1
          description: >-
            Language to write the summary and its key points in - one of the
            tenant's active languages that the caller's settings do not disable.
            Asking for a language narrows the answer to the summary section and
            never stores the summary on the document. Without it the summary is
            written in the caller's account language, then in the language of
            the caller's settings, then in English.
          example: en
          nullable: true
        summaryOnly:
          type: boolean
          description: >-
            Whether to narrow the answer to the summary section, for a view that
            only reads the document, such as the Sign View. Such a summary is
            never stored on the document, whatever the language and even for a
            caller who may edit the document.
          example: false
          default: false
          nullable: true
    responseDocumentsExtraction:
      type: object
      properties:
        analysisError:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsAnalysisError'
          description: >-
            Why the summary, category, sensitivity, personal data and tags are
            unavailable, when the term was asked for and their analysis failed;
            `null` otherwise.
          nullable: true
        category:
          type: object
          properties:
            available:
              type: boolean
              description: Whether the model settled on a category.
            value:
              type: string
              description: >-
                Category the document belongs to, chosen from the ones
                configured for the tenant.
              example: Contract
              nullable: true
          description: >-
            Proposed classification of the document by subject. Left out of the
            summary section, which `language` or `summaryOnly` asks for.
        labels:
          type: object
          properties:
            available:
              type: boolean
              description: Whether the model proposed any labels.
            value:
              type: array
              items:
                type: string
              description: >-
                Tags proposed for the document, drawn from the ones already in
                use where they fit. They are proposals only - nothing is tagged
                by this call.
              example:
                - legal agreement
                - intellectual property
                - service contract
              nullable: true
          description: >-
            Tags proposed for the document. Left out of the summary section,
            which `language` or `summaryOnly` asks for.
        language:
          type: string
          description: >-
            Language the summary and its key points are written in - the one
            asked for, otherwise the caller's account language, then the
            language of the caller's settings, then English.
          example: en
        pii:
          type: object
          properties:
            available:
              type: boolean
              description: Whether the model examined the document for personal data.
            value:
              type: array
              items:
                type: string
              description: >-
                Kinds of personal data the document contains, named rather than
                quoted - the values themselves are never returned - and always
                named in English. An empty array means the document was examined
                and none were found.
              example:
                - Bank Account Number
                - Financial Statements or Invoices
              nullable: true
          description: Personal data recognized in the document.
        sensitivity:
          type: object
          properties:
            available:
              type: boolean
              description: Whether the model judged the document's sensitivity.
            value:
              type: string
              description: How sensitive the document's content is, as a single label.
              example: Confidential
              nullable: true
          description: >-
            Proposed sensitivity classification of the document. Left out of the
            summary section, which `language` or `summaryOnly` asks for.
        summary:
          type: object
          properties:
            available:
              type: boolean
              description: >-
                Whether the model produced a summary. Each section of the result
                is reported separately, so one may be filled while another is
                not; a section comes back unavailable when the document's text
                is empty, too short, mostly boilerplate or unreadable for the
                model to answer faithfully.
            keyPoints:
              type: array
              items:
                type: string
              description: The document's main points, one entry each.
              nullable: true
            value:
              type: string
              description: >-
                What the document is about, in a few sentences. It is also
                stored as the document's own summary when the caller may edit
                the document and asked for neither `language` nor `summaryOnly`.
              nullable: true
          description: Summary of the document.
        summaryStored:
          type: boolean
          description: >-
            Whether this call stored the summary as the document's own summary,
            which advances the document's version - an edit prepared before the
            call then needs the document read again.
        termSuggestions:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestions'
          description: >-
            The contract term detected in the document's PDF, when
            `extractTermDates` asked for it; `null` otherwise.
          nullable: true
    error:
      type: object
      description: The error response returned for all unsuccessful (non-2xx) requests.
      properties:
        status:
          type: integer
          description: The HTTP status code of the error.
          example: 404
        type:
          type: string
          description: >-
            Machine-readable error type in `NAMESPACE:CODE` form, intended for
            programmatic handling. The set of types is not exhaustive and may
            grow over time.
          example: RESOURCE:NOT_FOUND
        message:
          type: string
          description: Human-readable description of the error.
          example: Resource not found
        requestId:
          type: string
          description: >-
            Unique identifier of the request; include it when contacting
            support.
          example: 3fa85f6457174562b3fc2c963f66afa6
        details:
          type: object
          additionalProperties: true
          description: >-
            Optional structured details about the error. Present only for errors
            that carry them; the shape depends on the error type.
      required:
        - status
        - type
        - message
        - requestId
    responseDocumentsAnalysisError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable explanation of the failure.
          example: The AI service did not answer in time.
        reason:
          type: string
          description: >-
            Why the language model call of the analysis failed, in more detail
            than `type`; `null` for a failure without a finer classification.


            - `timeout`: The AI service did not answer before the time allowed
            for the call ran out.

            - `cancelled`: The call was abandoned because the client that asked
            for it went away.

            - `invalid_configuration`: The configuration of the AI service
            cannot be used, such as a malformed service URL or a payload that is
            not a JSON object.

            - `connection_error`: The AI service could not be reached.

            - `context_length_exceeded`: The input was too long for the
            configured model.

            - `quota_exhausted`: The quota of the configured API key is
            exhausted.

            - `rate_limited`: The AI service turned the call down because too
            many calls were made in a short time.

            - `authentication`: The AI service did not accept the API key, or
            does not allow it what the call asked for.

            - `provider_unavailable`: The AI service was temporarily unavailable
            or overloaded.

            - `provider_rejected`: The AI service rejected the request as
            invalid, typically because of an option of the configured payload or
            model it does not support.

            - `empty_response`: The AI service returned no answer at all.

            - `provider_error`: The AI service reported that it failed to
            produce the answer.

            - `incomplete_max_output_tokens`: The answer was cut off because it
            reached the output limit.

            - `incomplete_content_filter`: The content filter of the AI service
            withheld the answer.

            - `unexpected_status`: The AI service reported the answer as not
            finished, such as still queued, in progress or cancelled.

            - `refusal`: The model refused to produce the requested content.

            - `empty_output`: The answer carried no content.

            - `invalid_json`: The answer was not the JSON document the call
            asked for.
          enum:
            - timeout
            - cancelled
            - invalid_configuration
            - connection_error
            - context_length_exceeded
            - quota_exhausted
            - rate_limited
            - authentication
            - provider_unavailable
            - provider_rejected
            - empty_response
            - provider_error
            - incomplete_max_output_tokens
            - incomplete_content_filter
            - unexpected_status
            - refusal
            - empty_output
            - invalid_json
            - null
          nullable: true
        retryable:
          type: boolean
          description: >-
            Whether asking again may succeed; `false` when the same call would
            fail the same way.
        type:
          type: string
          description: >-
            Machine-readable classification of the failure, from the same
            catalogue as the `type` of an error response.
          example: INTEGRATION:CONNECTION_TIMEOUT
    responseDocumentsTermSuggestions:
      type: object
      properties:
        available:
          type: boolean
          description: >-
            Whether a list other than `reminders` holds a candidate that may be
            offered, one with `offerable` set.
        error:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionError'
          description: Why the detection failed, for `failed` only; `null` otherwise.
          nullable: true
        expiresOn:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionDate'
          description: Candidates for the date the document expires on (`expiresOn`).
        isAgreement:
          type: boolean
          description: >-
            Whether the model judged the document to be a binding agreement
            rather than, for example, a quotation or an offer; `null` when the
            model was not asked or did not say. The candidates are kept either
            way.
          nullable: true
        locatorAvailable:
          type: boolean
          description: >-
            Whether looking the passages up in the PDF worked. When it did not,
            the candidates still come back, but none of their passages is
            placed; it is `false` as well when the detection ended before any
            passage was to be looked up.
        nonFixedTermNoticePeriod:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionPeriod'
          description: >-
            Candidates for the termination notice of a contract that runs until
            it is terminated (`term.nonFixedTerm.noticePeriod`).
        nonFixedTermTerminationStartDate:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionDate'
          description: >-
            Candidates for the day the termination of a contract that runs until
            it is terminated started (`term.nonFixedTerm.terminationStartDate`).
            Applying one starts the termination, so none of them is ever
            preferred.
        omittedPages:
          type: object
          properties:
            from:
              type: integer
              minimum: 1
              description: First page left out.
            to:
              type: integer
              minimum: 1
              description: Last page left out.
          description: >-
            Pages left out of the analysis entirely because the document is too
            long, as one range; `null` when none was. A page only cut short
            counts toward `truncated` alone.
          nullable: true
        pageCount:
          type: integer
          minimum: 0
          description: >-
            Number of pages of the PDF the term was read from; `null` when the
            PDF was not read.
          nullable: true
        pagesWithText:
          type: integer
          minimum: 0
          description: >-
            How many of the pages read carry text. Fewer than `pageCount` means
            that some pages are images, such as scans, or were not read, so what
            they say could not be found; `null` when the PDF was not read.
          nullable: true
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionReminder'
          description: >-
            Reminders suggested ahead of a detected renewal notice deadline,
            each in the form of an entry of `term.reminders`.
        renewalFinalDate:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionDate'
          description: >-
            Candidates for the date the renewals never extend the contract
            beyond (`term.renewal.finalDate`).
        renewalMaxRenewals:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionCount'
          description: >-
            Candidates for how many automatic renewals the contract allows
            (`term.renewal.maxRenewals`).
        renewalNoticePeriod:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionPeriod'
          description: >-
            Candidates for the notice the renewal requires ahead of the
            expiration date (`term.renewal.noticePeriod`) - the notice of
            non-renewal that stops an automatic renewal, or the notice by which
            a manual one has to be requested.
        renewalPeriod:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionPeriod'
          description: >-
            Candidates for how far each renewal moves the expiration date
            (`term.renewal.period`).
        renewalType:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionRenewalType'
          description: Candidates for how the contract is renewed (`term.renewal.type`).
        searchIncomplete:
          type: boolean
          description: >-
            Whether the time for looking the passages up in the PDF ran out
            before every passage was searched for in full, so that a passage
            left unplaced may still be printed in the document and a retry may
            place it. It is reported whether or not a candidate may be offered;
            when none may, the `status` is `failed` as well. `false` when no
            passage was looked up or the lookup gave no answer.
        status:
          type: string
          description: >-
            Outcome of the detection as a whole. The lists hold candidates only
            for a document that was read and analyzed - with `detected`,
            `nothing_detected` and, when placing the values in the document
            failed, `failed`; with any other status every list is empty.


            - `detected`: The document states at least one term value that can
            be offered.

            - `nothing_detected`: The document was read, but no value can be
            offered - it states none, or none of those found could be applied or
            placed in the document.

            - `no_text_layer`: The PDF carries too little text to read,
            typically because it is a scan, so nothing was looked for.

            - `not_pdf`: The file is not a PDF, or the document has no PDF, so
            nothing was looked for.

            - `password_protected`: The PDF needs a password to be opened, so
            nothing was looked for.

            - `unreadable`: The PDF is damaged and could not be read.

            - `file_too_large`: The PDF is too large to be analyzed.

            - `not_editable`: The document cannot be edited in its current
            workflow state, so its term cannot be changed and nothing was looked
            for.

            - `failed`: Reading the document, asking the model or placing the
            values in the document failed; `error` says why and whether asking
            again may succeed.
          enum:
            - detected
            - nothing_detected
            - no_text_layer
            - not_pdf
            - password_protected
            - unreadable
            - file_too_large
            - not_editable
            - failed
        truncated:
          type: boolean
          description: >-
            Whether part of the document was left out of the analysis because
            the document is too long, so a term stated in that part cannot have
            been found.
    responseDocumentsTermSuggestionError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable explanation of the failure.
          example: The AI service did not answer in time.
        reason:
          type: string
          description: >-
            Why the failure happened, in more detail than `type`; `null` for a
            failure without a finer classification.


            - `timeout`: The AI service did not answer before the time allowed
            for the call ran out.

            - `cancelled`: The call was abandoned because the client that asked
            for it went away.

            - `invalid_configuration`: The configuration of the AI service
            cannot be used, such as a malformed service URL or a payload that is
            not a JSON object.

            - `connection_error`: The AI service could not be reached.

            - `context_length_exceeded`: The input was too long for the
            configured model.

            - `quota_exhausted`: The quota of the configured API key is
            exhausted.

            - `rate_limited`: The AI service turned the call down because too
            many calls were made in a short time.

            - `authentication`: The AI service did not accept the API key, or
            does not allow it what the call asked for.

            - `provider_unavailable`: The AI service was temporarily unavailable
            or overloaded.

            - `provider_rejected`: The AI service rejected the request as
            invalid, typically because of an option of the configured payload or
            model it does not support.

            - `empty_response`: The AI service returned no answer at all.

            - `provider_error`: The AI service reported that it failed to
            produce the answer.

            - `incomplete_max_output_tokens`: The answer was cut off because it
            reached the output limit.

            - `incomplete_content_filter`: The content filter of the AI service
            withheld the answer.

            - `unexpected_status`: The AI service reported the answer as not
            finished, such as still queued, in progress or cancelled.

            - `refusal`: The model refused to produce the requested content.

            - `empty_output`: The answer carried no content.

            - `invalid_json`: The answer was not the JSON document the call
            asked for.

            - `text_unavailable`: The text of the document could not be read,
            such as because its file or the service reading it was not
            available.

            - `text_time_budget`: Reading the text of the document took longer
            than allowed.

            - `service_busy`: The service reading the document was too busy to
            take the request.

            - `locator_unavailable`: The values could not be placed in the
            document, because looking up their passages failed or ran out of
            time.

            - `text_changed`: The text the passages were looked up in differs
            from the text the model was given, so the placements cannot be
            trusted.

            - `internal_error`: An unexpected error ended the detection.
          enum:
            - timeout
            - cancelled
            - invalid_configuration
            - connection_error
            - context_length_exceeded
            - quota_exhausted
            - rate_limited
            - authentication
            - provider_unavailable
            - provider_rejected
            - empty_response
            - provider_error
            - incomplete_max_output_tokens
            - incomplete_content_filter
            - unexpected_status
            - refusal
            - empty_output
            - invalid_json
            - text_unavailable
            - text_time_budget
            - service_busy
            - locator_unavailable
            - text_changed
            - internal_error
            - null
          nullable: true
        retryable:
          type: boolean
          description: >-
            Whether asking again may succeed; `false` when the same call would
            fail the same way.
        type:
          type: string
          description: >-
            Machine-readable classification of the failure, from the same
            catalogue as the `type` of an error response.
          example: INTEGRATION:CONNECTION_TIMEOUT
    responseDocumentsTermSuggestionDate:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        dateOrder:
          type: string
          description: >-
            How the order of day and month of the date as the document writes it
            was decided; `null` when the model reported none, such as for a date
            the platform worked out.


            - `unambiguous`: The written date can be read only one way, such as
            because it names the month or is written year first.

            - `proven_by_document`: The written date could be read two ways, but
            the document proves the order, such as by another date whose day is
            above 12.

            - `assumed`: Nothing in the document proves the order of day and
            month, so it was decided from cues such as the governing law or the
            addresses.
          enum:
            - unambiguous
            - proven_by_document
            - assumed
            - null
          nullable: true
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: string
          description: >-
            The calendar day, as `YYYY-MM-DD` - a day, not a moment, which may
            lie in the past; `null` when the candidate has `errors`.
          example: '2027-12-31'
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionPeriod:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        businessDays:
          type: boolean
          description: >-
            For a notice period: whether the document counts the notice in
            business days, as the model read it; `null` for a renewal period.
          nullable: true
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        purpose:
          type: string
          description: >-
            For a renewal notice period: what the notice does, as the model read
            it; `null` for any other period.


            - `non_renewal`: A notice of non-renewal - given in time, it stops
            the automatic renewal of the contract.

            - `renewal_request`: A notice requesting the renewal - unless it is
            given in time, the contract is not renewed.
          enum:
            - non_renewal
            - renewal_request
            - null
          nullable: true
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            The period, as a count followed by one of the units `y`, `Q`, `M`,
            `w`, `d`; `null` when the candidate has `errors`.
          example: 1y
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionReminder:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          allOf:
            - $ref: '#/components/schemas/requestDocumentsBodyTermReminder'
          description: >-
            The reminder as it is added to the term's reminders - to the
            document's owner, at `09:00`, ahead of the renewal notice deadline;
            `null` when the candidate has `errors`.
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionCount:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: integer
          minimum: 1
          maximum: 100
          description: >-
            How many automatic renewals the contract allows - over its whole
            life, or for a rolled-forward candidate the ones it has left; `null`
            when the candidate has `errors`.
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionRenewalType:
      type: object
      properties:
        applicable:
          type: boolean
          description: >-
            Whether the value can be applied as it stands, which is the case
            exactly when `errors` is empty.
        computation:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionComputation'
          description: >-
            How a computed value was worked out; `null` for a value written in
            the document.
          nullable: true
        computed:
          type: boolean
          description: >-
            Whether the value is not written as such in the document but was
            worked out - by the model from what the document states, or by the
            platform from other candidates.
        derivedFrom:
          type: array
          items:
            type: string
            example: expiresOn-1
          description: >-
            Candidates of this answer the value was derived from; empty for a
            candidate of its own. A derived candidate has no passage of its own
            - it is shown through the passages of these.
        duplicateValueOf:
          type: string
          description: >-
            Identifier of an earlier candidate of the same list with the same
            value, read from another passage, so the two stand for one value
            found in two places; `null` for the first candidate of a value.
          example: expiresOn-1
          nullable: true
        errors:
          type: array
          items:
            type: string
            description: >-
              One reason the value cannot be applied.


              - `invalid_value`: The value, or what the model stated with it
              such as the purpose of a notice, is not one the field accepts.

              - `invalid_date`: The value is not a calendar day written as
              `YYYY-MM-DD`, or no such day exists.

              - `invalid_period`: The value is not a period written as a count
              followed by a unit.

              - `out_of_range`: The number lies outside what the field accepts,
              such as a maximum number of renewals above 100.

              - `backdated_too_far`: The termination start date lies more than
              15 days in the past, further back than a termination may be
              started.
            enum:
              - invalid_value
              - invalid_date
              - invalid_period
              - out_of_range
              - backdated_too_far
          description: >-
            Reasons the value cannot be applied as it stands; empty when nothing
            stands in its way.
        id:
          type: string
          description: >-
            Identifier of the candidate, unique within this answer, which
            `derivedFrom` and `duplicateValueOf` of other candidates refer to.
          example: expiresOn-1
        offerable:
          type: boolean
          description: >-
            Whether the candidate may be offered to the user: it is applicable,
            and either its passage was placed in the document without doubt, or
            it was derived from candidates that may all be offered.
        origin:
          type: string
          description: >-
            How the value was arrived at.


            - `document`: Written in the document as such.

            - `computed`: Worked out by the model from a date and a duration the
            document states, such as twelve months after signature.

            - `rolled_forward`: Moved forward to the current renewal period of
            an automatically renewing contract whose stated expiration date has
            passed - the expiration date by whole renewal periods, never beyond
            the final date, the maximum number of renewals by those already used
            up, with the renewals the platform has already counted on the
            document added.

            - `swapped_date_order`: The written date read with day and month
            swapped, offered because the document does not settle which order it
            uses.

            - `business_days_converted`: A notice stated in business days,
            converted to whole weeks that span at least as many business days.

            - `notice_reminder`: A reminder proposed ahead of the renewal notice
            deadline - `30d` before it for a notice counted in days or weeks,
            `1M` for one counted in months, quarters or years - so the notice
            can still be given in time.
          enum:
            - document
            - computed
            - rolled_forward
            - swapped_date_order
            - business_days_converted
            - notice_reminder
        preferred:
          type: boolean
          description: >-
            Whether the candidate is the one to select by default for its field.
            At most one candidate of a list is preferred, and the preferred
            candidates of all lists together form a term that can be saved.
        rawValue:
          type: string
          maxLength: 64
          description: >-
            The value as the model wrote it, for a candidate whose `errors` keep
            it from being applied, cut short when longer; `null` for an
            applicable candidate.
          example: '2027-02-30'
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionSource'
          description: >-
            Passages of the document the value was read from - the passage of
            the value itself and, for a value the model computed, the passage
            stating the date it was counted from. Empty for a derived candidate.
        value:
          type: string
          description: >-
            How the contract is renewed; `null` when the candidate has `errors`.


            - `auto`: The platform extends the expiration date by the renewal
            period once the expiration day is over.

            - `manual`: The contract is renewed by hand — the expiration date
            moves only when somebody changes it.
          enum:
            - auto
            - manual
            - null
          nullable: true
        warnings:
          type: array
          items:
            type: string
            description: >-
              One reason to look at the value.


              - `in_past`: The day is already over.

              - `date_implausible`: The date lies before 1950-01-01 or more than
              100 years ahead, which usually means it was misread.

              - `below_auto_minimum`: The period is shorter than the 14 days an
              automatic renewal needs at least, so it can only be used for a
              manual renewal.

              - `not_after_expiration`: The final date is not later than any
              expiration date found in the document - or, when none was found,
              than the document's current expiration date - so it leaves no room
              for a renewal.

              - `limited_twice`: The contract limits its renewals both by a
              number and by a final date, and an automatic renewal can be
              limited by only one of the two.

              - `notice_reaches_period`: The notice is at least as long as a
              renewal period found in the document, which contracts rarely state
              and may mean that one of the two was misread.

              - `polarity_conflict`: The notice does the opposite of what the
              renewal type found in the document implies - it stops a renewal
              the contract leaves to be made by hand, or requests one the
              contract makes automatically.

              - `computation_mismatch`: Recomputing the value from the date and
              the duration the model named gives a different day; `computation`
              holds the recomputed one.

              - `computation_unverified`: The model computed the value and its
              computation cannot be confirmed: it names no date and duration the
              value can be recomputed from, or the passage stating that date is
              missing, does not show that date or was not found in the document.

              - `date_order_assumed`: The written date can be read with day and
              month either way and its order was assumed; the other reading is
              offered as a value of its own.

              - `business_days`: The document counts the notice in business
              days, which a period cannot express, so the value may be shorter
              than the notice the contract requires.

              - `value_not_in_quote`: The numbers in the passage the value was
              taken from do not match it, so the value may have been misread or
              taken from elsewhere.

              - `catch_up_renewals`: The expiration date has passed and the
              contract renews automatically, so applying the two together makes
              every renewal due since then happen at once, each counting toward
              the 100 renewals a document can have.

              - `renewals_exhausted`: Rolled forward to this date, the contract
              has no renewal left under its own limits, so the date is to be
              applied without the renewal.

              - `renewals_already_counted`: The platform has already renewed the
              document automatically, and those renewals stay counted when the
              term is applied: under a maximum found in the document the
              contract renews only as many more times as the maximum exceeds
              them, while the count left after a rolled-forward date has them
              added - up to the 100 renewals a document can have, which may end
              the renewals before the contract does.

              - `reminder_lead_exceeds_period`: The reminder fires at least as
              far ahead of the expiration as a renewal period found in the
              document lasts, so after every renewal it would fire straight
              away.

              - `starts_termination`: Applying the date starts a termination of
              the contract, which then expires the notice period after it.
            enum:
              - in_past
              - date_implausible
              - below_auto_minimum
              - not_after_expiration
              - limited_twice
              - notice_reaches_period
              - polarity_conflict
              - computation_mismatch
              - computation_unverified
              - date_order_assumed
              - business_days
              - value_not_in_quote
              - catch_up_renewals
              - renewals_exhausted
              - renewals_already_counted
              - reminder_lead_exceeds_period
              - starts_termination
          description: >-
            Reasons to look at the value before applying it; it can be applied
            regardless.
    responseDocumentsTermSuggestionComputation:
      type: object
      properties:
        anchorDate:
          type: string
          description: >-
            For `model`: the day the model counted from, as `YYYY-MM-DD` and as
            the model wrote it; `null` when it named none.
          example: '2025-03-01'
          nullable: true
        businessDays:
          type: integer
          minimum: 1
          description: >-
            For `business_days`: how many business days the notice the value was
            converted from counts.
        from:
          type: string
          description: >-
            For `rolled_forward`: the expiration date found in the document that
            was moved forward, as `YYYY-MM-DD`.
          example: '2024-12-31'
        kind:
          type: string
          description: >-
            How the value was worked out; it decides which of the other
            properties are returned.


            - `model`: The model computed the value from a date and a duration
            the document states, such as twelve months after signature; the
            platform rechecks the arithmetic wherever the two allow it.

            - `rolled_forward`: The platform moved an expiration date found in
            the document that has passed forward by whole renewal periods of the
            automatic renewal - the last one only up to the final date, when the
            contract has one.

            - `business_days`: The platform converted a notice stated in
            business days to the whole weeks that span at least as many business
            days.

            - `notice_reminder`: The platform derived a reminder from a renewal
            notice period, to fire ahead of the notice deadline.
          enum:
            - model
            - rolled_forward
            - business_days
            - notice_reminder
        lead:
          type: string
          description: >-
            For `notice_reminder`: how long before the notice deadline the
            reminder fires - in days for a notice counted in days or weeks, in
            months for one counted in months, quarters or years.
          enum:
            - 30d
            - 1M
        noticePeriod:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            For `notice_reminder`: the renewal notice period the reminder was
            derived from.
          example: 3M
        offset:
          type: string
          description: >-
            For `model`: the duration the model added to `anchorDate`, as the
            model wrote it; `null` when the rule is not a plain offset.
          example: 2y
          nullable: true
        period:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            For `rolled_forward`: the renewal period the date was moved forward
            by.
          example: 1y
        recomputed:
          type: string
          description: >-
            For `model`: the day the platform arrives at by adding `offset` to
            `anchorDate`, as `YYYY-MM-DD`; `null` when the two do not allow the
            check.
          example: '2027-03-01'
          nullable: true
        renewals:
          type: integer
          minimum: 1
          description: >-
            For `rolled_forward`: how many renewal periods the date was moved
            forward by.
        rule:
          type: string
          description: >-
            For `model`: how the model says it computed the value, in one short
            sentence in the user's language.
          example: Two years after the date of signature.
          nullable: true
        verified:
          type: boolean
          description: >-
            For `model`: whether the value is `recomputed` or the day before it,
            the two ways contracts count the end of a duration; `null` when the
            check was not possible.
          nullable: true
    responseDocumentsTermSuggestionSource:
      type: object
      properties:
        documentText:
          type: string
          description: >-
            The document's own words under the placement - what a reader of the
            PDF sees there, which may differ from `quote` in spacing, accents or
            the words left out; `null` when the passage was not placed.
          example: This Agreement is concluded for a fixed term until 31 December 2027.
          nullable: true
        issues:
          type: array
          items:
            type: string
            description: >-
              One problem of the passage.


              - `quote_missing`: The model reported no passage.

              - `quote_too_short`: The passage is too short to be placed in the
              document reliably.

              - `quote_too_long`: The passage is longer than a passage looked up
              in the document may be.

              - `quote_contained_marker`: The passage contained page markers or
              other text the platform adds to the text the model is given; they
              were removed from it.

              - `page_out_of_range`: The page the model named is not a page of
              the text it was given, so no page is reported.
            enum:
              - quote_missing
              - quote_too_short
              - quote_too_long
              - quote_contained_marker
              - page_out_of_range
          description: >-
            Problems of the passage as the model reported it; empty when there
            are none.
        location:
          allOf:
            - $ref: '#/components/schemas/responseDocumentsTermSuggestionLocation'
          description: >-
            Where the passage is printed in the PDF and how certain that
            placement is.
        page:
          type: integer
          minimum: 1
          description: >-
            Page the model named for the passage, the first page being `1`;
            `null` when it named none, or one that is not a page of the text it
            was given.
          nullable: true
        quote:
          type: string
          description: >-
            The passage as the model reported it, with the page markers of the
            text it was given removed and its spacing collapsed - one too long
            to be looked up cut short right after the longest one that can be;
            `null` when the model reported none.
          example: This Agreement is concluded for a fixed term until 31 December 2027
          nullable: true
        role:
          type: string
          description: >-
            What the passage shows.


            - `value`: The passage the value is read from.

            - `anchor`: The passage stating the date a computed value is counted
            from.
          enum:
            - value
            - anchor
    requestDocumentsBodyTermReminder:
      type: object
      properties:
        notifyOwner:
          type: boolean
          description: >-
            Whether the reminder also goes to the document's owner, whoever that
            is at the moment it fires. A reminder without any `recipients` has
            to set it.
          nullable: true
        period:
          type: string
          pattern: ^([1-9]\d{0,2})([yQMwd])$
          description: >-
            How long before the expiration day the reminder fires, as a count
            followed by a unit - `y`, `Q`, `M`, `w` or `d`. Left empty, it fires
            on the expiration day itself.
          example: 30d
          nullable: true
        recipients:
          type: array
          items:
            type: string
          maxItems: 100
          description: >-
            Usernames of the users to send the reminder to. Each newly added one
            has to be a user the writer is allowed to see - the writer and the
            document's owner always are - and is given read access to the
            document when it is saved, so that the link in the reminder opens.
          example:
            - jane.doe@example.com
          nullable: true
        time:
          type: string
          pattern: ^(?:[01][0-9]|2[0-3]):(?:00|15|30|45)$
          description: >-
            Time of day the reminder fires at on its day, in the time zone of
            the user who configures it. Left empty, it fires at `09:00`.
          example: '09:00'
          nullable: true
    responseDocumentsTermSuggestionLocation:
      type: object
      properties:
        alternatives:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionAlternative'
          description: >-
            Other places the same wording is printed, in document order -
            reported only for a wording found as one uninterrupted run of text.
            Empty when there is none.
        ambiguous:
          type: boolean
          description: >-
            Whether the wording is printed more than once and nothing singled
            out the copy the value was read from, so `pages` may point at
            another copy.
          nullable: true
        coherent:
          type: boolean
          description: >-
            Whether the placed characters form one block on each page; `false`
            when they are scattered, which is what a table read out of order
            looks like.
          nullable: true
        complete:
          type: boolean
          description: >-
            Whether the whole passage was placed; `false` when only part of it
            could be, or when the placement starts or ends inside a word of the
            document.
          nullable: true
        exact:
          type: boolean
          description: >-
            Whether the passage matched with only spacing, letter case and
            character forms such as ligatures disregarded; `false` when dashes,
            the script of digits, quotation mark styles or accents had to be
            disregarded as well to find it.
          nullable: true
        hiddenText:
          type: boolean
          description: >-
            Whether the placed characters include text printed invisibly or too
            small to read, so the passage may not be what a reader of the PDF
            sees there.
          nullable: true
        hintHonoured:
          type: boolean
          description: >-
            Whether the placement touches the page the model named for the
            passage.
          nullable: true
        interrupted:
          type: boolean
          description: >-
            Whether unrelated text sits between the placed words on the same
            page, such as a column in another language or a footnote marker.
            Text skipped over a page break, such as a header or a footer, does
            not count.
          nullable: true
        matchedRatio:
          type: number
          minimum: 0
          maximum: 1
          description: Share of the passage's characters that were placed.
          nullable: true
        occurrences:
          type: integer
          minimum: 0
          description: >-
            How many times the placed wording is printed in the document,
            counted up to a cap.
          nullable: true
        occurrencesCapped:
          type: boolean
          description: Whether the wording is printed more often than `occurrences` counts.
          nullable: true
        pages:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionLocationPage'
          description: >-
            Where the passage is printed, one entry per page it covers, in
            reading order - two for a passage running over a page break. Empty
            when it was not placed.
        readingOrder:
          type: boolean
          description: >-
            Whether the passage was found only once the page text was re-read in
            its visual reading order, because the order the PDF stores its text
            in gave no complete placement - typical of columns and tables.
          nullable: true
        status:
          type: string
          description: >-
            How certain the placement is. The flags and counts beside it give
            the detail behind it; each of them is `null` when the passage was
            not looked up.


            - `located`: The whole passage was placed as one continuous passage
            on one unambiguous spot, possibly running over a page break.

            - `ambiguous`: The passage is printed more than once, and nothing
            singled out the copy the value was read from.

            - `partial`: Only part of the passage could be placed, or the
            placement starts or ends inside a word.

            - `scattered`: The placed characters do not form one continuous
            passage.

            - `hidden_text`: The placed passage includes characters printed
            invisibly or too small to read, so it may not be what a reader of
            the document sees.

            - `not_found`: The passage is not in the document's text.

            - `not_attempted`: The passage was not looked up - it is not
            suitable for placing, such as too short or too long, or looking it
            up was not possible.
          enum:
            - located
            - ambiguous
            - partial
            - scattered
            - hidden_text
            - not_found
            - not_attempted
        tokenBoundary:
          type: boolean
          description: >-
            Whether the placement starts and ends on the boundaries of words of
            the document; `false` when it starts or ends inside one.
          nullable: true
    responseDocumentsTermSuggestionAlternative:
      type: object
      properties:
        pages:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsTermSuggestionLocationPage'
          description: >-
            Where this copy of the wording is printed, one entry per page it
            covers, in reading order.
    responseDocumentsTermSuggestionLocationPage:
      type: object
      properties:
        page:
          type: integer
          minimum: 1
          description: Page, the first page being `1`.
        rectangles:
          type: array
          items:
            $ref: '#/components/schemas/responseDocumentsSignatureItem'
          description: >-
            Boxes covering the passage on the page, one per printed line, in
            reading order - the first one is where the passage starts.
    responseDocumentsSignatureItem:
      type: object
      properties:
        percentHeight:
          type: number
          description: Height of the element as a fraction of the page height.
          example: 0.06
        percentWidth:
          type: number
          description: Width of the element as a fraction of the page width.
          example: 0.25
        percentX:
          type: number
          description: >-
            Horizontal position of the element's top-left corner as a fraction
            of the page width, measured from the left edge of the page.
          example: 0.12
        percentY:
          type: number
          description: >-
            Vertical position of the element's top-left corner as a fraction of
            the page height, measured from the top edge of the page.
          example: 0.78
  securitySchemes:
    Token:
      type: apiKey
      in: query
      name: token
      description: >-
        Standard authorization for most API calls. This token identifies the
        logged-in user and their permissions. It is obtained either as a
        temporary token after a successful login or as a long-term API key.

````

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