Set the account's credit limit (absolute, audited by the caller)
Sets the account's credit limit to an absolute value, not a delta, so a retry of the same request lands on the same limit.
/v1/ledgers/{ledgerId}/accounts/{accountId}/credit-limitSets the account's credit limit to an absolute value, not a delta, so a retry of the same request lands on the same limit. The ledger refuses a limit that would put the current balance below the new floor with precondition_failed (422): lowering a limit can never retroactively invalidate money that has already moved. The reason for the change is the caller's to record; this endpoint stores only the number.
Authorization
bearerAuth In: header
Path Parameters
uuiduuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X PUT "https://example.com/v1/ledgers/497f6eca-6276-4993-bfeb-53cbbbba6f08/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/credit-limit" \ -H "Content-Type: application/json" \ -d '{ "credit_limit": 0 }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "owner_type": "string", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "purpose": "string", "commodity": "string", "balance": 0, "credit_limit": 0, "enforce_floor": true, "status": "active", "version": 0, "created_at": "2019-08-24T14:15:22Z"}Read one account
Reads one account: its natural key, status, credit limit, version and current balance.
Current balance, reservations, and available funds
The account's current balance, the total still reserved by active pendings, and the available figure a caller should spend against: balance minus reservations, plus the credit limit.