> ## 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.

# Get entity Serasa source snapshots



## OpenAPI

````yaml /api-reference/openapi.json get /v2/entities/{id}/serasa
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/entities/{id}/serasa:
    get:
      tags:
        - entities
      summary: Get entity Serasa source snapshots
      operationId: entities_get_serasa
      parameters:
        - name: id
          required: true
          in: path
          description: CPF, CNPJ, or company id (cmp_*)
          schema:
            type: string
        - name: page_size
          required: false
          in: query
          description: Maximum number of domain snapshots to return
          schema:
            type: number
        - name: asOf
          required: false
          in: query
          description: Data de referência (YYYY-MM-DD)
          schema:
            type: string
        - name: fields
          required: false
          in: query
          description: >-
            Comma-separated optional response fields. Supports "summary.short",
            "summary.long", and "summary.mdx". Without summary.* the
            metadata.summary field is omitted.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntitySerasaOutput'
components:
  schemas:
    EntitySerasaOutput:
      type: object
      properties:
        object:
          type: string
          description: Object type identifier
          default: list
        results:
          type: array
          description: Array of results for current page
          items:
            $ref: '#/components/schemas/EntitySerasaCrednetRecordOutput'
        next_cursor:
          type: string
          description: Opaque cursor for next page. null if no more results.
          nullable: true
        has_more:
          type: boolean
          description: Whether more results exist beyond this page
        type:
          type: string
          description: Type of results (Notion-compatible)
        metadata:
          $ref: '#/components/schemas/EntityDomainMetadataOutput'
      required:
        - object
        - results
        - has_more
        - metadata
    EntitySerasaCrednetRecordOutput:
      type: object
      properties:
        sourceDataset:
          type: string
          example: serasa_relato
        observedAt:
          type: string
          example: '2026-05-08T12:30:00.000Z'
        data:
          $ref: '#/components/schemas/EntitySerasaCrednetDataOutput'
      required:
        - sourceDataset
        - observedAt
        - data
    EntityDomainMetadataOutput:
      type: object
      properties:
        status:
          type: string
          enum:
            - NOT_QUERIED
            - QUERY_SUCCEEDED
            - QUERY_OUTDATED
            - QUERY_FAILED
            - QUERY_PARTIALLY_SUCCEEDED
        summary:
          description: >-
            Rendered domain summary markdown or MDX when requested via
            ?fields=summary.short, summary.long, and/or summary.mdx. Single
            format → string. Multiple formats → object { short, long, mdx }.
          oneOf:
            - type: string
            - type: object
              properties:
                short:
                  type: string
                long:
                  type: string
                mdx:
                  type: string
        provenance:
          $ref: '#/components/schemas/EntityDomainProvenanceOutput'
      required:
        - status
        - provenance
    EntitySerasaCrednetDataOutput:
      type: object
      properties:
        status:
          type: boolean
        message:
          type: string
          nullable: true
        total_occurrences:
          type: number
        total_occurrences_value:
          oneOf:
            - type: string
            - type: number
          nullable: true
        cadastral_summary:
          $ref: '#/components/schemas/EntitySerasaCadastralSummaryOutput'
        financial_pending:
          $ref: '#/components/schemas/EntitySerasaRestrictionGroupOutput'
        internal_pending:
          $ref: '#/components/schemas/EntitySerasaRestrictionGroupOutput'
        collections:
          $ref: '#/components/schemas/EntitySerasaRestrictionGroupOutput'
        bacen_pending:
          $ref: '#/components/schemas/EntitySerasaCheckGroupOutput'
        protests:
          $ref: '#/components/schemas/EntitySerasaPublicRecordGroupOutput'
        lawsuits:
          $ref: '#/components/schemas/EntitySerasaPublicRecordGroupOutput'
        bankruptcies:
          $ref: '#/components/schemas/EntitySerasaPublicRecordGroupOutput'
        document_alerts:
          $ref: '#/components/schemas/EntitySerasaDocumentAlertsOutput'
        risk_score:
          $ref: '#/components/schemas/EntitySerasaScoreOutput'
        inquiries:
          $ref: '#/components/schemas/EntitySerasaInquiriesOutput'
        commercial_payment_history:
          $ref: '#/components/schemas/EntitySerasaCommercialPaymentHistoryOutput'
    EntityDomainProvenanceOutput:
      type: object
      properties:
        datasets:
          type: array
          items:
            $ref: '#/components/schemas/EntityDatasetProvenanceOutput'
      required:
        - datasets
    EntitySerasaCadastralSummaryOutput:
      type: object
      properties:
        name:
          type: string
          nullable: true
        document:
          type: string
          nullable: true
        rfb_status:
          type: string
          nullable: true
        rfb_status_description:
          type: string
          nullable: true
        update_date:
          type: string
          nullable: true
        company_alias:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        company_url:
          type: string
          nullable: true
        partnership:
          type: string
          nullable: true
        company_register:
          type: string
          nullable: true
        company_register_date:
          type: string
          nullable: true
        company_foundation:
          type: string
          nullable: true
        number_employees:
          type: number
          nullable: true
        tax_option:
          type: string
          nullable: true
        economic_activity:
          type: string
          nullable: true
        import_purchases:
          oneOf:
            - type: string
            - type: number
          nullable: true
        export_sales:
          oneOf:
            - type: string
            - type: number
          nullable: true
        cnae:
          type: string
          nullable: true
        serasa_active_code:
          type: string
          nullable: true
        branch_offices:
          type: string
          nullable: true
        nire_number:
          type: string
          nullable: true
        legal_nature_code:
          type: string
          nullable: true
    EntitySerasaRestrictionGroupOutput:
      type: object
      properties:
        message:
          type: string
          nullable: true
        total_occurrences:
          type: number
        newest_occurrence:
          type: string
          nullable: true
        oldest_occurrence:
          type: string
          nullable: true
        total_occurrences_value:
          oneOf:
            - type: string
            - type: number
          nullable: true
        financial_pending_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaRestrictionDetailOutput'
        internal_pending_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaRestrictionDetailOutput'
        collection_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaRestrictionDetailOutput'
    EntitySerasaCheckGroupOutput:
      type: object
      properties:
        message:
          type: string
          nullable: true
        total_occurrences:
          type: number
        newest_occurrence:
          type: string
          nullable: true
        oldest_occurrence:
          type: string
          nullable: true
        total_occurrences_value:
          oneOf:
            - type: string
            - type: number
          nullable: true
        bacen_pending_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaCheckDetailOutput'
    EntitySerasaPublicRecordGroupOutput:
      type: object
      properties:
        message:
          type: string
          nullable: true
        total_occurrences:
          type: number
        newest_occurrence:
          type: string
          nullable: true
        oldest_occurrence:
          type: string
          nullable: true
        total_occurrences_value:
          oneOf:
            - type: string
            - type: number
          nullable: true
        protest_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaPublicRecordDetailOutput'
        lawsuit_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaPublicRecordDetailOutput'
        bankruptcy_details:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaPublicRecordDetailOutput'
    EntitySerasaDocumentAlertsOutput:
      type: object
      properties:
        message:
          type: string
          nullable: true
        total_messages:
          type: string
          nullable: true
        contact_phones:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaDocumentAlertContactOutput'
        document_type:
          type: string
          nullable: true
        document_number:
          type: string
          nullable: true
        occurrence_reason:
          type: string
          nullable: true
        occurrence_date:
          type: string
          nullable: true
    EntitySerasaScoreOutput:
      type: object
      properties:
        pessoa_juridica:
          $ref: '#/components/schemas/EntitySerasaCompanyScoreOutput'
    EntitySerasaInquiriesOutput:
      type: object
      properties:
        actual:
          type: number
          nullable: true
        historical:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaInquiryHistoryOutput'
    EntitySerasaCommercialPaymentHistoryOutput:
      type: object
      properties:
        titles_quantity:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaRangeBucketOutput'
        months:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaPaymentMonthOutput'
        average_delay_periods:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaRangeBucketOutput'
        main_suppliers_last_update_date:
          type: string
          nullable: true
        main_suppliers:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaSupplierOutput'
        relationship_suppliers_last_update_date:
          type: string
          nullable: true
        relationship_suppliers_periods:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaSupplierRelationshipOutput'
        relationship_suppliers_summary:
          $ref: '#/components/schemas/EntitySerasaSupplierRelationshipSummaryOutput'
        evolution_commitments_last_update_date:
          type: string
          nullable: true
        evolution_commitments:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaCommitmentEvolutionOutput'
        business_references_last_update_date:
          type: string
          nullable: true
        business_references:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaBusinessReferenceOutput'
        segment_description:
          type: string
          nullable: true
    EntityDatasetProvenanceOutput:
      type: object
      properties:
        queryId:
          type: string
          nullable: true
        datasetSlug:
          type: string
        requirement:
          type: string
          enum:
            - required
            - optional
        visible:
          type: boolean
        onRefresh:
          type: boolean
        sourcePriority:
          type: number
        observedAt:
          type: string
          nullable: true
        recordedAt:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - NOT_QUERIED
            - QUERY_SUCCEEDED
            - QUERY_OUTDATED
            - QUERY_FAILED
            - QUERY_PARTIALLY_SUCCEEDED
        errorCode:
          type: string
          enum:
            - upstream_error
            - upstream_unauthorized
            - upstream_not_found
            - upstream_rate_limit
            - upstream_invalid_request
            - upstream_unavailable
            - upstream_timeout
            - upstream_invalid_response
            - mock_response_missing
            - provider_execution_failed
            - query_persistence_failed
            - workflow_failed
          nullable: true
      required:
        - datasetSlug
        - requirement
        - visible
        - onRefresh
        - sourcePriority
        - status
    EntitySerasaRestrictionDetailOutput:
      type: object
      properties:
        value:
          oneOf:
            - type: string
            - type: number
          nullable: true
        origin:
          type: string
          nullable: true
        acronym:
          type: string
          nullable: true
        contract:
          type: string
          nullable: true
        modality:
          type: string
          nullable: true
        cadus:
          type: string
          nullable: true
        guarantor:
          type: string
          nullable: true
        under_judge:
          type: string
          nullable: true
        occurrence_date:
          type: string
          nullable: true
        annotation_type:
          type: string
          nullable: true
        annotation_type_description:
          type: string
          nullable: true
    EntitySerasaCheckDetailOutput:
      type: object
      properties:
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        agency:
          type: string
          nullable: true
        bank_code:
          type: string
          nullable: true
        bank_name:
          type: string
          nullable: true
        check_line:
          type: string
          nullable: true
        check_number:
          type: string
          nullable: true
        occurrence_date:
          type: string
          nullable: true
        bank_ccf_quantity:
          oneOf:
            - type: string
            - type: number
          nullable: true
    EntitySerasaPublicRecordDetailOutput:
      type: object
      properties:
        value:
          oneOf:
            - type: string
            - type: number
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        notary:
          type: string
          nullable: true
        occurrence_date:
          type: string
          nullable: true
        annotation_type:
          type: string
          nullable: true
        annotation_type_description:
          type: string
          nullable: true
    EntitySerasaDocumentAlertContactOutput:
      type: object
      properties:
        phone:
          oneOf:
            - type: string
            - type: number
          nullable: true
    EntitySerasaCompanyScoreOutput:
      type: object
      properties:
        pontuacao:
          type: number
          nullable: true
        modelo:
          type: string
          nullable: true
        faixa:
          type: string
          nullable: true
        probabilidade_inadimplencia:
          type: number
          nullable: true
        codigo_mensagem:
          type: number
          nullable: true
        mensagem:
          type: string
          nullable: true
    EntitySerasaInquiryHistoryOutput:
      type: object
      properties:
        inquiry_date:
          type: string
          nullable: true
        occurrences:
          type: number
          nullable: true
    EntitySerasaRangeBucketOutput:
      type: object
      properties:
        range_code:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        range:
          type: string
          nullable: true
        range_value_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        range_value_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
        percentage:
          type: string
          nullable: true
        percentage_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        percentage_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
    EntitySerasaPaymentMonthOutput:
      type: object
      properties:
        month:
          type: string
          nullable: true
        period_list:
          type: array
          items:
            $ref: '#/components/schemas/EntitySerasaRangeBucketOutput'
    EntitySerasaSupplierOutput:
      type: object
      properties:
        supplier_name:
          type: string
          nullable: true
        supplier_document:
          type: string
          nullable: true
    EntitySerasaSupplierRelationshipOutput:
      type: object
      properties:
        relationship_period_description:
          type: string
          nullable: true
        relationship_source_quantity:
          type: number
          nullable: true
    EntitySerasaSupplierRelationshipSummaryOutput:
      type: object
      properties:
        sources_total:
          type: number
          nullable: true
        payment_history_sources:
          type: number
          nullable: true
        payment_history_values_sources:
          type: number
          nullable: true
        evolution_commitments_sources:
          type: number
          nullable: true
        business_references_sources:
          type: number
          nullable: true
        spot_payment_business_references_sources:
          type: number
          nullable: true
    EntitySerasaCommitmentEvolutionOutput:
      type: object
      properties:
        year_commitment:
          type: string
          nullable: true
        month_commitment:
          type: string
          nullable: true
        description_month_commitment:
          type: string
          nullable: true
        expired_track_description:
          type: string
          nullable: true
        value_overdue_commitments_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        value_overdue_commitments_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
        track_description_to_expire:
          type: string
          nullable: true
        value_commitments_due_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        value_commitments_due_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
        total_month_range_description:
          type: string
          nullable: true
        total_monthly_range_value_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        total_monthly_range_value_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
        segment_information:
          type: string
          nullable: true
    EntitySerasaBusinessReferenceOutput:
      type: object
      properties:
        business_description:
          type: string
          nullable: true
        year_potential_date:
          type: string
          nullable: true
        month_potential_date:
          type: string
          nullable: true
        potential_value_range_description:
          type: string
          nullable: true
        potential_value_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        potential_value_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
        potential_midrange_description:
          type: string
          nullable: true
        potential_midrange_value_from:
          oneOf:
            - type: string
            - type: number
          nullable: true
        potential_midrange_value_to:
          oneOf:
            - type: string
            - type: number
          nullable: true
  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

````