GET
/
v1-preview
/
models
/
brokerage-statement
/
{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.brokerage_statement.get_extracted_fields(document_id="wh23anb5xjf0ntw5taase5qz")

    assert res.brokerage_statement is not None

    # Handle response
    print(res.brokerage_statement)
{
  "meta": {
    "id": "wh23anb5xjf0ntw5taase5qz",
    "name": "document.jpg",
    "createdAt": "2025-02-07T17:44:06.949Z",
    "model": "brokerage-statement",
    "status": "Processed",
    "pageCount": 10,
    "errors": [
      {
        "message": "Total is required"
      }
    ]
  },
  "fields": {
    "accountNumber": "ACC123456789",
    "broker": {
      "name": "Goldman Sachs & Co. LLC",
      "address": "200 West Street, New York, NY 10282",
      "phoneNumber": "+1 (212) 902-1000"
    },
    "advisor": [
      {
        "name": "John Smith",
        "phoneNumber": "+1 (212) 902-1234",
        "address": "200 West Street, New York, NY 10282"
      }
    ],
    "client": {
      "name": "Jane Doe",
      "address": "123 Main Street, New York, NY 10001",
      "phoneNumber": "+1 (212) 555-0123"
    },
    "statementStartDate": "2024-02-01",
    "statementEndDate": "2024-02-29",
    "statementPeriod": "February 2024",
    "totalPortfolioValue": 1500000,
    "baseCurrency": "USD",
    "holdingsLevel": [
      {
        "accountType": "Individual",
        "assetClass": "Equity",
        "description": "Apple Inc. Common Stock",
        "symbol": "AAPL",
        "cusip": "037833100",
        "quantity": 100,
        "price": 175.5,
        "priceAsOfDate": "2024-02-29",
        "currency": "USD",
        "marketValue": 17550,
        "priorMarketValue": 17000,
        "costBasis": 15000,
        "accruedValue": 2550,
        "estimatedIncome": 100,
        "estimatedYield": 0.57,
        "currentYield": 0.55
      }
    ],
    "transactions": [
      {
        "tradeDate": "2/15",
        "settlementDate": "2/17",
        "accountType": "Individual",
        "transactionTypeLevel1": "Buy",
        "transactionTypeLevel2": "Market Order",
        "transactionType": "Stock Purchase",
        "description": "Purchase of 50 shares of AAPL",
        "symbol": "AAPL",
        "quantity": 50,
        "price": 175.25,
        "currency": "USD",
        "amount": 8762.5,
        "taxableAmount": 0,
        "nonTaxableAmount": 0,
        "pendingStatus": "Completed"
      }
    ]
  }
}

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 Brokerage Statement 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 brokerage statement

Example:
{
  "accountNumber": "ACC123456789",
  "broker": {
    "name": "Goldman Sachs & Co. LLC",
    "address": "200 West Street, New York, NY 10282",
    "phoneNumber": "+1 (212) 902-1000"
  },
  "advisor": [
    {
      "name": "John Smith",
      "phoneNumber": "+1 (212) 902-1234",
      "address": "200 West Street, New York, NY 10282"
    }
  ],
  "client": {
    "name": "Jane Doe",
    "address": "123 Main Street, New York, NY 10001",
    "phoneNumber": "+1 (212) 555-0123"
  },
  "statementStartDate": "2024-02-01",
  "statementEndDate": "2024-02-29",
  "statementPeriod": "February 2024",
  "totalPortfolioValue": 1500000,
  "baseCurrency": "USD",
  "holdingsLevel": [
    {
      "accountType": "Individual",
      "assetClass": "Equity",
      "description": "Apple Inc. Common Stock",
      "symbol": "AAPL",
      "cusip": "037833100",
      "quantity": 100,
      "price": 175.5,
      "priceAsOfDate": "2024-02-29",
      "currency": "USD",
      "marketValue": 17550,
      "priorMarketValue": 17000,
      "costBasis": 15000,
      "accruedValue": 2550,
      "estimatedIncome": 100,
      "estimatedYield": 0.57,
      "currentYield": 0.55
    }
  ],
  "transactions": [
    {
      "tradeDate": "2/15",
      "settlementDate": "2/17",
      "accountType": "Individual",
      "transactionTypeLevel1": "Buy",
      "transactionTypeLevel2": "Market Order",
      "transactionType": "Stock Purchase",
      "description": "Purchase of 50 shares of AAPL",
      "symbol": "AAPL",
      "quantity": 50,
      "price": 175.25,
      "currency": "USD",
      "amount": 8762.5,
      "taxableAmount": 0,
      "nonTaxableAmount": 0,
      "pendingStatus": "Completed"
    }
  ]
}
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.