Skip to main content
A single endpoint serves both initial and incremental loads. The shape of each element in rows[] depends on the dataset — see the per-dataset pages for the field-by-field reference. Every response also carries pagination and meta blocks that tell you how to fetch the next page and how your filter was interpreted.

Request

Endpoint

GET {{base_url}}/lenders/{{lenderPublicId}}/exports/{{sectionCode}}/{{datasetCode}}
https://v3-api.cleargrid.ai/admin/v3

Headers

Authorization
string
required
Bearer token obtained from the Lender Login endpoint. Format: Bearer <access_token>.

Path parameters

lenderPublicId
string
required
Your lender public ID. Must equal the lenderId encoded in the JWT, otherwise the request returns 403.
sectionCode
string
required
One of S1S5. See the catalog endpoint.
datasetCode
string
required
One of D01D26 (with gaps). See the catalog endpoint.

Query parameters

since
string (ISO-8601)
Inclusive lower bound (>=) on the dataset’s cursor field. Omit for an initial load.
until
string (ISO-8601)
Exclusive upper bound (<) on the dataset’s cursor field. Omit to read up to “now”.
cursor
string
Opaque next-page token from the previous response’s body.pagination.nextCursor. Omit on the first page. Treat as opaque — see Pagination.
limit
integer
default:"500"
Page size. Range: 11000. Values outside the range are clamped.
sort
string
default:"asc"
Sort direction on the cursor field. One of asc or desc.
includeTotal
boolean
default:"false"
When true, runs an extra query and adds pagination.total (the filter-wide row count, independent of cursor/limit). For via datasets (e.g. D21, D22, D23) a time window — since and/or until — is required, otherwise total is null with totalNote: "window_required". Large counts are capped (totalExact: false, totalNote: "capped") and the query is time-bounded (total: null, totalNote: "timeout").

Example requests

# Initial load — walk forward until nextCursor is null
curl -X GET \
  "https://stage-v3-api.cleargrid.ai/admin/v3/lenders/${LENDER}/exports/S2/D07?limit=500" \
  -H "Authorization: Bearer <token>"

# Incremental — only rows updated since last sync
curl -X GET \
  "https://stage-v3-api.cleargrid.ai/admin/v3/lenders/${LENDER}/exports/S2/D07?since=2026-05-22T10:00:00Z&limit=500" \
  -H "Authorization: Bearer <token>"

# Continuing pagination — pass nextCursor back
curl -X GET \
  "https://stage-v3-api.cleargrid.ai/admin/v3/lenders/${LENDER}/exports/S2/D07?cursor=eyJ1Ijoi...&limit=500" \
  -H "Authorization: Bearer <token>"

# Page + filter-wide total
curl -X GET \
  "https://stage-v3-api.cleargrid.ai/admin/v3/lenders/${LENDER}/exports/S2/D07?since=2026-05-01T00:00:00Z&limit=500&includeTotal=true" \
  -H "Authorization: Bearer <token>"

Response

Example using D07 (Borrower Payments). nextCursor is non-null, so there are more pages to fetch.
{
  "code": 200,
  "message": "Dataset retrieved successfully",
  "body": {
    "section": { "code": "S2", "name": "Payments & Settlements" },
    "dataset": { "code": "D07", "name": "Borrower Payments" },
    "rows": [
      {
        "public_id": "b1f4c2e0-9a73-4d21-8c54-7e2a1d9b0f31",
        "amount": 75000,
        "settled_amount": 75000,
        "payment_type": "PAID_TO_LENDER",
        "payment_status": "SUCCESS",
        "is_settled": true,
        "paid_before_submission": false,
        "paid_date": "2026-05-18T08:12:44.000Z",
        "failure_reason": null,
        "created_at": "2026-05-18T08:12:45.221Z",
        "updated_at": "2026-05-18T08:30:02.108Z"
      },
      {
        "public_id": "c92a7d18-4f60-4bb2-9e1a-3d6c8b0f5a22",
        "amount": 120000,
        "settled_amount": 0,
        "payment_type": "PAID_TO_LENDER",
        "payment_status": "PENDING",
        "is_settled": false,
        "paid_before_submission": false,
        "paid_date": "2026-05-20T13:45:10.000Z",
        "failure_reason": null,
        "created_at": "2026-05-20T13:45:11.004Z",
        "updated_at": "2026-05-20T13:45:11.004Z"
      },
      {
        "public_id": "e07b3a55-21cd-4f88-bb09-6a4e2c1d77f0",
        "amount": 45000,
        "settled_amount": 0,
        "payment_type": "PAID_TO_LENDER",
        "payment_status": "FAILED",
        "is_settled": false,
        "paid_before_submission": false,
        "paid_date": null,
        "failure_reason": "INSUFFICIENT_FUNDS",
        "created_at": "2026-05-21T09:02:33.512Z",
        "updated_at": "2026-05-21T09:05:18.900Z"
      }
    ],
    "pagination": {
      "limit": 500,
      "returned": 3,
      "nextCursor": "eyJ1IjoiMjAyNi0wNS0yMVQwOTowNToxOC45MDBaIiwiaSI6IjY2NGExYjJjM2Q0ZTVmNjA3MTgyOTNhNCJ9"
    },
    "meta": {
      "schemaVersion": "v1",
      "cursorField": "updated_at",
      "sort": "asc",
      "since": null,
      "until": null,
      "tenantPathKind": "direct",
      "readFrom": "secondary"
    }
  },
  "errors": []
}

Response fields

body.section
object
The section this dataset belongs to.
body.dataset
object
The dataset that was fetched.
body.rows
array
The page of rows. Each element is a redacted document whose shape depends on the dataset — see the per-dataset pages. May be empty.
body.pagination
object
Pagination state for this page.
body.meta
object
Echo of how the request was interpreted.
errors
array
Always an empty array on success.
The contents of each rows[] element vary by dataset. For the exact field list, masking, and a sample row, open the matching per-dataset page.

Need Help?

Our support team is available Monday-Friday, 9 AM - 6 PM GST. Reach out at support@cleargrid.co or visit our help center.