credits

Get the caller's credit-transaction history.

Returns the authenticated customer's credit transactions — debits (discovery-job charges), refunds, and manual adjustments — newest first, reconstructed from durable job and refund markers. EVERY row carries a signed amount in credits, so a client can sum(amount) to reconcile the ledger against balance. limit bounds the number of TRANSACTIONS returned (a single job can contribute up to two rows — a debit and its refund) and offset selects a stable page; total + has_more let a client walk the full reconstructable history. The ledger is a BOUNDED WINDOW: markers older than window_start (≈7 days) have expired and can no longer be reconstructed — history_incomplete=true signals such older history exists (truncated is a separate this-page hard-cap signal, always false here).

get/mcp/credits/ledger

Request

  • Base URL: https://api.prosp.cc
  • URL: https://api.prosp.cc/mcp/credits/ledger
  • Auth: OAuth 2 (client credentials, token URL https://prosp-mcp-641053169627.auth.eu-central-1.amazoncognito.com/oauth2/token, scopes: mcp/execute)

Query parameters

limitinteger

Maximum number of transactions to return (newest first). Rejected with 400 if 0/negative or above 500.

offsetinteger

Number of transactions to skip from the newest, for paging. Rejected with 400 if negative.

Response

The caller's credit-transaction history.

customer_idstring required

The authenticated customer these transactions belong to.

balanceinteger required

Current credit balance.

countinteger required

Number of transactions in THIS page (never exceeds the requested limit).

totalinteger required

Total reconstructable transactions in the window (across all pages). When history_incomplete is true this is a lower bound — older, marker-expired history is not counted.

offsetinteger required

The starting index this page was served from (echoes the request offset, clamped to total).

has_moreboolean required

True when this page left transactions unreturned — fetch the next page with offset += count.

window_startstring date-time required

RFC-3339 UTC start of the reconstructable window (now − marker TTL, ≈7 days). Transactions older than this have expired markers and cannot be reconstructed.

truncatedboolean required

PURE this-page hard-cap signal: true only when an item/byte cap dropped rows from THIS page. The ledger paginates on offset/limit with no per-page item/byte cap (has_more covers the tail), so truncated is always false here. Retained for a uniform pagination envelope across list surfaces. The "older history exists" signal is the DISTINCT history_incomplete field below — do NOT read truncated for data completeness.

history_incompleteboolean required

Data-COMPLETENESS signal (distinct from truncated): true when older account history exists that the bounded markers can no longer reconstruct — set in exactly two cases: (1) the customer has more jobs than a single read enumerates (only the newest are scanned), or (2) a job's paired debit/refund fell outside the reconstructable window so one half-pair row was suppressed. When true, the visible rows are still internally consistent but do NOT span the customer's whole account history. A COMPLETE page (has_more=false, count == total) can still be history_incomplete=true — the two flags are orthogonal.

Changes

No recorded changes to this operation across all 1 revision of this API.