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

# List Export Catalog

> List the sections and datasets available for export

The catalog endpoint returns the menu of sections and datasets you are allowed to export. Call it once at setup to discover dataset codes and their cursor fields, and again periodically to detect newly-activated datasets (datasets flip from `available: false` to `available: true` as they ship).

## Request

### Endpoint

```
GET {{base_url}}/lenders/{{lenderPublicId}}/exports/catalog
```

<Tabs>
  <Tab title="Production">
    `https://v3-api.cleargrid.ai/admin/v3`
  </Tab>

  <Tab title="Staging">
    `https://stage-v3-api.cleargrid.ai/admin/v3`
  </Tab>
</Tabs>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from the [Lender Login](/api-reference/authentication/lender-login) endpoint. Format: `Bearer <access_token>`.
</ParamField>

### Path parameters

<ParamField path="lenderPublicId" type="string" required>
  Your lender public ID. Must equal the `lenderId` encoded in the JWT, otherwise the request returns `403`.
</ParamField>

### Example request

```bash theme={null}
curl -X GET \
  "https://stage-v3-api.cleargrid.ai/admin/v3/lenders/3f2b9c10-7d4e-4a91-8c2f-1e6a5b0d4477/exports/catalog" \
  -H "Authorization: Bearer <access_token>"
```

## Response

<Tabs>
  <Tab title="200 — Success">
    All five sections (`S1`–`S5`) and all 25 dataset codes are returned. Phase 1 datasets carry `available: true`; Phase 2 and reserved datasets carry `available: false`.

    ```json theme={null}
    {
      "code": 200,
      "message": "Export catalog retrieved successfully",
      "body": {
        "schemaVersion": "v1",
        "sections": [
          {
            "code": "S1",
            "name": "Customers & Accounts",
            "datasets": [
              { "code": "D01", "name": "Borrowers", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D02", "name": "Borrower Accounts", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D03", "name": "Borrower Sub Accounts", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D04", "name": "Borrower Account Debt Logs", "cursorField": "created_at", "pageMax": 1000, "available": false },
              { "code": "D05", "name": "Borrower Account Events", "cursorField": "created_at", "pageMax": 1000, "available": true },
              { "code": "D06", "name": "Borrower Custom Attribute Logs", "cursorField": "created_at", "pageMax": 1000, "available": false }
            ]
          },
          {
            "code": "S2",
            "name": "Payments & Settlements",
            "datasets": [
              { "code": "D07", "name": "Borrower Payments", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D08", "name": "Borrower Payment Plans", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D09", "name": "Borrower Payment Plan Installments", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D10", "name": "Borrower Payment Plan Installment Logs", "cursorField": "created_at", "pageMax": 1000, "available": false },
              { "code": "D11", "name": "Borrower Payment Plan Logs", "cursorField": "created_at", "pageMax": 1000, "available": false },
              { "code": "D12", "name": "Scheduled Payments", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D13", "name": "Scheduled Payment Logs", "cursorField": "created_at", "pageMax": 1000, "available": false },
              { "code": "D14", "name": "Payment Proofs", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D15", "name": "Borrower Settlements", "cursorField": "updated_at", "pageMax": 1000, "available": true }
            ]
          },
          {
            "code": "S3",
            "name": "Collections Cases",
            "datasets": [
              { "code": "D16", "name": "Borrower Deals", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D17", "name": "Borrower Deal Activity Logs", "cursorField": "created_at", "pageMax": 1000, "available": true },
              { "code": "D18", "name": "Borrower Deal Logs", "cursorField": "created_at", "pageMax": 1000, "available": true },
              { "code": "D19", "name": "Deal Activity Logs", "cursorField": "created_at", "pageMax": 1000, "available": true },
              { "code": "D20", "name": "Deal Views", "cursorField": "updated_at", "pageMax": 1000, "available": true }
            ]
          },
          {
            "code": "S4",
            "name": "Communications",
            "datasets": [
              { "code": "D21", "name": "Communication Logs", "cursorField": "communicated_at", "pageMax": 1000, "available": true },
              { "code": "D22", "name": "Conversations", "cursorField": "updated_at", "pageMax": 1000, "available": true },
              { "code": "D23", "name": "Manual Communication Logs", "cursorField": "communicated_at", "pageMax": 1000, "available": true },
              { "code": "D24", "name": "Manual Communication Log Outcomes", "cursorField": "updated_at", "pageMax": 1000, "available": false }
            ]
          },
          {
            "code": "S5",
            "name": "Reference & Configuration",
            "datasets": [
              { "code": "D26", "name": "User Lender Details", "cursorField": "updated_at", "pageMax": 1000, "available": true }
            ]
          }
        ]
      },
      "errors": []
    }
    ```
  </Tab>

  <Tab title="401 — Unauthorized">
    ```json theme={null}
    {
      "success": false,
      "message": "Access denied. Invalid token.",
      "requestId": "req_3d5b8a0f1e62"
    }
    ```

    The access token is missing, invalid, or expired. See the [Errors reference](/api-reference/exports/errors).
  </Tab>

  <Tab title="403 — Lender mismatch">
    ```json theme={null}
    {
      "success": false,
      "message": "Lender ID mismatch",
      "requestId": "req_6b2f9d3a7c14"
    }
    ```

    The `lenderPublicId` in the URL does not match the `lenderId` in the JWT.
  </Tab>
</Tabs>

## Response fields

<ResponseField name="code" type="integer">
  HTTP status code, mirrored in the body. `200` on success.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable result message.
</ResponseField>

<ResponseField name="body.schemaVersion" type="string">
  Version anchor for the catalog response shape. Currently `"v1"`. Additive changes (new fields, new datasets) stay on v1. Breaking changes — if and when they happen — will land at a new endpoint path (`/exports/v2/...`) so existing pipelines keep working unchanged.
</ResponseField>

<ResponseField name="body.sections" type="array">
  Array of section objects.

  <Expandable title="Section object">
    <ResponseField name="code" type="string">
      Section code, one of `S1`–`S5`.
    </ResponseField>

    <ResponseField name="name" type="string">
      Friendly section name (e.g. `Payments & Settlements`).
    </ResponseField>

    <ResponseField name="datasets" type="array">
      Array of dataset objects in this section.

      <Expandable title="Dataset object">
        <ResponseField name="code" type="string">
          Dataset code (`D01`–`D26`, with gaps).
        </ResponseField>

        <ResponseField name="name" type="string">
          Friendly dataset name.
        </ResponseField>

        <ResponseField name="cursorField" type="string">
          The timestamp field used for pagination on this dataset (`updated_at`, `created_at`, or `communicated_at`).
        </ResponseField>

        <ResponseField name="pageMax" type="integer">
          Maximum page size accepted for this dataset. Currently `1000` for all datasets.
        </ResponseField>

        <ResponseField name="available" type="boolean">
          Whether the dataset can be fetched. If `false`, the dataset is in the menu but not yet enabled, and a fetch returns `404`.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="errors" type="array">
  Always an empty array on success.
</ResponseField>

## Use cases

* **Boot-time discovery** — fetch once and build a client-side allowlist of `(section, dataset)` pairs where `available: true`.
* **Periodic re-check** — fetch on a schedule (e.g. weekly) to detect datasets that have been newly activated for your tenant.

***

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