Retrieve a ledger (general ledger account)
Changed onReturns a single ledger, i.e. a general ledger (GL) account in the organization's chart of accounts, by its ledger ID. The response includes the account's name, sort code (account number), type, subtype, normal balance (debit or credit), financial account type, and parent ledger ID, and which changes the system allows: whether it is a required ledger (isRequired, requiredLedgerPurpose), whether line entries can be manually added to or removed from it (editable), and whether it can be deleted now (deletable) and, if not, why (deleteBlockedReason), as described for getBooksLedgers. Use this when you already know the ledger ID, for example one referenced by a journal entry line entry. To discover ledger IDs or browse the whole chart of accounts, use the list ledgers endpoint (getBooksLedgers) instead.
Request
- Base URLhttps://api.mercury.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
unique id for a ledger; emitted as base-58, but a base-16 UUID is also accepted
Query parameters
The Books instance to act on. Must be the token organization's own instance, which it defaults to.
Response
Example response
{
"ledger": {
"id": "7JRNsKwy2Lw66caxVU7WGC",
"parentId": "7JRNsKwy2Lw66caxVU7WGC"
}
}Changes
- info
endpoint added
- info