GET
/
v1-preview
/
models
/
basic-contract
/
{documentId}
from abbyy_document_ai import DocumentAi
import os


with DocumentAi(
    api_key_auth=os.getenv("DOCUMENTAI_API_KEY_AUTH", ""),
) as document_ai:

    res = document_ai.models.basic_contract.get_extracted_fields(document_id="wh23anb5xjf0ntw5taase5qz")

    assert res.basic_contract is not None

    # Handle response
    print(res.basic_contract)
{
  "meta": {
    "id": "wh23anb5xjf0ntw5taase5qz",
    "name": "document.jpg",
    "createdAt": "2025-02-07T17:44:06.949Z",
    "model": "basic-contract",
    "status": "Processed",
    "pageCount": 10,
    "errors": [
      {
        "message": "Total is required"
      }
    ]
  },
  "fields": {
    "title": "Software Development Service Agreement",
    "party": [
      {
        "organizationName": "Tech Solutions Inc",
        "personName": "John Smith",
        "role": "Service Provider",
        "address": "123 Tech Park, San Francisco, CA 94105"
      },
      {
        "organizationName": "Global Enterprises Ltd",
        "personName": "Sarah Johnson",
        "role": "Client",
        "address": "456 Business Ave, New York, NY 10001"
      }
    ],
    "dealAmount": 150000,
    "agreementDate": "2024-03-15",
    "effectiveDate": "2024-04-01",
    "expirationDate": "2025-03-31",
    "initialTerm": "12 months",
    "renewalTerm": "12 months",
    "governingLaw": "California",
    "securityDeposit": 15000,
    "insuranceClause": "Service Provider shall maintain professional liability insurance with a minimum coverage of $2,000,000",
    "limitationOfLiability": 150000,
    "confidentialityClause": "Both parties agree to maintain the confidentiality of all proprietary information shared during the term of this agreement",
    "indemnityClause": "Service Provider agrees to indemnify and hold harmless Client from any claims arising from the services provided",
    "nonCompeteClause": "Service Provider agrees not to provide similar services to Client's direct competitors for a period of 12 months after contract termination"
  }
}

Authorizations

Authorization
string
header
required

Our API offers authentication via API keys. You can obtain an API key from https://developer.abbyy.com

Path Parameters

documentId
string
required

The id of the document

Response

200
application/json

Extracted Basic Contract Data Response

meta
object
required

Represents a document that has been submitted for processing.

Example:
{
  "id": "wh23anb5xjf0ntw5taase5qz",
  "name": "document.jpg",
  "createdAt": "2025-02-07T17:44:06.949Z",
  "model": "image-to-text",
  "status": "Processed",
  "pageCount": 10,
  "errors": [{ "message": "Total is required" }]
}
fields
object

Fields extracted from a basic contract

Example:
{
  "title": "Software Development Service Agreement",
  "party": [
    {
      "organizationName": "Tech Solutions Inc",
      "personName": "John Smith",
      "role": "Service Provider",
      "address": "123 Tech Park, San Francisco, CA 94105"
    },
    {
      "organizationName": "Global Enterprises Ltd",
      "personName": "Sarah Johnson",
      "role": "Client",
      "address": "456 Business Ave, New York, NY 10001"
    }
  ],
  "dealAmount": 150000,
  "agreementDate": "2024-03-15",
  "effectiveDate": "2024-04-01",
  "expirationDate": "2025-03-31",
  "initialTerm": "12 months",
  "renewalTerm": "12 months",
  "governingLaw": "California",
  "securityDeposit": 15000,
  "insuranceClause": "Service Provider shall maintain professional liability insurance with a minimum coverage of $2,000,000",
  "limitationOfLiability": 150000,
  "confidentialityClause": "Both parties agree to maintain the confidentiality of all proprietary information shared during the term of this agreement",
  "indemnityClause": "Service Provider agrees to indemnify and hold harmless Client from any claims arising from the services provided",
  "nonCompeteClause": "Service Provider agrees not to provide similar services to Client's direct competitors for a period of 12 months after contract termination"
}
validationErrors
object[]

An array of validation errors that occurred while processing the document. These typically do not prevent field extraction, but rather indicate issues extracting key fields.