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

# Get DBT scores for current user's portfolio

> Retrieves monthly Days Beyond Terms (DBT) trends across portfolio businesses.

<Note>
  Use the [**<u>Login</u>**<u> endpoint</u>](/api-reference/user/logs-a-user-in) to retrieve the **`SessionKey`**, then include it in the **Authorization** field for authentication.
</Note>


## OpenAPI

````yaml get /v1/Portfolio/DBTScoreHistory
openapi: 3.0.0
info:
  version: v2
  title: Credit Risk Monitor API
servers:
  - url: https://api.creditriskmonitor.com
security: []
paths:
  /v1/Portfolio/DBTScoreHistory:
    get:
      tags:
        - Portfolio
      summary: >-
        Gets the Monthly DBT Scores for Businesses in the current user's
        portfolio
      operationId: Portfolio_GetDBTScoreHistory
      parameters:
        - name: StartDate
          in: query
          description: Start Date for score calculations
          required: false
          schema:
            type: string
            format: date-time
        - name: EndDate
          in: query
          description: End Date for score calculations
          required: false
          schema:
            type: string
            format: date-time
        - name: FirstRow
          in: query
          description: The First Row to display
          required: false
          schema:
            format: int32
            type: integer
        - name: LastRow
          in: query
          description: The Last Row to dispaly
          required: false
          schema:
            format: int32
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/APIResponseContainer_APIPortfolioScoreHistoryCollection_
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/APIResponseContainer_APIPortfolioScoreHistoryCollection_
            text/html:
              schema:
                $ref: >-
                  #/components/schemas/APIResponseContainer_APIPortfolioScoreHistoryCollection_
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/APIResponseContainer_APIPortfolioScoreHistoryCollection_
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/APIResponseContainer_APIPortfolioScoreHistoryCollection_
      security:
        - Bearer: []
components:
  schemas:
    APIResponseContainer_APIPortfolioScoreHistoryCollection_:
      description: ''
      type: object
      properties:
        Success:
          description: ''
          type: boolean
        Data:
          $ref: '#/components/schemas/APIPortfolioScoreHistoryCollection'
        ErrorCode:
          description: ''
          type: string
    APIPortfolioScoreHistoryCollection:
      type: object
      properties:
        TotalResults:
          format: int32
          description: Total number of results
          type: integer
        ScoreType:
          description: The score type
          type: string
        Businesses:
          description: Businesses with scores
          type: array
          items:
            $ref: '#/components/schemas/APIPortfolioScoreHistory'
    APIPortfolioScoreHistory:
      type: object
      properties:
        BusinessId:
          format: int32
          description: Business Id
          type: integer
        BusinessName:
          description: Business Name
          type: string
        Scores:
          description: Scores
          type: array
          items:
            $ref: '#/components/schemas/APIPortfolioScore'
    APIPortfolioScore:
      type: object
      properties:
        Year:
          format: int32
          description: Year of the score
          type: integer
        Month:
          format: int32
          description: Month of the score
          type: integer
        Score:
          format: double
          description: Score value
          type: number
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: >-
        Enter the Session Key with the `Bearer ` prefix, e.g. "Bearer
        abcde12345".

````