API reference
Search
Find GL accounts, counterparties, transactions, journal entries and rules by name, description, code or number.
Guides: Work from the keyboard
Find records by name, description, code or number
GET/v1/search
client.search.query()
Find GL accounts, counterparties, transactions, journal entries and rules by name, description, code or number.
Each kind answers with at most limit matches: accounts by code,
counterparties by name, transactions and journal entries newest first.
To page through every match of one kind, list that kind with its own
search filter instead.
Parameters
| Name | Type | Description |
|---|---|---|
qQuery · Required | string | What to look for: part of a name or description, a GL account's code, or a journal entry's number. Case is ignored. |
kindQuery | array of string or null | Only these kinds. Repeat the parameter for several; omit it for all. account, counterparty, transaction, journal_entry, rule |
limitQuery | integer | How many matches of each kind, at most. |
Response
200SearchOut
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 "https://api.ledgerit.ai/v1/search" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
SearchOut
| Name | Type | Description |
|---|---|---|
dataRequired | array of SearchHit | The matches, grouped by kind: accounts, counterparties, transactions, journal entries, then rules. |
SearchHit
| Name | Type | Description |
|---|---|---|
date | string (date) or null | When it happened, for a transaction or a journal entry. |
idRequired | string | Its id, for that kind's own endpoints. |
kindRequired | string | What kind of record matched. account, counterparty, transaction, journal_entry, rule |
logo_url | string or null | A counterparty's logo, square PNG; null for none and for other kinds. |
ref | string or null | The short handle people say: a GL account's code, a journal entry's number. |
titleRequired | string | What the record is called: a name or a description. |