Skip to main content
POST
Get paginated credit ledger history

Authorizations

nonce
string
query
required

WordPress AJAX nonce (passed as form field, verified per-action)

Body

application/x-www-form-urlencoded
action
string
required
Allowed value: "sagescreen_get_credit_ledger"
nonce
string
required

WP nonce for sagescreen_frontend_nonce

council_id
string<uuid>

Council UUID (optional, auto-detected from session/user meta)

Example:

"c9d8e7f6-5a4b-3c2d-1e0f-a1b2c3d4e5f6"

page
integer
default:1

Page number (1-indexed)

Example:

1

per_page
integer
default:25

Results per page (max 100, or -1 for all)

Example:

25

credit_type
enum<string>

Type of credit in the ledger

Available options:
credits,
sage_credits
Example:

"credits"

Response

200 - application/json

Ledger result (check success field)

success
boolean
Example:

true

data
object[]
total
integer

Total number of matching ledger rows

Example:

47

page
integer

Current page number

Example:

1

per_page
integer

Rows per page (or -1 when all rows returned)

Example:

25

message
string
Example:

"Credit ledger retrieved successfully"