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

# Get Credit Reports



## OpenAPI

````yaml Commerce get /creditreports
openapi: 3.1.0
info:
  title: Commerce
  version: '3.0'
  contact:
    email: samuel@driv.ly
    name: Samuel Lippert
    url: https://driv.ly/
  description: Drivly Commerce API
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /creditreports:
    parameters:
      - schema:
          type: integer
        name: depth
        in: query
        required: false
        description: The number of levels of related objects to include in the response
    get:
      summary: Get Credit Reports
      operationId: get-creditreports-list
      parameters:
        - schema:
            type: string
          in: query
          name: sort
          description: >-
            Pass the name of a top-level field to sort by that field in
            ascending order. Prefix the name of the field with a minus symbol
            ("-") to sort in descending order.
        - schema:
            type: number
          in: query
          name: limit
          description: Limit number of results, default 10
        - schema:
            $ref: '#/components/schemas/WhereCreditReport'
          in: query
          name: where
          description: >-
            Search for results fitting criteria, uses qs library for query
            string parsing
      responses:
        '200':
          description: Credit Reports Found
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/CreditReport'
                      success:
                        type: boolean
                  - $ref: '#/components/schemas/ListModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 401
                      message: Unauthorized
                    success: false
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 429
                      message: Too Many Requests
                    success: false
components:
  schemas:
    WhereCreditReport:
      type: object
      properties:
        and:
          type: array
          items:
            $ref: '#/components/schemas/WhereCreditReport'
        or:
          type: array
          items:
            $ref: '#/components/schemas/WhereCreditReport'
        id:
          type: object
          properties:
            equals:
              type: string
              description: The value must be exactly equal.
            not_equals:
              type: string
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        creditScore:
          type: object
          properties:
            equals:
              type: number
              description: The value must be exactly equal.
            not_equals:
              type: number
              description: >-
                The query will return all documents where the value is not
                equal.
            greater_than:
              type: number
              description: The value must be greater than.
            greater_than_equal:
              type: number
              description: The value must be greater than or equal.
            less_than:
              type: number
              description: The value must be less than.
            less_than_equal:
              type: number
              description: The value must be less than or equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        time:
          type: object
          properties:
            equals:
              type: string
              description: The value must be exactly equal.
            not_equals:
              type: string
              description: >-
                The query will return all documents where the value is not
                equal.
            greater_than:
              type: string
              description: The value must be greater than.
            greater_than_equal:
              type: string
              description: The value must be greater than or equal.
            less_than:
              type: string
              description: The value must be less than.
            less_than_equal:
              type: string
              description: The value must be less than or equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        creditBand:
          type: object
          properties:
            equals:
              description: The value must be exactly equal.
            not_equals:
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        preApproval:
          type: object
          properties:
            equals:
              description: The value must be exactly equal.
            not_equals:
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        hasUnknownScore:
          type: object
          properties:
            equals:
              type: boolean
              description: The value must be exactly equal.
            not_equals:
              type: boolean
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
        hasNS:
          type: object
          properties:
            equals:
              type: boolean
              description: The value must be exactly equal.
            not_equals:
              type: boolean
              description: >-
                The query will return all documents where the value is not
                equal.
            like:
              type: string
              description: >-
                Case-insensitive string must be present. If string of words, all
                words must be present, in any order.
            contains:
              type: string
              description: Must contain the value entered, case-insensitive.
            in:
              type: string
              description: >-
                The value must be found within the provided comma-delimited list
                of values.
            not_in:
              type: string
              description: >-
                The value must NOT be within the provided comma-delimited list
                of values.
            all:
              type: string
              description: >-
                The value must contain all values provided in the
                comma-delimited list.
            exists:
              type: boolean
              description: >-
                Only return documents where the value either exists (true) or
                does not exist (false).
    CreditReport:
      $id: CreditReport
      examples:
        - id: crp_5dk3j9dk2l3k
          time: '2023-04-12T15:30:00Z'
          hasNS: false
          creditBand:
            id: crb_39fjkd93nmd0
            name: Excellent
            minimumCreditScore: 700
            maximumCreditScore: 800
          creditScore: 720
          preApproval:
            id: pre_59dk394fjdl3
            consumer: Consumer ID
            creditBand: crb_39fjkd93nmd0
            validUntilTime: '2024-04-12T00:00:00Z'
          hasUnknownScore: false
      required:
        - id
        - time
        - creditBand
        - preApproval
      title: Credit Report
      type: object
      properties:
        id:
          type: string
          description: Credit Report is uniquely identified by id
        creditScore:
          type: number
          description: Credit Report has Credit Score
        time:
          type: string
          format: date-time
          description: Credit Report was pulled at Time
        creditBand:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CreditBand'
          description: Credit Report falls in Credit Band
        preApproval:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/PreApproval'
          description: Pre-Approval has Credit Report
        hasUnknownScore:
          type: boolean
          description: Credit Report has unknown score
        hasNS:
          type: boolean
          description: Credit Report has NS
    ListModel:
      properties:
        page:
          type: number
          description: Current page number
          examples:
            - 2
        nextPage:
          type: number
          nullable: true
          description: '`number` of next page, `null` if it doesn''t exist'
          examples:
            - 3
        prevPage:
          type: number
          nullable: true
          description: '`number` of previous page, `null` if it doesn''t exist'
          examples:
            - 1
        totalPages:
          type: number
          description: Total pages available, based upon the `limit`
          examples:
            - 3
        totalCount:
          type: number
          description: Total available records within the database
          examples:
            - 25
        limit:
          type: number
          description: Limit query parameter, defaults to `10`
          examples:
            - 10
        pagingCounter:
          type: number
          description: '`number` of the first record on the current page'
          examples:
            - 11
        hasPrevPage:
          type: boolean
          description: '`true/false` if previous page exists'
          examples:
            - true
        hasNextPage:
          type: boolean
          description: '`true/false` if next page exists'
          examples:
            - true
    ErrorModel:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
            message:
              type: string
        success:
          type: boolean
    CreditBand:
      $id: CreditBand
      title: Credit Band
      examples:
        - id: crb_39fjkd93nmd0
          name: Good
          isNS: false
          isPrime: true
          isUnknown: false
          minimumCreditScore: 600
          maximumCreditScore: 700
      properties:
        id:
          type: string
          description: Credit Band is uniquely identified by id
        minimumCreditScore:
          type: number
          description: Credit Band has Minimum Credit Score
        maximumCreditScore:
          type: number
          description: Credit Band has Maximum Credit Score
        name:
          type: string
          description: Credit Band has Name
        isUnknown:
          type: boolean
          description: Credit Band is unknown
        isNS:
          type: boolean
          description: Credit Band is NS
        isPrime:
          type: boolean
          description: Credit Band is prime
      type: object
      required:
        - id
        - name
    PreApproval:
      $id: PreApproval
      examples:
        - id: pre_59dk394fjdl3
          consumer: Consumer ID
          creditBand: crb_39fjkd93nmd0
          validUntilTime: '2024-04-12T00:00:00Z'
      required:
        - id
        - validUntilTime
        - creditBand
      title: Pre-Approval
      type: object
      properties:
        id:
          type: string
          description: Pre-Approval is uniquely identified by id
        consumer:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/Consumer'
          description: Consumer has Pre-Approval
        validUntilTime:
          type: string
          format: date-time
          description: Pre-Approval is Valid Until Time
        creditBand:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/CreditBand'
          description: Pre-Approval falls in Credit Band
    Consumer:
      $id: Consumer
      examples:
        - id: con_2k4jd93vsd82
          ssn: 123-45-6789
          email: john.doe@example.com
          lastName: Doe
          birthDate: '1984-09-20'
          firstName: John
          phoneNumber: 555-0199
      title: Consumer
      type: object
      properties:
        id:
          type: string
          description: Customer is uniquely identified by id
        addresses:
          type: array
          items:
            oneOf:
              - type: string
              - $ref: '#/components/schemas/Address'
          description: Customer is located at Addresses
        phoneNumbers:
          type: array
          items:
            type: string
            pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
          description: Customer has Phone Number
        birthDate:
          type: string
          format: date
          description: Consumer has Birth Date
        email:
          type: string
          format: idn-email
          description: Consumer has Email
        phoneNumber:
          type: string
          pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
          description: Consumer has Phone Number
        ssn:
          type: string
          description: Consumer has SSN
        lastName:
          type: string
          description: Consumer has Last Name
        firstName:
          type: string
          description: Consumer has First Name
      required:
        - birthDate
        - phoneNumber
        - lastName
        - firstName
        - id
    Address:
      $id: Address
      examples:
        - id: adr_2kj49d1msod2
          zip: '62704'
          city:
            name: Springfield
            state:
              code: IL
          line2: Apt 201
          line1: 456 Elm Street
      required:
        - id
        - city
        - zip
        - line1
      title: Address
      type: object
      properties:
        id:
          type: string
          description: Address is uniquely identified by id
        city:
          oneOf:
            - type: object
              properties:
                state:
                  oneOf:
                    - type: string
                    - $ref: '#/components/schemas/State'
                name:
                  type: string
              required:
                - state
                - name
            - $ref: '#/components/schemas/City'
          description: Address is located in City
        zip:
          type: string
          description: Address has ZIP
        line2:
          type: string
          description: Address has Address Line 2
        line1:
          type: string
          description: Address has Address Line 1
    State:
      $id: State
      title: State
      properties:
        code:
          type: string
          description: State is uniquely identified by State Code
      type: object
      required:
        - code
    City:
      $id: City
      examples:
        - name: Springfield
          state:
            code: IL
      required:
        - state
        - name
      title: City
      type: object
      properties:
        state:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/State'
          description: City is uniquely identified by State
        name:
          type: string
          description: City is uniquely identified by Name

````