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

# GET Tag

> Returns a single Tag by id, resolved against the lease's consolidated tag view when available. That view is rebuilt in the background about 10 minutes after the most recent tag change on the lease and returns the previous value until then; use GET Raw Tag to see a tag as it was just created or edited. The tag's lease must belong to the account in the path and be within your key's building permissions. When this tag amends an earlier one, `amendingTag.amendedTagId` points backwards at the superseded tag and `amendingTag.effectiveDate` is the PRIOR tag's date.

**Required capabilities:** `READ:TAG`



## OpenAPI

````yaml /api-reference/openapi.json get /rest/v2/accounts/{accountId}/tags/{tagId}
openapi: 3.1.0
info:
  title: Prophia API Documentation
  license:
    name: Apache 2.0
    url: http://springdoc.org
  version: v2.495.0
servers:
  - url: https://api.prophia.com
    description: Prophia API
security:
  - apiKey: []
tags:
  - name: Accounts
    description: >-
      Accounts are the top-level scope for everything in the API. Start here:
      list your accounts to find the `accountId` every other path requires.
  - name: Properties
    description: >-
      Properties group one or more buildings under a single asset within an
      account.
  - name: Buildings
    description: Buildings are the physical structures where leases and spaces live.
  - name: Building Spaces
    description: >-
      Building spaces are the units inside a building — suites, floors, storage.
      A space's `suiteNumber` is the canonical name that tag `applicableSpaces`
      entries reference by string match.
  - name: Leases
    description: >-
      Leases are the agreements occupying building spaces. Each lease carries
      its source documents and the tags (structured terms) extracted from them.
  - name: Documents
    description: >-
      Documents are the source files attached to leases — original leases,
      amendments, memorandums, etc.
  - name: Tags
    description: >-
      Tags are the structured lease terms Prophia extracts from documents — a
      rent amount, a renewal option, a key date — each cited to its location in
      the source document. STANDARD tags carry a typed `value`; COMPLEX tags
      carry option details in `tagComponents`.
  - name: Custom Terms
    description: >-
      Custom terms are account-level definitions of extra lease terms your team
      tracks beyond Prophia's standard set. Tags created from them are ordinary
      tags with `isCustomTag: true` — the definition and its tag instances are
      separate resources.
  - name: Custom Fields
    description: >-
      Custom Fields are Account-level fields your team tracks on Buildings
      beyond Prophia's standard set. A `SINGLE` field holds free text per
      Building; a `MULTI` field holds one of a fixed list of options.
      Assignments set a field's value on a Building.
  - name: Loans
    description: >-
      Loans are the financing agreements secured by an account's buildings. Each
      loan carries its source documents and the terms read from them: summary
      terms, covenants and reporting deliverables. Loans is a Labs feature in
      beta, and its endpoints may change.
    x-beta: true
paths:
  /rest/v2/accounts/{accountId}/tags/{tagId}:
    get:
      tags:
        - Tags
      summary: GET Tag
      description: >-
        Returns a single Tag by id, resolved against the lease's consolidated
        tag view when available. That view is rebuilt in the background about 10
        minutes after the most recent tag change on the lease and returns the
        previous value until then; use GET Raw Tag to see a tag as it was just
        created or edited. The tag's lease must belong to the account in the
        path and be within your key's building permissions. When this tag amends
        an earlier one, `amendingTag.amendedTagId` points backwards at the
        superseded tag and `amendingTag.effectiveDate` is the PRIOR tag's date.


        **Required capabilities:** `READ:TAG`
      operationId: getDocTag
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: tagId
          in: path
          required: true
          schema:
            type: string
        - name: include
          in: query
          description: >-
            Optional collections to populate. Unknown keys are rejected with
            400.


            - `tagSelections` — adds the citation list (bounding boxes on doc
            pages).

            - `pages` — adds the per-page geometry for cited pages.

            - `applicableSpaces` — adds the suite/floor list this tag applies
            to.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - tagSelections
                - pages
                - applicableSpaces
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/V2DocTagModel'
        '400':
          description: >-
            Invalid input — for example an unknown `include` key or a malformed
            parameter value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: Invalid Input
                errorCode: InvalidInput
                message: >-
                  Unknown include keys: [bogus]; supported: [tags, documents,
                  subleases]
                status: 400 BAD_REQUEST
                timestamp: '2026-09-02T20:41:03.118Z'
                localizedMessage: >-
                  Unknown include keys: [bogus]; supported: [tags, documents,
                  subleases]
        '401':
          description: >-
            The credential was rejected before the request reached the endpoint
            — for example a JWT was presented where an API key is required. Only
            `error` is populated on this path
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: JWT authentication is not supported. Use an API key.
        '403':
          description: >-
            The API key is valid but lacks a required capability, or its
            building permissions do not cover the requested resource. The
            message names the missing capabilities only in the former case
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: Access Denied
                errorCode: AccessDenied
                message: 'Not authorized. Missing capabilities: READ:TAG'
                status: 403 FORBIDDEN
                timestamp: '2026-09-02T20:41:03.118Z'
                localizedMessage: 'Not authorized. Missing capabilities: READ:TAG'
        '404':
          description: No such resource is visible to the account named in the path
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2ErrorResponse'
              example:
                error: Entity Not Found
                errorCode: EntityNotFound
                message: This entity is not found in the system.
                status: 404 NOT_FOUND
                timestamp: '2026-09-02T20:41:03.118Z'
                localizedMessage: This entity is not found in the system.
components:
  schemas:
    V2DocTagModel:
      type: object
      description: >-
        Each Tag is a representation of a single data term (Square Footage,
        Suite Number, Base Rent Schedule, etc). Prophia's system consolidates
        iterations of a Tag through the timeline of the containing Lease, using
        other adjacent Tags in some cases, to build out rich representations of
        the data values in the Tag.
      properties:
        id:
          type: string
          description: Prophia internal Tag ID (UUID).
          readOnly: true
        tagName:
          type: string
          description: >-
            Machine name of the term (e.g. `rentSchedule`, `securityDeposit`).
            Tag names may occasionally appear in the format
            `optionName.componentTagName` denoting that the component tag
            belongs to a family of tags associated with that option name (e.g.
            autoRenewal.autoRenewalRate).
        displayName:
          type: string
          description: Human-readable term name as shown in the Prophia app.
        isCustomTag:
          type: boolean
          description: >-
            True when this tag instantiates one of the account's custom term
            definitions.
        category:
          type: string
          description: >-
            STANDARD: a single captured value — the `value` and `schedule`
            fields are the most common places to find relevant data for standard
            type Tags. COMPLEX: an option or right — the `tagComponents` field
            will contain data related to the component family related to the
            parent option Tag. EXHIBIT: captured exhibit data.
          enum:
            - STANDARD
            - COMPLEX
            - EXHIBIT
        value:
          description: >-
            The basic captured data for this Tag. Some tags may have additional
            customValues, tagComponents, or schedules that supplement this.
            Branch on `value.kind` for its shape: `date`, `number`, `money`,
            `percent`, and `text` carry a single `value`, while `dateRange` and
            `numberRange` carry `start` and `end` instead. Every kind also
            carries `unit`, `capturedData`, and `ocrText`, and the typed fields
            are omitted when `capturedData` could not be parsed into the kind's
            type — `capturedData` always holds the raw text. A numeric value
            captured with a percent unit arrives as `percent` — a pro-rata share
            (`prs`, `opexPrs`, `taxPrs`), a gross up, or a rent bump, for
            instance — carrying the percentage itself, so `3.5` means three and
            a half percent. Tags that accept both percent and dollar units, such
            as `rentBump` and `opexCap`, return `percent` or `money` according
            to the unit the value was captured with. A tag declared as a string
            type returns `text` even when a percent unit is present.
          oneOf:
            - $ref: '#/components/schemas/V2DateModel'
            - $ref: '#/components/schemas/V2DateRangeModel'
            - $ref: '#/components/schemas/V2MoneyModel'
            - $ref: '#/components/schemas/V2NumberModel'
            - $ref: '#/components/schemas/V2NumberRangeModel'
            - $ref: '#/components/schemas/V2PercentModel'
            - $ref: '#/components/schemas/V2TextModel'
        customValue1:
          type: string
          description: Tag-specific extra field; meaning depends on the tag.
        customValue2:
          type: string
          description: Tag-specific extra field; meaning depends on the tag.
        customValue3:
          type: string
          description: Tag-specific extra field; meaning depends on the tag.
        customValue4:
          type: string
          description: Tag-specific extra field; meaning depends on the tag.
        customValue5:
          type: string
          description: Tag-specific extra field; meaning depends on the tag.
        customValue6:
          type: string
          description: Tag-specific extra field; meaning depends on the tag.
        schedule:
          $ref: '#/components/schemas/V2ScheduleModel'
          description: >-
            Series data for terms that carry one — rent steps, abatement
            periods, deposit burn-downs. Branch on `schedule.kind`.
        tagComponents:
          description: >-
            Structured detail for COMPLEX tags (options and rights). Branch on
            its `kind`. Null for STANDARD tags.
          oneOf:
            - $ref: '#/components/schemas/V2AutoRenewalComponent'
            - $ref: '#/components/schemas/V2ContractionComponent'
            - $ref: '#/components/schemas/V2EarlyTerminationComponent'
            - $ref: '#/components/schemas/V2ExpansionComponent'
            - $ref: '#/components/schemas/V2FeeComponent'
            - $ref: '#/components/schemas/V2GenericComponent'
            - $ref: '#/components/schemas/V2PurchaseComponent'
            - $ref: '#/components/schemas/V2RenewalComponent'
            - $ref: '#/components/schemas/V2RightOfFirstOfferComponent'
            - $ref: '#/components/schemas/V2RightOfFirstRefusalComponent'
            - $ref: '#/components/schemas/V2TenantImprovementComponent'
        amendingTag:
          $ref: '#/components/schemas/V2AmendingTag'
          description: >-
            Present when this tag amends/supersedes an earlier tag (its DB
            reference_id / OPTION option-group anchor). `amendedTagId` is the
            earlier (amended) tag's id; this is populated for any tag carrying a
            reference, not just OPTION/complex tags. For OPTION tags the same
            pointer is also mirrored inside tagComponents.amendingTag.
        lifecycleStatus:
          type: string
          description: >-
            State of this tag record across the lease's document history.
            Distinct from a component's `rightStatus` — the two are resolved
            independently and can disagree. Typically this lifecycle status
            refers to individual STANDARD tags or tagComponents.
          enum:
            - ACTIVE
            - VOID
            - STRICKEN
            - EXERCISED
        leaseId:
          type: string
          description: Lease this tag belongs to.
        leaseDocId:
          type: string
          description: Document this tag was extracted from.
        applicableSpaces:
          type: array
          description: >-
            Spaces the term applies to; only populated when
            `include=applicableSpaces` is present in the request parameters.
            Entries reference building spaces by suite name, not by id.
          items:
            $ref: '#/components/schemas/V2SpaceModel'
        createdAt:
          type: string
          format: date-time
          description: When the tag was created.
        updatedAt:
          type: string
          format: date-time
          description: When the tag was last modified.
        tagSelections:
          type: array
          description: >-
            Citations: rectangles on document pages where the term was captured;
            only populated when `include=tagSelections` is present in the
            request parameters.
          items:
            $ref: '#/components/schemas/V2TagSelectionModel'
        pages:
          type: array
          description: >-
            Geometry of the cited pages, for placing `tagSelections` bounding
            boxes; only populated when `include=pages` is present in the request
            parameters.
          items:
            $ref: '#/components/schemas/V2PageModel'
        url:
          type: string
          description: Deep link to this tag in the Prophia web app.
    V2ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Stable error category
          example: Invalid Input
        errorCode:
          type: string
          description: Stable error code suitable for programmatic handling
          example: InvalidInput
        message:
          type: string
          description: Human-readable detail; may aggregate multiple field errors
        status:
          type: string
          description: >-
            HTTP status of the response as code and reason phrase, matching the
            response's own status line
          example: 404 NOT_FOUND
        timestamp:
          type: string
          format: date-time
          description: When the error was produced, as an ISO-8601 UTC instant
          example: '2026-09-02T20:41:03.118Z'
        localizedMessage:
          type: string
          description: >-
            Same text as `message`; present because the body is a serialized
            exception. Prefer `message`
    V2DateModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `date` here.
              enum:
                - date
            value:
              type: string
              description: >-
                Present when `kind` is `date`. The captured date, `yyyy-MM-dd`.
                Omitted when the captured text was not parseable as a date;
                `capturedData` still holds what was captured.
          required:
            - kind
      description: >-
        `kind: date` — a single calendar date, serialized `yyyy-MM-dd`. `value`
        is omitted when the captured text was not parseable as a date, which is
        common for dates a lease states in relative terms; `capturedData` still
        holds what was captured.
      title: date
    V2DateRangeModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `dateRange` here.
              enum:
                - dateRange
            start:
              type: string
              description: >-
                Present when `kind` is `dateRange`. Inclusive start of the
                range, `yyyy-MM-dd`. Omitted together with `end` when
                `capturedData` could not be split into a parseable pair.
            end:
              type: string
              description: >-
                Present when `kind` is `dateRange`. Inclusive end of the range,
                `yyyy-MM-dd`. Omitted together with `start` when `capturedData`
                could not be split into a parseable pair.
          required:
            - kind
      description: >-
        `kind: dateRange` — a period bounded by two calendar dates, each
        serialized `yyyy-MM-dd`. Both bounds come from splitting one captured
        string, so both are omitted together when it could not be split into a
        parseable pair.
      title: dateRange
    V2MoneyModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `money` here.
              enum:
                - money
            value:
              type: string
              description: >-
                Present when `kind` is `money`. Decimal string (not a JSON
                number) holding a BigDecimal rounded to 2 decimals — preserves
                cent precision through JSON, e.g. "120000.00".
            currency:
              type: string
              description: Currency code for the value (e.g. USD).
          required:
            - kind
      description: >-
        `kind: money` — a currency amount. Produced when the term was captured
        with a currency unit; `currency` is the containing lease's currency, not
        a per-value choice.
      title: money
    V2NumberModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `number` here.
              enum:
                - number
            value:
              type: number
              description: >-
                The typed value. Its JSON type follows `kind`: a number for
                `number` and `percent`, a `yyyy-MM-dd` string for `date`, a
                decimal string for `money`, and the captured text for `text`.
                Omitted when `capturedData` could not be parsed into that type.
          required:
            - kind
      description: >-
        `kind: number` — a plain numeric amount: a count, an area, a duration.
        Read `unit` for the qualifier the number was captured with (e.g. months,
        square feet); the number itself is meaningless without it for most
        terms.
      title: number
    V2NumberRangeModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `numberRange` here.
              enum:
                - numberRange
            start:
              type: integer
              format: int32
              description: >-
                Inclusive start of the range: a `yyyy-MM-dd` string for
                `dateRange`, an integer for `numberRange`. Omitted together with
                `end` when `capturedData` could not be split into a parseable
                pair.
            end:
              type: integer
              format: int32
              description: >-
                Inclusive end of the range: a `yyyy-MM-dd` string for
                `dateRange`, an integer for `numberRange`. Omitted together with
                `start` when `capturedData` could not be split into a parseable
                pair.
          required:
            - kind
      description: >-
        `kind: numberRange` — an integer range, typically a duration window such
        as a notice period stated as a span. `unit` names what the bounds count
        (e.g. `range of days`, `range of months`). Both bounds come from
        splitting one captured string, so both are omitted together when it
        could not be split into a parseable pair.
      title: numberRange
    V2PercentModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `percent` here.
              enum:
                - percent
            value:
              type: number
              description: >-
                The typed value. Its JSON type follows `kind`: a number for
                `number` and `percent`, a `yyyy-MM-dd` string for `date`, a
                decimal string for `money`, and the captured text for `text`.
                Omitted when `capturedData` could not be parsed into that type.
          required:
            - kind
      description: >-
        `kind: percent` — a rate, carried as the percentage itself rather than a
        fraction: `3` with `unit` `%` means three percent. Produced wherever a
        numeric value was captured with a percent unit: a tag's own `value` (a
        pro-rata share, a rent bump) and the `tagComponents` fields that read
        the captured unit (rate bumps, fee increases). Percent rent schedule
        entries are also this kind, by construction rather than from a captured
        unit. `unit` distinguishes the percent flavours — `%`, `% per year`, `%
        of FMV`, `% increase (annual)` and the rest.
      title: percent
    V2TextModel:
      allOf:
        - $ref: '#/components/schemas/V2TagValue'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `text` here.
              enum:
                - text
            value:
              type: string
              description: >-
                The typed value. Its JSON type follows `kind`: a number for
                `number` and `percent`, a `yyyy-MM-dd` string for `date`, a
                decimal string for `money`, and the captured text for `text`.
                Omitted when `capturedData` could not be parsed into that type.
          required:
            - kind
      description: >-
        `kind: text` — a free-text value, and the fallback kind: any term that
        is not a date, a number, or a range arrives as text. `value` is the
        captured text verbatim, so it is always equal to `capturedData`.
      title: text
    V2ScheduleModel:
      type: object
      properties:
        kind:
          type: string
          description: Which schedule this is; determines the shape of `entries`.
          enum:
            - RENT
            - PERCENT_RENT
            - ABATEMENT
            - REFUND
            - FEE
        entries:
          type: array
          description: The schedule rows, in order.
          items:
            $ref: '#/components/schemas/V2ScheduleEntryModel'
    V2AutoRenewalComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `AUTO_RENEWAL` here.
              enum:
                - AUTO_RENEWAL
            advancedNoticePeriod:
              description: >-
                Notice required to opt out before an automatic renewal takes
                effect; this right extends on its own, so the notice stops it
                rather than exercising it. Shape follows the unit the term was
                captured with: `number` for a plain count, `date` for a stated
                deadline, and `numberRange` or `dateRange` when the lease states
                a window rather than a single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            autoRenewalTerm:
              description: >-
                Length of each automatic renewal period. Shape follows the unit
                the term was captured with: a stated length arrives as `number`
                — read `unit` for what it counts — and a period the lease words
                rather than counts arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            autoRenewalPeriods:
              description: >-
                Number of automatic renewals, when limited. Shape follows the
                unit it was captured with: a stated count arrives as `number`
                with unit `period`, and a count the lease words rather than
                states arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            autoRenewalRate:
              description: >-
                Rent rate for the automatic renewal period, when stated. Shape
                follows the unit the amount was captured with: a stated amount
                arrives as `money` with the lease's currency, and an amount the
                lease describes rather than states arrives as `text`, with the
                wording in `capturedData`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            autoRenewalRateBump:
              description: >-
                Rate increase applied at each automatic renewal, when stated. A
                percentage arrives as `percent`, carried as the percentage
                itself; a stated dollar increase arrives as `money` with the
                lease's currency.
              oneOf:
                - $ref: '#/components/schemas/V2PercentModel'
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the auto-renewal provision applies.
          required:
            - kind
      description: >-
        Structured detail for a automatic renewal: the term extends on its own
        unless the tenant opts out, so the notice period here is the one for
        opting out rather than for exercising.
      title: AUTO_RENEWAL
    V2ContractionComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `CONTRACTION` here.
              enum:
                - CONTRACTION
            advancedNoticePeriod:
              description: >-
                Notice the tenant must give to exercise the contraction right.
                Shape follows the unit the term was captured with: `number` for
                a plain count, `date` for a stated deadline, and `numberRange`
                or `dateRange` when the lease states a window rather than a
                single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            contractionFee:
              description: >-
                Fee payable on exercising the contraction. Shape follows the
                unit the amount was captured with: a stated amount arrives as
                `money` with the lease's currency, and an amount the lease
                describes rather than states arrives as `text`, with the wording
                in `capturedData`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            optionEndDate:
              description: >-
                Deadline to elect the contraction. Shape follows the unit it was
                captured with: a stated deadline arrives as `date`, a period the
                lease measures rather than dates arrives as `number` — read
                `unit` for what it counts — and a window as `dateRange`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            earlyMoveOutDate:
              description: >-
                When the tenant may vacate the contracted space. Shape follows
                the unit it was captured with: a stated date arrives as `date`,
                and a period the lease measures rather than dates arrives as
                `number` — read `unit` for what it counts.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2TextModel'
            contractionSpace:
              type: array
              description: >-
                Spaces the tenant may give back, in the same shape as a Tag's
                `applicableSpaces`: suite names matched against
                `BuildingSpace.suiteNumber` by string, with the `Entire
                building` and `All spaces` sentinels for whole-building scope.
              items:
                $ref: '#/components/schemas/V2SpaceModel'
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the right may be exercised.
          required:
            - kind
      description: >-
        Structured detail for a contraction right: the tenant's right to give
        back part of the premises, named in `contractionSpace`.
      title: CONTRACTION
    V2EarlyTerminationComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `EARLY_TERMINATION` here.
              enum:
                - EARLY_TERMINATION
            advancedNoticePeriod:
              description: >-
                Notice the tenant must give to terminate early. Shape follows
                the unit the term was captured with: `number` for a plain count,
                `date` for a stated deadline, and `numberRange` or `dateRange`
                when the lease states a window rather than a single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            terminationFee:
              description: >-
                Fee payable on exercising the termination. Shape follows the
                unit the amount was captured with: a stated amount arrives as
                `money` with the lease's currency, and an amount the lease
                describes rather than states arrives as `text`, with the wording
                in `capturedData`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            optionEndDate:
              description: >-
                Deadline to elect the termination. Shape follows the unit it was
                captured with: a stated deadline arrives as `date`, a period the
                lease measures rather than dates arrives as `number` — read
                `unit` for what it counts — and a window as `dateRange`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            earlyMoveOutDate:
              description: >-
                When the tenant may vacate on exercising the termination. Shape
                follows the unit it was captured with: a stated date arrives as
                `date`, and a period the lease measures rather than dates
                arrives as `number` — read `unit` for what it counts.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2TextModel'
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the right may be exercised.
          required:
            - kind
      description: >-
        Structured detail for a early-termination right: the tenant's right to
        end the lease before its expiration, usually on notice and a fee.
      title: EARLY_TERMINATION
    V2ExpansionComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `EXPANSION` here.
              enum:
                - EXPANSION
            advancedNoticePeriod:
              description: >-
                Notice the tenant must give to exercise the expansion right.
                Shape follows the unit the term was captured with: `number` for
                a plain count, `date` for a stated deadline, and `numberRange`
                or `dateRange` when the lease states a window rather than a
                single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            acceptancePeriod:
              description: >-
                Window to accept once the option is triggered. Shape follows the
                unit the term was captured with: a stated length arrives as
                `number` — read `unit` for what it counts — and a period the
                lease words rather than counts arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            rentalRate:
              description: >-
                Rent rate for the expansion space, when stated. Shape follows
                the unit the rate was captured with: a stated dollar rate
                arrives as `money` with the lease's currency, and a percentage
                of fair market value as `percent`. A rate the lease words rather
                than states — most often fair market value itself — arrives as
                `text`, with the wording in `capturedData`. A rate the lease
                leaves to the landlord also arrives as `text`, with
                `capturedData` set to `landlordDefined`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2PercentModel'
                - $ref: '#/components/schemas/V2TextModel'
            expirationDate:
              description: >-
                When the expansion right expires. Shape follows the unit it was
                captured with: a stated deadline arrives as `date`, and a
                deadline the lease states in relative terms arrives as `number`
                — read `unit` for what it counts. Wording that is neither
                arrives as `text`, and `capturedData` always holds the raw
                value.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2TextModel'
            expansionSpace:
              type: array
              description: >-
                Spaces the tenant may take, in the same shape as a Tag's
                `applicableSpaces`: suite names matched against
                `BuildingSpace.suiteNumber` by string, with the `Entire
                building` and `All spaces` sentinels for whole-building scope.
              items:
                $ref: '#/components/schemas/V2SpaceModel'
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the right may be exercised.
          required:
            - kind
      description: >-
        Structured detail for a expansion option: the tenant's right to take
        additional space, named in `expansionSpace`.
      title: EXPANSION
    V2FeeComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `FEE` here.
              enum:
                - FEE
            feeAmount:
              description: >-
                The fee amount. Shape follows the unit the amount was captured
                with: a stated amount arrives as `money` with the lease's
                currency, and an amount the lease describes rather than states
                arrives as `text`, with the wording in `capturedData`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            feeTerm:
              description: >-
                The period the fee runs for. A span of months from commencement
                arrives as `numberRange` and a pair of dates as `dateRange`,
                each with `start` and `end` when the captured text parses into a
                pair. Text that is not a parseable range arrives as `text`, and
                `capturedData` always holds the raw value.
              oneOf:
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            feeIncrease:
              description: >-
                Scheduled increase to the fee, when stated. A percentage arrives
                as `percent`, carried as the percentage itself; a stated dollar
                increase arrives as `money` with the lease's currency. This is a
                summary of the escalation: a fee that steps on explicit dates,
                or steps to new absolute amounts, is only partly expressed here.
                Read the tag's `schedule` for the authoritative per-period
                amounts.
              oneOf:
                - $ref: '#/components/schemas/V2PercentModel'
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            encumberedSpaces:
              type: array
              description: >-
                Spaces the provision burdens; same shape and suite-name matching
                semantics as `applicableSpaces`.
              items:
                $ref: '#/components/schemas/V2SpaceModel'
          required:
            - kind
      description: >-
        Structured detail for a fee provision: a charge the lease attaches to a
        right or event, separate from rent.
      title: FEE
    V2GenericComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `OTHER` here.
              enum:
                - OTHER
            encumberedSpaces:
              type: array
              description: >-
                Spaces the provision burdens; same shape and suite-name matching
                semantics as `applicableSpaces`.
              items:
                $ref: '#/components/schemas/V2SpaceModel'
          required:
            - kind
      description: >-
        Structured detail for a right Prophia captures without a type-specific
        shape. The detail lives in the component's own fields — `clause`, the
        constituent Tags, and the encumbered spaces — rather than in named
        fields here.
      title: OTHER
    V2PurchaseComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `PURCHASE` here.
              enum:
                - PURCHASE
            advancedNoticePeriod:
              description: >-
                Notice period attached to the purchase right. Shape follows the
                unit the term was captured with: `number` for a plain count,
                `date` for a stated deadline, and `numberRange` or `dateRange`
                when the lease states a window rather than a single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the purchase option may be exercised.
          required:
            - kind
      description: >-
        Structured detail for a purchase option: the tenant's right to buy the
        premises.
      title: PURCHASE
    V2RenewalComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `RENEWAL` here.
              enum:
                - RENEWAL
            renewalPeriodTerm:
              description: >-
                Length of each renewal period. A duration, not a date range.
                Shape follows the unit the term was captured with: a stated
                length arrives as `number` — read `unit` for what it counts —
                and a period the lease words rather than counts arrives as
                `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            numberOfAdditionalPeriods:
              description: >-
                How many additional periods may be exercised. Shape follows the
                unit it was captured with: a stated count arrives as `number`
                with unit `period`, and a count the lease words rather than
                states arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            advancedNoticePeriod:
              description: >-
                Notice the tenant must give to exercise the renewal option.
                Shape follows the unit the term was captured with: `number` for
                a plain count, `date` for a stated deadline, and `numberRange`
                or `dateRange` when the lease states a window rather than a
                single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            acceptancePeriod:
              description: >-
                Window to accept once the option is triggered. Shape follows the
                unit the term was captured with: a stated length arrives as
                `number` — read `unit` for what it counts — and a period the
                lease words rather than counts arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            rentalRate:
              description: >-
                Rent rate for the renewal period, when stated. Shape follows the
                unit the rate was captured with: a stated dollar rate arrives as
                `money` with the lease's currency, and a percentage of fair
                market value as `percent`. A rate the lease words rather than
                states — most often fair market value itself — arrives as
                `text`, with the wording in `capturedData`. A rate the lease
                leaves to the landlord also arrives as `text`, with
                `capturedData` set to `landlordDefined`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2PercentModel'
                - $ref: '#/components/schemas/V2TextModel'
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the right may be exercised.
          required:
            - kind
      description: >-
        Structured detail for a renewal option: the tenant's right to extend the
        term for one or more further periods on stated notice.
      title: RENEWAL
    V2RightOfFirstOfferComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: >-
                Discriminator for this shape — always `RIGHT_OF_FIRST_OFFER`
                here.
              enum:
                - RIGHT_OF_FIRST_OFFER
            advancedNoticePeriod:
              description: >-
                Notice period attached to the offer. Shape follows the unit the
                term was captured with: `number` for a plain count, `date` for a
                stated deadline, and `numberRange` or `dateRange` when the lease
                states a window rather than a single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            acceptancePeriod:
              description: >-
                Window the tenant has to accept the offer once made. Shape
                follows the unit the term was captured with: a stated length
                arrives as `number` — read `unit` for what it counts — and a
                period the lease words rather than counts arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            rentalRate:
              description: >-
                Rent rate for the offered space, when stated. Shape follows the
                unit the rate was captured with: a stated dollar rate arrives as
                `money` with the lease's currency, and a percentage of fair
                market value as `percent`. A rate the lease words rather than
                states — most often fair market value itself — arrives as
                `text`, with the wording in `capturedData`. A rate the lease
                leaves to the landlord also arrives as `text`, with
                `capturedData` set to `landlordDefined`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2PercentModel'
                - $ref: '#/components/schemas/V2TextModel'
            expirationDateOfRight:
              description: >-
                When the right of first offer expires. Shape follows the unit it
                was captured with: a stated deadline arrives as `date`, and a
                deadline the lease states in relative terms arrives as `number`
                — read `unit` for what it counts. Wording that is neither
                arrives as `text`, and `capturedData` always holds the raw
                value.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2TextModel'
            offeredSpace:
              type: array
              description: >-
                Spaces the right applies to, in the same shape as a Tag's
                `applicableSpaces`: suite names matched against
                `BuildingSpace.suiteNumber` by string, with the `Entire
                building` and `All spaces` sentinels for whole-building scope.
              items:
                $ref: '#/components/schemas/V2SpaceModel'
            oneTimeOrOngoing:
              type: string
              description: >-
                Whether the right can be exercised once or persists through the
                term, as captured. Free text rather than a fixed set of values.
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the right applies.
          required:
            - kind
      description: >-
        Structured detail for a right of first offer: before letting the space
        named in `offeredSpace` to anyone else, the landlord must offer it to
        this tenant first.
      title: RIGHT_OF_FIRST_OFFER
    V2RightOfFirstRefusalComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: >-
                Discriminator for this shape — always `RIGHT_OF_FIRST_REFUSAL`
                here.
              enum:
                - RIGHT_OF_FIRST_REFUSAL
            advancedNoticePeriod:
              description: >-
                Notice period attached to the right. Shape follows the unit the
                term was captured with: `number` for a plain count, `date` for a
                stated deadline, and `numberRange` or `dateRange` when the lease
                states a window rather than a single figure.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2NumberRangeModel'
                - $ref: '#/components/schemas/V2DateRangeModel'
                - $ref: '#/components/schemas/V2TextModel'
            acceptancePeriod:
              description: >-
                Window the tenant has to match a third-party offer. Shape
                follows the unit the term was captured with: a stated length
                arrives as `number` — read `unit` for what it counts — and a
                period the lease words rather than counts arrives as `text`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2TextModel'
            rentalRate:
              description: >-
                Rent rate for the refusal space, when stated. Shape follows the
                unit the rate was captured with: a stated dollar rate arrives as
                `money` with the lease's currency, and a percentage of fair
                market value as `percent`. A rate the lease words rather than
                states — most often fair market value itself — arrives as
                `text`, with the wording in `capturedData`. A rate the lease
                leaves to the landlord also arrives as `text`, with
                `capturedData` set to `landlordDefined`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2PercentModel'
                - $ref: '#/components/schemas/V2TextModel'
            expirationDateOfRight:
              description: >-
                When the right of first refusal expires. Shape follows the unit
                it was captured with: a stated deadline arrives as `date`, and a
                deadline the lease states in relative terms arrives as `number`
                — read `unit` for what it counts. Wording that is neither
                arrives as `text`, and `capturedData` always holds the raw
                value.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2TextModel'
            refusalSpace:
              type: array
              description: >-
                Spaces the right applies to, in the same shape as a Tag's
                `applicableSpaces`: suite names matched against
                `BuildingSpace.suiteNumber` by string, with the `Entire
                building` and `All spaces` sentinels for whole-building scope.
              items:
                $ref: '#/components/schemas/V2SpaceModel'
            oneTimeOrOngoing:
              type: string
              description: >-
                Whether the right can be exercised once or persists through the
                term, as captured. Free text rather than a fixed set of values.
            effectivePeriod:
              $ref: '#/components/schemas/V2DateRangeModel'
              description: Date range during which the right applies.
          required:
            - kind
      description: >-
        Structured detail for a right of first refusal: when a third party
        offers on the space named in `refusalSpace`, the tenant may match it and
        take the space.
      title: RIGHT_OF_FIRST_REFUSAL
    V2TenantImprovementComponent:
      allOf:
        - $ref: '#/components/schemas/V2TagComponentModel'
        - type: object
          properties:
            kind:
              type: string
              description: Discriminator for this shape — always `TENANT_IMPROVEMENT` here.
              enum:
                - TENANT_IMPROVEMENT
            tiAmount:
              description: >-
                Tenant-improvement allowance amount. Shape follows the unit the
                amount was captured with: a stated amount arrives as `money`
                with the lease's currency, and an amount the lease describes
                rather than states arrives as `text`, with the wording in
                `capturedData`.
              oneOf:
                - $ref: '#/components/schemas/V2MoneyModel'
                - $ref: '#/components/schemas/V2TextModel'
            tiRemaining:
              $ref: '#/components/schemas/V2TextModel'
              description: >-
                Allowance still unspent, as the lease states it. Always `text`:
                this term is captured as free wording, and `capturedData` holds
                the raw value.
            tiSunset:
              description: >-
                Point after which any unspent allowance is forfeited. A stated
                duration arrives as `number` with its unit, a stated deadline as
                `date`.
              oneOf:
                - $ref: '#/components/schemas/V2NumberModel'
                - $ref: '#/components/schemas/V2DateModel'
                - $ref: '#/components/schemas/V2TextModel'
          required:
            - kind
      description: >-
        Structured detail for a tenant-improvement allowance: money the landlord
        contributes toward fitting out the space.
      title: TENANT_IMPROVEMENT
    V2AmendingTag:
      type: object
      description: >-
        Back-reference built from the Tag's `referenceId`, the shared key of an
        option-amendment chain. It resolves to different things depending on the
        Tag holding it: on an option Tag it points at the chain's earlier
        iteration — the option in a prior Document that this one amends — while
        on a component Tag it identifies the parent option container the
        component belongs to. Omitted when a Tag references itself, which is how
        the first option in a chain is stored.
      properties:
        effectiveDate:
          type: string
          description: >-
            Effective date of the referenced Tag — the amended option, or the
            parent option when this sits on a component. Not the effective date
            of the Tag carrying this reference.
        amendedTagId:
          type: string
          description: >-
            Id the Tag's `referenceId` points at: the earlier option this one
            amends, or the parent option container when this sits on a component
            Tag.
    V2SpaceModel:
      type: object
      description: >-
        Reference to space in a Building: one Building Space suiteNumber, an
        entire floor, the entire Building, or all spaces. `scope` says which of
        those it is, and `name` carries the label — for `BUILDING` and `ALL`
        that label is the sentinel `Entire building` or `All spaces` rather than
        the name of a real Building Space. The `ALL` scope means all suites in
        the relevant context are referenced: a Tag with `scope: ALL` refers to
        every suite defined in the suiteNumber tag belonging to that Document or
        Lease.
      properties:
        name:
          type: string
          description: >-
            The space's display name: a suite name that matches
            `BuildingSpace.suiteNumber` by string (scope SUITE), a floor
            designation (scope FLOOR), or the sentinels `Entire building` / `All
            spaces`.
        buildingId:
          type: string
          description: >-
            Building this entry refers to. Can differ from the parent lease's
            own Building when a lease spans multiple buildings or has relocated.
        scope:
          type: string
          description: >-
            Granularity of the reference: SUITE (one suite), FLOOR (a whole
            floor), BUILDING (the entire building), or ALL (all spaces).
          enum:
            - BUILDING
            - FLOOR
            - SUITE
            - ALL
    V2TagSelectionModel:
      type: object
      description: 'One citation: a bounding box on a specific document page.'
      properties:
        docPageId:
          type: string
          description: >-
            The Page Id (UUID) of the document page the citation sits on;
            resolve via `include=pages` on the tag or the document's pages
            listing.
        boundingBox:
          $ref: '#/components/schemas/V2BoundingBox'
          description: >-
            Rectangle on the page locating this citation. Coordinates are
            ten-thousandths of the page dimensions (0–10000), origin top-left —
            not the pixel space of `PageModel.width` and `PageModel.height`. See
            the BoundingBox schema for the conversion.
        sequence:
          type: integer
          format: int32
          description: 0-based order of this citation within the tag's selections.
    V2PageModel:
      type: object
      properties:
        id:
          type: string
          description: Document page id; matches `tagSelections[].docPageId`.
        pageSequence:
          type: integer
          format: int32
          description: Position of the page within its document.
        width:
          type: integer
          format: int32
          description: >-
            Page width in the OCR pipeline's native units (typically pixels).
            Scale a tag citation onto this page with `pixel_x = boundingBox.x *
            width / 10000`.
        height:
          type: integer
          format: int32
          description: >-
            Page height in the OCR pipeline's native units (typically pixels).
            Scale a tag citation onto this page with `pixel_y = boundingBox.y *
            height / 10000`.
    V2TagValue:
      type: object
      description: >-
        A single captured value. Polymorphic: the `kind` property is the
        discriminator, and it determines which fields the object carries.


        - `money` — `value` and `currency`

        - `number` — `value`

        - `percent` — `value`

        - `date` — `value`

        - `text` — `value`

        - `dateRange` — `start` and `end`

        - `numberRange` — `start` and `end`


        `unit`, `capturedData`, and `ocrText` are common to every kind. A
        TagValue appears in three positions: a tag's `value`, a field of
        `tagComponents`, and a field of a schedule entry. A numeric value
        captured with a percent unit resolves to `percent` both on a tag's own
        `value` and on the `tagComponents` fields that read the captured unit.
        Some `tagComponents` fields are fixed to a single kind by definition
        whatever unit was captured, and schedule entries take their kinds from
        the schedule rather than from a captured unit.


        `kind` alone is not enough to interpret a value, because `number` covers
        durations, areas and plain counts alike. Read `unit` as well.


        The typed fields are populated by parsing `capturedData`, so they are
        omitted when the captured text could not be parsed into the kind's type.
        `capturedData` always holds the raw text and is the fallback when a
        typed field is missing.
      discriminator:
        propertyName: kind
      properties:
        unit:
          type: string
          description: >-
            Unit qualifier for the value when the source text carried one (e.g.
            months, per square foot).
        capturedData:
          type: string
          description: The value as captured during extraction, as text.
        ocrText:
          type: string
          description: Raw source text the value was extracted from.
        kind:
          type: string
          description: >-
            Discriminator selecting this value's shape; each variant pins its
            own value.
          enum:
            - money
            - number
            - percent
            - date
            - dateRange
            - numberRange
            - text
      required:
        - kind
    V2ScheduleEntryModel:
      type: object
      description: >-
        Entry in a `schedule`. Entries carry no discriminator of their own — the
        parent `schedule.kind` selects the shape, and each variant is named for
        the kind that produces it.
      oneOf:
        - $ref: '#/components/schemas/V2RentScheduleEntry'
        - $ref: '#/components/schemas/V2FeeScheduleEntry'
        - $ref: '#/components/schemas/V2AbatementScheduleEntry'
        - $ref: '#/components/schemas/V2RefundScheduleEntry'
        - $ref: '#/components/schemas/V2PercentRentScheduleEntry'
      properties:
        sequence:
          type: integer
          format: int32
          description: 0-indexed ordering within the schedule.
    V2TagComponentModel:
      type: object
      discriminator:
        propertyName: kind
      properties:
        rightStatus:
          type: string
          description: >-
            Status of the option/right itself. Independent of the tag record's
            `lifecycleStatus` — the two are resolved independently and can
            disagree.
          enum:
            - AVAILABLE
            - EXERCISED
            - STRICKEN
            - DECLINED
            - EXPIRED
            - UNKNOWN
        rightIsStricken:
          type: string
          description: >-
            Indicator the right was stricken from the lease via a Stricken
            clause; see `rightStatus` for the resolved state.
        customLabel:
          type: string
          description: >-
            Label denoting the option family this option belongs to. Options
            with the same `referenceId` should also shared the same
            `customLabel`
        effectiveDateOfRight:
          description: >-
            When the current version of the right takes effect. Defaults to the
            parent tag's own effective date, which arrives as `date` with no
            `unit` because nothing was captured for it; an
            `<option>.effectiveDateOfRight` cor tag overrides that. Shape
            follows the unit it was captured with: a stated deadline arrives as
            `date`, a period the lease measures rather than dates arrives as
            `number` — read `unit` for what it counts — and a window as
            `dateRange`.
          oneOf:
            - $ref: '#/components/schemas/V2NumberModel'
            - $ref: '#/components/schemas/V2DateModel'
            - $ref: '#/components/schemas/V2DateRangeModel'
            - $ref: '#/components/schemas/V2TextModel'
        clause:
          type: string
          description: >-
            Some Tags capture a simple clause rather than more in-depth data,
            represented here when that is the case.
        amendingTag:
          $ref: '#/components/schemas/V2AmendingTag'
          description: >-
            The same reference the Tag carries in its own `amendingTag` — both
            are built from this option's `referenceId`, so reading either gives
            the option this one amends. Repeated here so a caller working inside
            `tagComponents` does not have to climb back out to the Tag.
        componentTags:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/V2DocTagRef'
          description: >-
            References to the constituent tags this component was assembled
            from, keyed by component field.
        kind:
          type: string
          description: >-
            Discriminator selecting this value's shape; each variant pins its
            own value.
          enum:
            - RENEWAL
            - EARLY_TERMINATION
            - EXPANSION
            - CONTRACTION
            - RIGHT_OF_FIRST_REFUSAL
            - RIGHT_OF_FIRST_OFFER
            - PURCHASE
            - AUTO_RENEWAL
            - TENANT_IMPROVEMENT
            - FEE
            - OTHER
      required:
        - kind
    V2BoundingBox:
      type: object
      description: >-
        Rectangle on a document Page. Coordinates are integers from 0 to 10000,
        measured in ten-thousandths of the page's own width (`x`, `width`) or
        height (`y`, `height`) — one unit is a basis point of that dimension —
        so `x: 2500` sits a quarter of the way across the page and 10000 is the
        full width or height. Origin is top-left.


        This is **not** the coordinate space of `PageModel.width` and
        `PageModel.height`, which are pixels of the rendered page image. To draw
        on that image, scale each value: `pixel_x = x * page.width / 10000`, and
        likewise for `y`, `width`, and `height`.


        The four values are rounded independently, so a box flush against the
        right or bottom edge can total 10001 — clamp to the page rather than
        treating it as invalid.
      properties:
        x:
          type: integer
          format: int32
          description: Left edge, in ten-thousandths of the page width (0–10000).
        'y':
          type: integer
          format: int32
          description: Top edge, in ten-thousandths of the page height (0–10000).
        width:
          type: integer
          format: int32
          description: >-
            Box width, in ten-thousandths of the page width (0–10000). `x +
            width` can come back as 10001 for a box flush against the right
            edge.
        height:
          type: integer
          format: int32
          description: >-
            Box height, in ten-thousandths of the page height (0–10000). `y +
            height` can come back as 10001 for a box flush against the bottom
            edge.
    V2RentScheduleEntry:
      type: object
      description: >-
        One step in a RENT schedule: the rent and any fixed charges that apply
        over a single stretch of the term. Steps are ordered by `sequence` and
        bounded either by dates or by months from commencement, depending on how
        the lease states them.
      properties:
        sequence:
          type: integer
          format: int32
          description: 0-indexed ordering within the schedule.
        startDate:
          type: string
          description: >-
            First day this rent step applies, `yyyy-MM-dd`. Null when the step
            is expressed only as months from commencement — read `startMonth`
            instead.
        endDate:
          type: string
          description: >-
            Last day this rent step applies, `yyyy-MM-dd`. Null when the step is
            expressed only as months from commencement — read `endMonth`
            instead.
        startMonth:
          type: integer
          format: int32
          description: >-
            1-indexed month from lease commencement (month 1 = the commencement
            month). Null when only dates are given.
        endMonth:
          type: integer
          format: int32
          description: 1-indexed month from lease commencement.
        squareFootage:
          type: integer
          format: int32
          description: >-
            Rentable square footage the step is calculated against, when the
            lease states it per step. Steps in the same schedule can differ when
            the premises change size mid-term.
        baseRent:
          $ref: '#/components/schemas/V2MoneyModel'
          description: Base rent for this step, annualized.
        fixedRETaxes:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            Fixed real-estate-tax charge for this step, when the lease fixes
            taxes rather than passing them through.
        fixedOpex:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            Fixed operating-expense charge for this step, when the lease fixes
            opex.
        fixedParking:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            Only captured on `GSA_OFFICE` leases — the underlying tag cannot be
            created on any other lease type, so this is null elsewhere. Fixed
            parking charge for this step, when stated.
        annualTiRent:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            Only captured on `GSA_OFFICE` leases — the underlying tag cannot be
            created on any other lease type, so this is null elsewhere.
            Annualized portion of base rent that amortizes the
            tenant-improvement allowance.
        annualBsacRent:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            Only captured on `GSA_OFFICE` leases — the underlying tag cannot be
            created on any other lease type, so this is null elsewhere.
            Annualized building-standard-allowance-credit portion of base rent.
        cpiIncreaseAmount:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            Only captured on `GSA_OFFICE` leases — the underlying tag cannot be
            created on any other lease type, so this is null elsewhere. Dollar
            amount of the CPI-driven rent increase applied to this step, when
            the lease has a CPI escalator.
      title: RENT
    V2FeeScheduleEntry:
      type: object
      description: >-
        One step in a FEE schedule: a recurring charge that applies over a
        single stretch of the term, separate from base rent.
      properties:
        sequence:
          type: integer
          format: int32
          description: 0-indexed ordering within the schedule.
        startDate:
          type: string
          description: >-
            First day this fee step applies, `yyyy-MM-dd`. Null when the step is
            expressed only as months from commencement — read `startMonth`
            instead.
        endDate:
          type: string
          description: >-
            Last day this fee step applies, `yyyy-MM-dd`. Null when the step is
            expressed only as months from commencement — read `endMonth`
            instead.
        startMonth:
          type: integer
          format: int32
          description: >-
            1-indexed month from lease commencement (month 1 = the commencement
            month). Null when only dates are given.
        endMonth:
          type: integer
          format: int32
          description: 1-indexed month from lease commencement.
        amount:
          $ref: '#/components/schemas/V2MoneyModel'
          description: Fee amount for this entry.
      title: FEE
    V2AbatementScheduleEntry:
      type: object
      description: >-
        One period in an ABATEMENT schedule: rent the tenant does not pay for a
        stretch of the term, usually free rent granted as a concession.
      properties:
        sequence:
          type: integer
          format: int32
          description: 0-indexed ordering within the schedule.
        startDate:
          type: string
          description: >-
            First day of this abatement period, `yyyy-MM-dd`. Null when the
            period is expressed only as months from commencement — read
            `startMonth` instead.
        endDate:
          type: string
          description: >-
            Last day of this abatement period, `yyyy-MM-dd`. Null when the
            period is expressed only as months from commencement — read
            `endMonth` instead.
        startMonth:
          type: integer
          format: int32
          description: >-
            1-indexed month from lease commencement (month 1 = the commencement
            month). Null when only dates are given.
        endMonth:
          type: integer
          format: int32
          description: 1-indexed month from lease commencement.
        amount:
          $ref: '#/components/schemas/V2MoneyModel'
          description: Abated amount for this period.
        includesTaxAndOpex:
          type: boolean
          description: >-
            True when the abatement covers tax and opex charges in addition to
            base rent.
        valueInText:
          type: string
          description: The abatement as captured in the source text.
      title: ABATEMENT
    V2RefundScheduleEntry:
      type: object
      description: >-
        One step in a REFUND schedule: a scheduled reduction of a security
        deposit or letter of credit. Read `refundType` before `amount` — it
        decides whether the amount is the step or the new balance.
      properties:
        sequence:
          type: integer
          format: int32
          description: 0-indexed ordering within the schedule.
        effectiveDate:
          type: string
          description: Date this refund or release step takes effect, `yyyy-MM-dd`.
        refundType:
          type: string
          description: >-
            How to read `amount` on this step. `TO` means the deposit is reduced
            to `amount`, so it is the balance that remains; `BY` means `amount`
            is the size of the reduction and the balance drops by that amount,
            floored at zero.
          enum:
            - BY
            - TO
        unitType:
          type: string
          description: >-
            How to read `unitValue` when placing this step in time: `months` and
            `years` count from lease commencement, `date` means `unitValue` is
            the date itself. The two together produce `effectiveDate`; a step
            Prophia cannot place is dropped from the schedule.
        unitValue:
          type: string
          description: >-
            When this step takes effect, expressed in `unitType` units — a count
            of months or years from commencement, or a date.
        amount:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            The step's amount, read according to `refundType`: the balance
            remaining when `TO`, the size of the reduction when `BY`.
        reducedAmount:
          $ref: '#/components/schemas/V2MoneyModel'
          description: >-
            The deposit as it stands at this step: the original amount from the
            deposit tag with every reduction up to and including this one
            applied. Prophia walks the schedule in `sequence` order to derive
            it, subtracting for a `BY` step and replacing the running balance
            for a `TO` step, floored at zero — so read this rather than
            accumulating `amount` yourself.
        appliesToBaseRent:
          type: boolean
          description: True when the refund applies against base rent.
      title: REFUND
    V2PercentRentScheduleEntry:
      type: object
      description: >-
        One period in a PERCENT_RENT schedule: rent owed as a share of the
        tenant's sales above a breakpoint, on top of base rent.
      properties:
        sequence:
          type: integer
          format: int32
          description: 0-indexed ordering within the schedule.
        startDate:
          type: string
          description: >-
            First day of this percentage-rent period, `yyyy-MM-dd`. Null when
            the period is expressed only as months from commencement — read
            `startMonth` instead.
        endDate:
          type: string
          description: >-
            Last day of this percentage-rent period, `yyyy-MM-dd`. Null when the
            period is expressed only as months from commencement — read
            `endMonth` instead.
        startMonth:
          type: integer
          format: int32
          description: >-
            1-indexed month from lease commencement (month 1 = the commencement
            month). Null when only dates are given.
        endMonth:
          type: integer
          format: int32
          description: 1-indexed month from lease commencement.
        percent:
          $ref: '#/components/schemas/V2PercentModel'
          description: Percentage rate applied for this period.
        breakpoint:
          $ref: '#/components/schemas/V2MoneyModel'
          description: Sales breakpoint above which percentage rent applies, when stated.
        breakpointTerm:
          type: string
          description: >-
            The breakpoint as captured in the source text (e.g. a natural
            breakpoint clause).
      title: PERCENT_RENT
    V2DocTagRef:
      type: object
      description: >-
        A pointer to another Tag. These are the values of a component's
        `componentTags` map, one per constituent tag the option or right was
        assembled from, keyed by the part of that tag's `tagName` after the dot.
        The component surfaces those tags' values on its own fields; fetch a Tag
        by id with the [get tag endpoint](/api-reference/v2/tags/get-tag) when
        you need its citations, status, or raw captured text.
      properties:
        id:
          type: string
          description: Tag Id (UUID) of the referenced tag.
        displayName:
          type: string
          description: Display name of the referenced tag.
  securitySchemes:
    apiKey:
      type: apiKey
      description: >-
        Prophia API key — either an account key (grants admin level permissions)
        or a user key with the REST scope. Send it in the `X-API-Key` header, or
        equivalently as `Authorization: Bearer <api-key>`. JWTs are rejected on
        /rest endpoints with 401.
      name: X-API-Key
      in: header

````

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