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

# Read a borrower's credit profile

> Repayment history built from Cr3dentials records of every disbursed loan, read in one
consistent snapshot. Contains no personal data. `credit_level` is null until the borrower
has a level. A `days_past_due` negative mark is recorded once an installment is
`days` or more days late, dated the day that threshold was reached.




## OpenAPI

````yaml /api-reference/lending-openapi.yaml get /v1/borrowers/{partner_account_id}/credit-profile
openapi: 3.1.0
info:
  title: Cr3dentials Lending API
  version: 1.0.0
  description: >
    The partner API for Cr3dentials lending: applications, money steps,
    repayments and credit profiles. Money is integer USD cents.

    Every POST takes an Idempotency-Key header. Repeating a request with the
    same key and body

    replays the first response. Reusing a key with a different request is a 409.


    Webhooks (see `webhooks`): Cr3dentials POSTs outcomes that happen after a
    response to the partner's

    webhook URL as JSON `{event_id, type, created_at, data}`.

    - Signature: `X-Timestamp` is unix seconds; `X-Signature` is `v1=<lowercase
    hex HMAC-SHA256(secret, "<X-Timestamp>." + raw body)>`.
      The key is the whole `whsec_...` secret string. Verify against the raw body bytes before parsing.
    - The signing secret is shared once, when your webhook URL is registered.
    Rotating it ends the old
      secret at once.
    - Delivery is at least once: deduplicate by `event_id`. Answer 2xx to
    acknowledge. 408, 429, 5xx and
      network errors are retried with backoff for about 3 hours; any other 4xx stops delivery of that event.
    - Order is not guaranteed. `GET /v1/applications/{id}` is the source of
    truth.
servers: []
security:
  - bearerAuth: []
paths:
  /v1/borrowers/{partner_account_id}/credit-profile:
    get:
      summary: Read a borrower's credit profile
      description: >
        Repayment history built from Cr3dentials records of every disbursed
        loan, read in one

        consistent snapshot. Contains no personal data. `credit_level` is null
        until the borrower

        has a level. A `days_past_due` negative mark is recorded once an
        installment is

        `days` or more days late, dated the day that threshold was reached.
      operationId: getCreditProfile
      parameters:
        - $ref: '#/components/parameters/PartnerAccountId'
      responses:
        '200':
          description: The credit profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditProfile'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PartnerAccountId:
      name: partner_account_id
      in: path
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 128
  schemas:
    CreditProfile:
      type: object
      required:
        - as_of
        - credit_level
        - on_time_repayments
        - loans
      properties:
        as_of:
          type: string
          format: date-time
        credit_level:
          type:
            - integer
            - 'null'
        on_time_repayments:
          type: integer
        loans:
          type: array
          items:
            $ref: '#/components/schemas/CreditProfileLoan'
    CreditProfileLoan:
      type: object
      required:
        - loan_id
        - status
        - currency
        - principal_cents
        - interest_cents
        - disbursed_on
        - closed_on
        - max_days_late
        - installments
        - negative_marks
      properties:
        loan_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - current
            - overdue
            - delinquent
            - default
            - charged_off
            - restructured
            - repaid
        currency:
          type: string
          enum:
            - USD
        principal_cents:
          type: integer
        interest_cents:
          type: integer
        disbursed_on:
          type: string
          format: date
        closed_on:
          type:
            - string
            - 'null'
          format: date
        max_days_late:
          type: integer
        installments:
          type: array
          items:
            $ref: '#/components/schemas/CreditProfileInstallment'
        negative_marks:
          type: array
          items:
            $ref: '#/components/schemas/NegativeMark'
    Error:
      type: object
      required:
        - error
        - request_id
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items: {}
        request_id:
          type: string
    CreditProfileInstallment:
      type: object
      required:
        - seq
        - amount_due_cents
        - amount_paid_cents
        - due_date
        - paid_on
      properties:
        seq:
          type: integer
        amount_due_cents:
          type: integer
        amount_paid_cents:
          type: integer
        due_date:
          type:
            - string
            - 'null'
          format: date
        paid_on:
          type:
            - string
            - 'null'
          format: date
    NegativeMark:
      type: object
      required:
        - kind
        - days
        - 'on'
      properties:
        kind:
          type: string
          enum:
            - days_past_due
        days:
          type: integer
        'on':
          type: string
          format: date
  responses:
    Unauthenticated:
      description: UNAUTHENTICATED
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: NOT_FOUND, also for another partner's application
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Token from POST /v1/oauth/token (client credentials)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.