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

# Create a new Credit Report



## OpenAPI

````yaml Commerce post /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
    post:
      summary: Create a new Credit Report
      operationId: post-creditreport
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewCreditReport'
      responses:
        '200':
          description: Credit Report Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CreditReport'
                  success:
                    type: boolean
        '400':
          description: Missing Required Information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 400
                      message: Missing Required Information
                    success: false
        '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:
    NewCreditReport:
      $id: NewCreditReport
      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:
        - 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
    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
    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

````