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

# Borrower Accounts

> Accounts a borrower holds with the lender — loans, credit lines, BNPL

| Property      | Value                       |
| ------------- | --------------------------- |
| Dataset code  | `D02`                       |
| Section code  | `S1` — Customers & Accounts |
| Endpoint path | `/exports/S1/D02`           |
| Cursor field  | `updated_at`                |
| Page size     | `1`–`1000` (default `500`)  |
| Availability  | Available (v1.2)            |
| Pagination    | Direct (constant page size) |

Each row is one account a borrower holds with the lender — a loan, credit-card-like line, or BNPL line. It includes financial balances, status, due/submission dates, and the lender-provided reference IDs that let you join back to your warehouse.

## Fields

| Field                           | Type   | Description                                           | Notes                                                                                                         |
| ------------------------------- | ------ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `public_id`                     | string | Stable per-row identifier (string-cast Mongo `_id`).  | Use as the warehouse primary key                                                                              |
| `account_reference_id`          | string | Lender-provided account reference.                    |                                                                                                               |
| `customer_reference_id`         | string | Lender-provided customer reference.                   |                                                                                                               |
| `reference_id`                  | string | Generic reference ID.                                 |                                                                                                               |
| `total_amount`                  | number | Total contractual amount.                             | Minor units (fils/cents)                                                                                      |
| `balance_amount`                | number | Total outstanding balance.                            | Minor units                                                                                                   |
| `actual_balance_amount`         | number | Realised balance after adjustments.                   | Minor units                                                                                                   |
| `paid_amount`                   | number | Amount paid to date.                                  | Minor units                                                                                                   |
| `balance_principal_amount`      | number | Principal still owed.                                 | Minor units                                                                                                   |
| `balance_interest`              | number | Interest still owed.                                  | Minor units                                                                                                   |
| `balance_fee`                   | number | Fees still owed.                                      | Minor units                                                                                                   |
| `minimum_due_amount`            | number | Minimum payable now.                                  | Minor units                                                                                                   |
| `currency`                      | string | ISO 4217 currency code (`SAR`, `AED`, …).             |                                                                                                               |
| `submitted_date`                | string | When the account was opened/onboarded.                | **`DD/MM/YYYY`** — stored as-is, **not** ISO-8601                                                             |
| `due_date`                      | string | Current due date.                                     | **`DD/MM/YYYY`** — stored as-is, **not** ISO-8601                                                             |
| `delinquent_days_on_submission` | number | Days past due at submission.                          |                                                                                                               |
| `loan_type`                     | string | Human-readable loan/account type (e.g. `BNPL`).       | Resolved from the `loan_types` constant; unmapped codes fall back to the raw integer. See legend              |
| `status`                        | string | Human-readable account status (e.g. `IN_COLLECTION`). | Resolved from the `borrower_account_status` constant; unmapped codes fall back to the raw integer. See legend |
| `merchant_name`                 | string | Originating merchant, if any.                         |                                                                                                               |
| `lender_display_name`           | string | Lender display name.                                  |                                                                                                               |
| `created_at`                    | string | Record creation timestamp (ISO-8601).                 |                                                                                                               |
| `updated_at`                    | string | Last-modified timestamp (ISO-8601).                   | Cursor field                                                                                                  |

## Sample row

```json theme={null}
{
  "public_id": "6981c84a1f30b27e90c5512d",
  "account_reference_id": "ACC-2026-44817",
  "customer_reference_id": "CUST-2026-00482",
  "reference_id": "REF-99213",
  "total_amount": 1500000,
  "balance_amount": 920000,
  "actual_balance_amount": 920000,
  "paid_amount": 580000,
  "balance_principal_amount": 800000,
  "balance_interest": 100000,
  "balance_fee": 20000,
  "minimum_due_amount": 75000,
  "currency": "SAR",
  "submitted_date": "22/02/2026",
  "due_date": "10/01/2026",
  "delinquent_days_on_submission": 0,
  "loan_type": "BNPL",
  "status": "IN_COLLECTION",
  "merchant_name": "Tamara Marketplace",
  "lender_display_name": "Tamara",
  "created_at": "2026-02-01T09:15:33.000Z",
  "updated_at": "2026-05-28T11:42:08.000Z"
}
```

<Note>
  **Date formats differ by field.** `submitted_date` and `due_date` are returned exactly as stored — `DD/MM/YYYY` strings (e.g. `22/02/2026`), **not** ISO-8601. The system timestamps `created_at` / `updated_at` *are* ISO-8601. Parse them with separate format handling. See [Date & time formats](/api-reference/exports/overview#date-and-time-formats).
</Note>

## Field value reference

`loan_type` and `status` are returned as human-readable labels. The service resolves the underlying numeric code to its label; if a code has no mapping, the **raw integer** is returned instead.

<Tabs>
  <Tab title="loan_type">
    | Label                 |
    | --------------------- |
    | `CREDIT_CARD`         |
    | `LEASE`               |
    | `PERSONAL_LOAN`       |
    | `BNPL`                |
    | `CAR_RENTAL`          |
    | `SUBSCRIPTION`        |
    | `Charge Back`         |
    | `SALARY_ADVANCE_LOAN` |
    | `OverDraft`           |
  </Tab>

  <Tab title="status">
    | Label                      |
    | -------------------------- |
    | `CREATED`                  |
    | `PENDING`                  |
    | `IN_COLLECTION`            |
    | `DISPUTED`                 |
    | `PAY_LATER`                |
    | `PAYMENT_PLAN_CREATED`     |
    | `PAYMENT_PLAN_IN_PROGRESS` |
    | `COLLECTED`                |
    | `FULL_SETTLEMENT`          |
    | `PARTIAL_SETTLEMENT`       |
    | `CLOSED`                   |
    | `DELETED`                  |
    | `WITHDRAWN`                |
    | `ON_HOLD`                  |
    | `DO_NOT_CONTACT`           |
    | `DECEASED`                 |
    | `SCHEDULED`                |
    | `PAYMENT_IN_PROGRESS`      |
    | `PAYMENT_PLAN_FAILED`      |
  </Tab>
</Tabs>

## Pagination characteristics

This dataset is **direct** — filtered to your tenant by `lender_id` on the collection itself, so each page returns a constant number of rows until the last page.

## Use cases

* Balance and DPD (days-past-due) trail per account.
* Portfolio summarisation and segmentation.
* Due-date sync into collections workflows.

***

<Snippet file="snippets/support-info.mdx" />
