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

# History of SCR snapshots for a company, newest first



## OpenAPI

````yaml /api-reference/openapi.json get /v2/scr/company/{document}/history
openapi: 3.1.0
info:
  title: Base39 API
  description: Base39 API
  version: 1.0.0
  contact:
    name: Base39 Team
    url: https://base39.com.br
    email: suporte@base39.com.br
  termsOfService: https://base39.com.br/termos
  license:
    name: Proprietary
    url: https://base39.com.br/termos
servers:
  - url: http://localhost:3000
    description: Local
  - url: https://api.dev.base39.cloud
    description: Development
  - url: https://api.base39.com.br
    description: Production
security:
  - OAuth2: []
tags:
  - name: pages
    description: Profiles and reports pages
  - name: pipelines
    description: Pipeline boards (kanban) of pages
  - name: blocks
    description: Blocks operations
  - name: search
    description: Search across content
  - name: targets
    description: Lookup targets via datasets
  - name: CognitoTriggers
    description: Cognito triggers
paths:
  /v2/scr/company/{document}/history:
    get:
      tags:
        - scr
      summary: History of SCR snapshots for a company, newest first
      operationId: scr_company_history
      parameters:
        - name: document
          required: true
          in: path
          description: CNPJ (14 chars, formatting stripped server-side)
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Quantidade de snapshots (meses). Padrão 12, máximo 120.
          schema:
            default: 12
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrHistoryOutput'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsDto'
        '401':
          description: ''
components:
  schemas:
    ScrHistoryOutput:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ScrSnapshotOutput'
      required:
        - results
    ProblemDetailsDto:
      type: object
      properties:
        type:
          type: string
          example: about:blank
        title:
          type: string
          example: Not Found
        status:
          type: number
          example: 404
        detail:
          type: string
          example: Protests not found for document
        instance:
          type: string
          example: /v2/entities/61969404000182/protests
        request_id:
          type: string
          example: req_123
      required:
        - type
        - title
        - status
        - detail
        - instance
        - request_id
    ScrSnapshotOutput:
      type: object
      properties:
        entityType:
          type: string
          enum:
            - company
            - person
        entityDocument:
          type: string
        referenceDate:
          type: string
          description: Mês-base Bacen no formato `YYYY-MM`.
        clientCode:
          type: string
          nullable: true
        relationshipStartDate:
          type: string
          nullable: true
        institutionCount:
          type: number
          nullable: true
        operationCount:
          type: number
          nullable: true
        disputedOperationCount:
          type: number
          nullable: true
        subJudiceOperationCount:
          type: number
          nullable: true
        coobrigationAssumed:
          type: number
          nullable: true
        coobrigationReceived:
          type: number
          nullable: true
        noData:
          type: boolean
        noDataMessage:
          type: string
          nullable: true
        portfolioDueAmount:
          type: number
          nullable: true
        portfolioOverdueAmount:
          type: number
          nullable: true
        lossAmount:
          type: number
          nullable: true
        creditPortfolioAmount:
          type: number
          nullable: true
        coobligationsAmount:
          type: number
          nullable: true
        totalResponsibilityAmount:
          type: number
          nullable: true
        creditsToReleaseAmount:
          type: number
          nullable: true
        creditLimitsAmount:
          type: number
          nullable: true
        totalRiskAmount:
          type: number
          nullable: true
        sourceDataset:
          type: string
          nullable: true
        asOf:
          type: string
          nullable: true
          description: ISO timestamp da última observação que produziu este snapshot.
        operations:
          type: array
          items:
            $ref: '#/components/schemas/ScrOperationOutput'
      required:
        - entityType
        - entityDocument
        - referenceDate
        - noData
        - operations
    ScrOperationOutput:
      type: object
      properties:
        modality:
          type: string
          description: 'Código Bacen da modalidade (ex.: "0215").'
        modalityDescription:
          type: string
          nullable: true
          description: >-
            Descrição oficial Bacen da modalidade. `null` quando o código não
            está no dicionário canônico.
        modalityGroupId:
          type: string
          nullable: true
          description: '`group_id` Bacen da modalidade (ex.: "02").'
        modalityGroupName:
          type: string
          nullable: true
          description: 'Nome do grupo Bacen (ex.: "Empréstimos").'
        forexVariation:
          type: string
          nullable: true
          description: '`variacao_cambial` upstream ("S"/"N").'
        maturityCode:
          type: string
          description: Código de vencimento normalizado (`v110`, `v210`, `v330`, ...).
        value:
          type: number
          nullable: true
      required:
        - modality
        - maturityCode
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://id.local.base39.cloud/oauth2/authorize
          tokenUrl: https://id.local.base39.cloud/oauth2/token
          scopes:
            profile: Read user profile
            email: Read user email
            openid: OpenID authentication
      description: OAuth2 Authorization Code flow

````