---
title: "List the contracts related to a document"
method: GET
path: "/v1/accounts/{accountId}/documents/{documentId}/contract/related"
tags: ["Contracts"]
---

# List the contracts related to a document

`GET /v1/accounts/{accountId}/documents/{documentId}/contract/related`

## Request

- Base URL: `https://api.assinafy.com.br`
- URL: `https://api.assinafy.com.br/v1/accounts/{accountId}/documents/{documentId}/contract/related`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

The family the document belongs to, seen from its root: the contract terms with every amendment, renewal and termination document linked to them (`amendments`). Works from the contract document and from any of its amendments alike.

[Copy as Markdown](https://api.assinafy.com.br/v1/docs/markdown?method=get&path=%2Fv1%2Faccounts%2F%7BaccountId%7D%2Fdocuments%2F%7BdocumentId%7D%2Fcontract%2Frelated) [Open in ChatGPT](https://chatgpt.com/?q=Read%20the%20API%20documentation%20at%20https%3A%2F%2Fapi.assinafy.com.br%2Fv1%2Fdocs%2Fmarkdown%3Fmethod%3Dget%26path%3D%252Fv1%252Faccounts%252F%257BaccountId%257D%252Fdocuments%252F%257BdocumentId%257D%252Fcontract%252Frelated%20and%20help%20me%20integrate%20this%20endpoint.) [Open in Claude](https://claude.ai/new?q=Read%20the%20API%20documentation%20at%20https%3A%2F%2Fapi.assinafy.com.br%2Fv1%2Fdocs%2Fmarkdown%3Fmethod%3Dget%26path%3D%252Fv1%252Faccounts%252F%257BaccountId%257D%252Fdocuments%252F%257BdocumentId%257D%252Fcontract%252Frelated%20and%20help%20me%20integrate%20this%20endpoint.)

## Path parameters

- `accountId` string, required
- `documentId` string, required

## Response `200`

The root contract and its family

- object: Standard success wrapper. Operations add their own `data`.
  - `status` integer: HTTP status code, mirrored in the body.
  - `message` string: Human-readable message; empty on success.
  - `data` DocumentContract: The contract terms tracked on a document.
    - `resource` string
    - `document_id` string
    - `status` 'draft' | 'active' | 'expired' | 'terminated'
    - `counterparty_name` string, nullable
    - `counterparty_taxpayer_id` string, nullable: CPF or CNPJ, digits only.
    - `value` number, nullable: Two decimal places at most.
    - `currency` string, nullable: ISO 4217 code; `BRL` when a value is sent without one.
    - `start_date` string, date, nullable
    - `end_date` string, date, nullable
    - `auto_renew` boolean
    - `renewal_term_months` integer, nullable
    - `notice_period_days` integer, nullable
    - `term` integer: Steps on every renewal, starting at 1.
    - `owner_id` string, nullable: ID of the workspace member who owns the contract. When the owner is no longer a member of the workspace (removed, left, or deleted with their account), the hourly run hands the contract to the first owner who is still an active member, or leaves it without one; an inactive member stays the owner. The contract's e-mails (renewal notice, expiring, expired, renewed) go to the first of the owner and the document's creator who is an active member, as that member's notification preferences allow.
    - `metadata` object, nullable: Up to 50 keys of your own, each holding text of at most 500 characters; `null` when there are none. A key ending in `_at` cannot hold a number: the API returns numbers under such keys as dates.
    - `external_references` object[]: IDs outside systems use for this contract, ordered by system and id.
      - `system` string
      - `id` string
    - `document` Document: A document and its current lifecycle state.
      - `resource` string: Present in single-resource responses.
      - `id` string
      - `account_id` string
      - `template_id` string, nullable
      - `name` string
      - `status` string: Status code — see GET /v1/documents/statuses.
      - `artifacts` object: Artifact download URLs keyed by name. Always `original`, plus `thumbnail` once one exists. A certificated document also carries `certificated`, `certificate-page` and `bundle`, and `pades` when it was signed with a digital certificate — the PAdES version holds the signers' ICP-Brasil signatures, which certification flattens out of the certificated PDF.
      - `is_closed` boolean
      - `signing_url` string
      - `verification_code` string, nullable: The code printed on the certificate page. Anyone can check it with `GET /v1/documents/{verification_code}/verify` or on `verification_url`. `null` until the document is `certificated`, and on documents certificated before verification codes existed.
      - `verification_url` string, uri, nullable: The public verification page for this document. `null` until the document is `certificated`.
      - `decline_reason` string, nullable
      - `declined_by` Signer: A signing party belonging to a workspace account.
        - `resource` string: Present in single-resource responses.
        - `id` string
        - `full_name` string
        - `email` string, email, nullable
        - `whatsapp_phone_number` string, nullable: E.164 format; normalized on save.
        - `government_id` string, nullable: Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric).
        - `has_accepted_terms` boolean
      - `tags` object[]
        - `id` string
        - `name` string
      - `assignment` Assignment: A request for signers to sign a document.
        - `resource` string
        - `id` string
        - `document_id` string, nullable: The document this assignment belongs to. `null` only if the document was deleted.
        - `created_at` string, date-time
        - `sender_email` string, email, nullable: Email of the user who sent the document; null once that user has deleted their account.
        - `method` 'virtual' | 'collect'
        - `expires_at` string, date-time, nullable
        - `message` string, nullable
        - `signers` AssignmentSigner[]
          - `resource` string: Present in single-resource responses.
          - `id` string
          - `full_name` string
          - `email` string, email, nullable
          - `whatsapp_phone_number` string, nullable: E.164 format; normalized on save.
          - `government_id` string, nullable: Signer's normalized CPF (11 digits) or CNPJ (14 characters; may be alphanumeric).
          - `has_accepted_terms` boolean
          - `verification_method` string, nullable
          - `notification_methods` string[], nullable
          - `step` integer, nullable: Sequential signing step (defaults to 1).
          - `notified` boolean, nullable
          - `identity_verification_status` 'Pending' | 'InReview' | 'Approved' | 'Declined' | 'Expired' | 'Abandoned', nullable: Latest identity-document verification status; `InReview` means the account must decide it before the document can be certificated.
          - `completed` boolean, nullable: Only present in account-owner contexts.
          - `notification_history` NotificationHistoryEntry[], nullable: Per-channel delivery history for this signer (email + WhatsApp), most-recent send order.
            - `event` string
            - `status` 'sent' | 'failed'
            - `error_code` string, nullable
            - `error_message` string, nullable
            - `sent_at` string, date-time, nullable
            - `failed_at` string, date-time, nullable
        - `copy_receivers` object[]
        - `items` AssignmentItem[]
          - `id` string
          - `page` DocumentPage
            - `id` string
            - `number` integer
            - `height` integer
            - `width` integer
            - `download_url` string
          - `signer` object: Signer responsible for this item.
          - `field` object, nullable: Field definition associated with the item.
          - `display_settings` unknown
          - `value` unknown
          - `completed` boolean
        - `summary` AssignmentSummary
          - `signer_count` integer
          - `completed_count` integer
          - `signers` object[]
        - `signing_urls` SigningUrl[]
          - `signer_id` string
          - `url` string
      - `pages` DocumentPage[]: The document's pages. Included on the same responses as `assignment`, and also on the upload response.
        - `id` string
        - `number` integer
        - `height` integer
        - `width` integer
        - `download_url` string
      - `has_contract` boolean: Only on `GET /v1/documents/{documentId}` read by the workspace, while the environment has contract tracking on: not with a signer's access code, not in document lists or webhooks, and left out when the lookup fails, so a missing key means unknown. Whether `GET /v1/accounts/{accountId}/documents/{documentId}/contract` answers with contract terms, the document's own or those of a contract it amends whose document still exists, so a page can lay out the contract section before reading it.
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `amendments` DocumentContractAmendment[]: Only on the single-contract read: the documents that amend, renew or terminate this contract, the applied ones first by `number`, then the pending ones.
      - `resource` string
      - `document_id` string: This document, the instrument.
      - `document_name` string: This document's name.
      - `parent_document_id` string: The contract document whose terms change.
      - `relation_type` 'amendment' | 'renewal' | 'termination'
      - `number` integer, nullable: Position among the parent's applied amendments by signing date; `null` while pending.
      - `status` 'pending' | 'applied': `applied` once the delta moved the parent's terms.
      - `document_status` string: This document's own status, so a declined, cancelled or expired instrument shows as such. An instrument applies only while its document is `certificated`: one whose document reads `failed` after it was signed waits, with no `apply_error`, until it is certificated again, and then applies in its place in the signing order.
      - `apply_error` string, nullable: Why a signed instrument has not applied yet, retried every hour: the workspace's plan does not include contract tracking (it applies on the first run after the plan returns), the parent would not take the delta, an instrument signed before this one has not applied yet, one signed after it has already applied (this one then stays blocked: unlink it, and record what it still changes on a new instrument), or an unexpected failure.
      - `currency` string, nullable: The currency of the amounts in `terms` and `changes`. Once applied, the contract's currency at that moment, kept whatever the contract moves to later. While pending (and for an instrument applied before this was kept), the one this instrument moves the contract to, otherwise the contract's. `null` when neither has one.
      - `terms` object, nullable: The delta: only the terms this instrument changes; `null` when it changes none (a termination on the day it is signed).
      - `changes` object, nullable: Every parent field the roll-up moves, as `{from, to}`: a preview while pending, the record once applied; `null` when it moves none.
      - `applied_at` string, date-time, nullable
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `401`: Missing or invalid credentials.
- `404`: The document is not in the workspace (`Document not found.`), or carries no contract terms (on a read: neither its own nor those of a contract it amends whose document still exists). Only the second has a `code`, `NoContractTerms`, so a document without terms can be told from one that is not there.
- `500`: Unexpected server error.

## Changes

- **2026-10-28** `3672991376b6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/assinafy/apis/assinafy-api-reference/changes/v1/accounts/:accountId/documents/:documentId/contract/related/get.md)

---

[API](https://skmtc.dev/assinafy/apis/assinafy-api-reference.md) - [All operations](https://skmtc.dev/assinafy/apis/assinafy-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/assinafy/apis/assinafy-api-reference/revisions/3672991376b6?raw)
