Get Entry by Source
GET/api/ledger/entries/by-source
The current ledger journal entry for a source document (or data:null). source_type is the source model class, source_id its id. A sales order's receivable is posted on its sales invoice: for an order invoiced as a whole, query its order-mirror invoice (source_type App\Models\SalesInvoice, the invoice id from GET /api/sales-orders/{salesOrder}/invoices) — the order itself carries no invoice entry. The returned source object names the document (link_type_label, label, link_route) and, for a sales invoice, its sales order under source.context.
accounting:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Request
Responses
- 200
- 401
- 403
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.