API reference

Autonomy

How much the model may file without a person, and every policy the books have had.

Guides: Automate filing with rules

Get how much a model may file without a person

GET/v1/autonomy

client.autonomy.get()

The thresholds a model's category must pass to post without a person: confidence, materiality, and a ceiling for counterparties the books have never posted. Also the defaults and the limits nobody may go past.

Response

200AutonomyPolicyOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/autonomy" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Set how much a model may file without a person

PUT/v1/autonomy· Idempotent

client.autonomy.set()

Set all three thresholds. Admins and owners only; the change is on the audit log with the values before and after.

Request body

AutonomyPolicyIn

Response

200AutonomyPolicyOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X PUT "https://api.ledgerit.ai/v1/autonomy" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"confidence_threshold":0,"materiality_ceiling":0,"new_counterparty_ceiling":0}'

Put the model's limits back to the defaults

DELETE/v1/autonomy· Idempotent

client.autonomy.reset()

Go back to the defaults. Admins and owners only; on the audit log.

Response

200AutonomyPolicyOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X DELETE "https://api.ledgerit.ai/v1/autonomy" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

List every policy these books have had

GET/v1/autonomy/versions

client.autonomy.listVersions()

Every policy these books have had, newest first: each change of the thresholds, and each reset to the defaults. Version 0, the shipped defaults, is where every set of books starts and has no entry.

Parameters

NameTypeDescription
limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200AutonomyVersionPage

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/autonomy/versions" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Objects

The objects these operations take and return.

AutonomyPolicyOut

NameTypeDescription
confidence_thresholdRequiredstring

How sure the model must be, from 0 to 1, before its category posts without a person.

customizedRequiredboolean

False while these books use the defaults.

defaultsRequiredAutonomyDefaultsOut
limitsRequiredAutonomyLimitsOut
materiality_ceilingRequiredstring

The amount above which a person always reviews the model's category, however sure it is.

new_counterparty_ceilingRequiredstring

For a counterparty the books have never posted, the amount above which a person reviews.

versionRequiredinteger

Which of these books' policies this is: 0 for the shipped defaults, counting up with each change. Every model decision names the version it was judged by.

AutonomyPolicyIn

NameTypeDescription
confidence_thresholdRequirednumber | string

Between the confidence floor and ceiling, to two decimals.

materiality_ceilingRequirednumber | string

Between 0 and the materiality limit.

new_counterparty_ceilingRequirednumber | string

Between 0 and the lower of the new-counterparty limit and this policy's materiality ceiling.

AutonomyVersionPage

NameTypeDescription
dataRequiredarray of AutonomyVersionOut
has_moreRequiredboolean
next_cursorRequiredstring or null

AutonomyDefaultsOut

NameTypeDescription
confidence_thresholdRequiredstring
materiality_ceilingRequiredstring
new_counterparty_ceilingRequiredstring

AutonomyLimitsOut

NameTypeDescription
confidence_ceilingRequiredstring

The highest confidence threshold any books may set.

confidence_floorRequiredstring

The lowest confidence threshold any books may set.

materiality_limitRequiredstring

The highest materiality ceiling any books may set.

new_counterparty_limitRequiredstring

The highest ceiling any books may set for a counterparty they have never posted.

AutonomyVersionOut

NameTypeDescription
confidence_thresholdRequiredstring or null

The confidence a model's category must reach to post without a person; null when is_default.

decided_byRequiredstring or null

An id that starts with usr_.

decided_by_emailstring or null

Their email as these books' roster has it; null once they have left the books.

is_defaultRequiredboolean

A reset to the defaults; the thresholds are then null.

materiality_ceilingRequiredstring or null

The amount above which a person reviews; null when is_default.

new_counterparty_ceilingRequiredstring or null

For a counterparty the books have never posted, the amount above which a person reviews; null when is_default.

recorded_atRequiredstring (date-time)

When this version was recorded.

versionRequiredinteger

The version number; each change to the thresholds records the next.