Ledger

Ledger row counts for a filter

Counts the rows GET /credits/ledger would page through under the same filters. Cursor pagination can report neither a total nor a per-category split, which the Activity pager and its type chips need.

get/credits/ledger/summary

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/ledger/summary
  • Auth
    • HTTP bearer
    • or HTTP bearer

Query parameters

category'TOPUP' | 'BURN' | 'REFUND' | 'CLAWBACK' | 'FEE' | 'ADJUSTMENT' | 'ALLOCATION' | 'PROMO'
externalUserIdstring

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

initiatorstring

Spender reference <type>:<id>, matching the analytics initiator identity.

providerstring
endpointstring

Requires provider.

createdAfterstring date-time
createdBeforestring date-time
attribution.{key}string

Equality filter on metadata.attribution.<key>, one parameter per key. Dot form only.

sourceKeystring
account'platform'

Response

Total row count, plus per-category counts and amounts

successtrue required
totalinteger required
byCategoryobject required

Counts keyed by ledger category; categories with no rows are absent.

amountUsdcByCategoryobject required

Unsigned USDC magnitude keyed by ledger category, over the same rows (direction carries the sign). Analytics covers BURN rows only, so a refund total for the same filters comes from here.

appliedFiltersstring[] required

Names of the narrowing query filters this server applied. An empty array means the request did not include a narrowing filter.

Changes

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