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

# Get an account

> Richer per-account snapshot than GET /accounts. Includes restored balance fields, audit timestamps, additional payment terms, plus nested `contract` (originated-loan facts) and `borrower` (primary borrower Party + Person subtype) blocks. Returns 404 if the account isn't in the calling key's organization allowlist.



## OpenAPI

````yaml /api-reference/external_api.openapi.json get /accounts/{account_id}
openapi: 3.1.0
info:
  title: Monterey External Reporting API
  description: >-
    Org-scoped, API-key-authenticated reporting endpoints for Monterey Financial
    clients.
  version: 0.1.0
servers:
  - url: https://api.montereyfinancial.app
    description: Production
security:
  - BearerApiKey: []
paths:
  /accounts/{account_id}:
    get:
      tags:
        - Accounts
      summary: Get an account
      description: >-
        Richer per-account snapshot than GET /accounts. Includes restored
        balance fields, audit timestamps, additional payment terms, plus nested
        `contract` (originated-loan facts) and `borrower` (primary borrower
        Party + Person subtype) blocks. Returns 404 if the account isn't in the
        calling key's organization allowlist.
      operationId: get_account_accounts__account_id__get
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetailRow'
        '401':
          description: Missing or invalid API key.
        '403':
          description: organization_id outside the key's allowlist.
        '404':
          description: Resource not in scope or does not exist.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerApiKey: []
components:
  schemas:
    AccountDetailRow:
      properties:
        id:
          type: string
          title: Id
        organization_id:
          type: string
          title: Organization Id
          description: >-
            The organization the account belongs to. Same value on every row for
            that organization.
        contract_id:
          type: string
          title: Contract Id
        primary_borrower_party_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Primary Borrower Party Id
          description: The person who is the primary borrower on this account.
        external_account_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: External Account Number
          description: >-
            Account number assigned by the source loan management system. Stable
            for the account's lifetime; useful for cross-referencing LMS-side
            exports.
        external_contract_number:
          anyOf:
            - type: string
            - type: 'null'
          title: External Contract Number
          description: >-
            Contract identifier you/your systems pass to Monterey at account
            creation — the canonical join key back to your systems.
        status_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Code
          description: >-
            Short code for the account's current status (e.g. OPEN, CHARGED_OFF,
            PAID_IN_FULL).
        current_balance_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Current Balance Cents
          description: Current outstanding balance in integer cents.
        past_due_amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Past Due Amount Cents
          description: Amount past due in integer cents.
        payoff_amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Payoff Amount Cents
          description: Amount required to pay off the account in full, in integer cents.
        payment_amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Payment Amount Cents
          description: Scheduled per-period payment amount in integer cents.
        payment_frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Frequency
          description: Cadence of scheduled payments (e.g. 'monthly', 'biweekly').
        last_payment_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Last Payment At
          description: Date of the most recent payment received.
        next_payment_due_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Next Payment Due At
          description: Due date of the next scheduled payment.
        payments_made:
          anyOf:
            - type: integer
            - type: 'null'
          title: Payments Made
        interest_rate_bps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Interest Rate Bps
          description: >-
            Annual interest rate in basis points; divide by 10000 for the
            decimal rate.
        apr_bps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Apr Bps
          description: >-
            Annual percentage rate in basis points; divide by 10000 for the
            decimal rate.
        interest_start_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Interest Start At
        days_past_due_30:
          anyOf:
            - type: integer
            - type: 'null'
          title: Days Past Due 30
          description: >-
            Days the account has spent in the 1–30 days-past-due delinquency
            bucket.
        days_past_due_60:
          anyOf:
            - type: integer
            - type: 'null'
          title: Days Past Due 60
          description: >-
            Days the account has spent in the 31–60 days-past-due delinquency
            bucket.
        days_past_due_90:
          anyOf:
            - type: integer
            - type: 'null'
          title: Days Past Due 90
          description: >-
            Days the account has spent in the 61–90 days-past-due delinquency
            bucket.
        nsf_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Nsf Count
          description: Number of non-sufficient-funds (NSF) events on this account.
        opened_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Opened At
          description: Date the account was opened / activated.
        closed_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Closed At
          description: Date the account was closed. Null if still open.
        accrued_interest_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Accrued Interest Cents
          description: Accrued but not yet billed interest, in integer cents.
        accrued_late_charge_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Accrued Late Charge Cents
          description: Accrued late charges not yet billed, in integer cents.
        last_payment_amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Payment Amount Cents
          description: Amount of the most recent payment, in integer cents.
        first_payment_made_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: First Payment Made At
          description: Date of the first payment received on this account.
        final_payment_amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Final Payment Amount Cents
          description: Scheduled final (balloon) payment amount, in integer cents.
        last_extension_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Last Extension At
          description: Date of the most recent term extension granted on this account.
        interest_base_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Interest Base Days
          description: Day-count convention used for interest accrual (e.g. 360 or 365).
        over_short_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Over Short Cents
          description: Over/short adjustment balance in integer cents.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        contract:
          $ref: '#/components/schemas/ContractSummary'
        borrower:
          anyOf:
            - $ref: '#/components/schemas/BorrowerSummary'
            - type: 'null'
          description: Null if no primary borrower is recorded on the account.
        co_borrowers:
          items:
            $ref: '#/components/schemas/CoBorrowerSummary'
          type: array
          title: Co Borrowers
          description: >-
            Active non-primary parties on the account (co-borrowers, co-signers,
            guarantors). Empty list if none.
      type: object
      required:
        - id
        - organization_id
        - contract_id
        - created_at
        - updated_at
        - contract
      title: AccountDetailRow
      description: |-
        Richer per-account snapshot for GET /accounts/{id}. Extends
        AccountRow with restored balance/payment fields, audit timestamps,
        additional account terms, and nested contract + borrower blocks.
      examples:
        - apr_bps: 2142
          contract_id: 01J7XY1W2V3U4T5S6R7Q8P9N0M
          current_balance_cents: 845000
          days_past_due_30: 0
          days_past_due_60: 0
          days_past_due_90: 0
          external_account_number: 1004782
          external_contract_number: CTR-2023-00441
          id: 01J9ZQ8H7Z3K8M4N5P6Q7R8S9T
          interest_rate_bps: 1999
          last_payment_at: '2026-04-15'
          next_payment_due_at: '2026-05-15'
          nsf_count: 1
          opened_at: '2024-11-01'
          organization_id: 01J8AB2C3D4E5F6G7H8J9K0L1M
          past_due_amount_cents: 0
          payment_amount_cents: 25000
          payment_frequency: monthly
          payments_made: 18
          payoff_amount_cents: 851200
          primary_borrower_party_id: 01J6WV0U1T2S3R4Q5P6N7M8L9K
          status_code: OPEN
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: >-
        Parameter-validation error (HTTP 422). `detail` lists each violated
        constraint with its location, message, and type.
    ContractSummary:
      properties:
        id:
          type: string
          title: Id
        cash_price_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cash Price Cents
        original_term:
          anyOf:
            - type: integer
            - type: 'null'
          title: Original Term
          description: Original number of payment periods.
        original_payment_amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Original Payment Amount Cents
        original_interest_rate_bps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Original Interest Rate Bps
        original_apr_bps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Original Apr Bps
        originated_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Originated At
        first_payment_due_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: First Payment Due At
      type: object
      required:
        - id
      title: ContractSummary
      description: Originated-loan facts. Returned nested on AccountDetailRow.
    BorrowerSummary:
      properties:
        party_id:
          type: string
          title: Party Id
        display_name:
          type: string
          title: Display Name
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        date_of_birth:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Of Birth
        ssn_last_four:
          anyOf:
            - type: string
            - type: 'null'
          title: Ssn Last Four
      type: object
      required:
        - party_id
        - display_name
      title: BorrowerSummary
      description: |-
        Primary borrower identity block. Returned nested on AccountDetailRow
        when the account has a primary borrower on file.
    CoBorrowerSummary:
      properties:
        party_id:
          type: string
          title: Party Id
        display_name:
          type: string
          title: Display Name
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        date_of_birth:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Of Birth
        ssn_last_four:
          anyOf:
            - type: string
            - type: 'null'
          title: Ssn Last Four
        role:
          type: string
          title: Role
          description: >-
            The party's role on the account, e.g. 'co_borrower', 'co_signer',
            'guarantor'.
      type: object
      required:
        - party_id
        - display_name
        - role
      title: CoBorrowerSummary
      description: >-
        A non-primary party on an account (co-borrower, co-signer, or

        guarantor). Same identity fields as BorrowerSummary plus the role
        string.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      description: >-
        A single parameter-validation failure: `loc` is the path to the
        offending input, `msg` is human-readable, and `type` is the rule that
        failed.
  securitySchemes:
    BearerApiKey:
      type: http
      description: Static API key issued via the client portal. Treat it like a password.
      scheme: bearer
      bearerFormat: ApiKey

````