Contracts

Get a document's contract terms

Changed on

The contract terms tracked on a document, with amendments: the documents that amend, renew or terminate it. For a document that is itself an amendment, its link and delta (DocumentContractAmendment) instead. Readable even after the workspace's plan stops including contract tracking.

Copy as Markdown Open in ChatGPT Open in Claude

get/v1/accounts/{accountId}/documents/{documentId}/contract

Request

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

Path parameters

accountIdstring required

Workspace account ID.

documentIdstring required

Document ID.

Response

The contract terms, or the amendment

statusinteger

HTTP status code, mirrored in the body.

messagestring

Human-readable message; empty on success.

Example response

{
  "status": 200,
  "data": {
    "resource": "document_contract",
    "document_id": "66b2f0e1c3a4d5e6f7a8b9c0",
    "status": "active",
    "counterparty_name": "Acme Ltda",
    "counterparty_taxpayer_id": "11222333000181",
    "value": 120000.5,
    "currency": "BRL",
    "start_date": "2026-11-01",
    "end_date": "2027-10-31",
    "auto_renew": true,
    "renewal_term_months": 12,
    "notice_period_days": 30,
    "term": 1,
    "owner_id": "d6zqpbyog2v3xvxerwn8la94",
    "metadata": {
      "crm_stage": "won"
    },
    "external_references": [
      {
        "system": "hubspot",
        "id": "98765"
      }
    ],
    "document": {
      "resource": "document",
      "id": "615601fab04c0a3147bb1246",
      "account_id": "d199996981dbd199996981db",
      "name": "document.pdf",
      "status": "metadata_ready",
      "artifacts": {
        "original": "https://api.assinafy.com.br/v1/documents/doc1/download/original"
      },
      "signing_url": "https://api.assinafy.com.br/v1/sign/doc1",
      "verification_code": "a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f",
      "verification_url": "https://www.assinafy.com.br/verificador/a3f1c9e07b2d4e8f9a6c5b1d0e7f3a2c9b8d4e6f",
      "declined_by": {
        "resource": "signer",
        "id": "62d6ee35c7741ca4006b9e11",
        "full_name": "John Signer",
        "email": "john@email.com",
        "whatsapp_phone_number": "+5548999990000",
        "government_id": "39053344705"
      },
      "assignment": {
        "resource": "assignment",
        "id": "615606ef81d199996981dbce",
        "document_id": "615601fab04c0a3147bb1246",
        "created_at": "2026-06-03T03:54:16Z",
        "sender_email": "sender@example.com",
        "method": "virtual",
        "signers": [
          {
            "resource": "signer",
            "id": "62d6ee35c7741ca4006b9e11",
            "full_name": "John Signer",
            "email": "john@email.com",
            "whatsapp_phone_number": "+5548999990000",
            "government_id": "39053344705",
            "verification_method": "Email",
            "notification_methods": [
              "Email"
            ],
            "step": 1,
            "identity_verification_status": "InReview",
            "notification_history": [
              {
                "event": "signature_request",
                "status": "sent",
                "sent_at": "2026-07-07T12:00:00Z"
              }
            ]
          }
        ],
        "items": [
          {
            "page": {
              "id": "615601faf166d6d1d8e7dc30",
              "number": 1,
              "height": 2100,
              "width": 1275,
              "download_url": "https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"
            }
          }
        ],
        "signing_urls": [
          {
            "url": "https://api.assinafy.com.br/v1/sign/doc1?email=joe@example.com"
          }
        ]
      },
      "pages": [
        {
          "id": "615601faf166d6d1d8e7dc30",
          "number": 1,
          "height": 2100,
          "width": 1275,
          "download_url": "https://api.assinafy.com.br/v1/documents/doc1/pages/1a/download"
        }
      ],
      "has_contract": true,
      "created_at": "2026-06-03T03:54:16Z",
      "updated_at": "2026-06-03T03:54:16Z"
    },
    "amendments": [
      {
        "resource": "document_contract_amendment",
        "document_id": "7c3d1e2f4a5b6c7d8e9f0a1b",
        "document_name": "Aditivo 1 - Contrato de prestação de serviços.pdf",
        "parent_document_id": "66b2f0e1c3a4d5e6f7a8b9c0",
        "relation_type": "amendment",
        "number": 1,
        "status": "pending",
        "document_status": "pending_signature",
        "currency": "BRL",
        "terms": {
          "value": 130000,
          "end_date": "2028-06-30"
        },
        "changes": {
          "value": {
            "from": 120000.5,
            "to": 130000
          },
          "end_date": {
            "from": "2027-10-31",
            "to": "2028-06-30"
          },
          "term": {
            "from": 1,
            "to": 2
          }
        },
        "created_at": "2026-10-23T12:00:00Z",
        "updated_at": "2026-10-23T12:00:00Z"
      }
    ],
    "created_at": "2026-10-23T12:00:00Z",
    "updated_at": "2026-10-23T12:00:00Z"
  }
}

Changes