API Reference
Explore LedgerLine API groups without sending requests.
Explore LedgerLine's server-side API groups, request shapes, response examples, workflow notes, SDK snippets, and accounting boundaries. This reference is read-only and never sends live requests.
Read-only reference
15
Route groups
44
Examples
This API Reference is documentation only. It never sends live API requests.
Use fake examples here; keep real LedgerLine API keys on your app server.
API keys determine organization, connected app, and test/live environment.
Trusted scope fields such as organization_id and environment are rejected.
Module labels are setup guidance today; hard module enforcement is not active by default.
Accounting entries are created only by documented posting/payment/reversal routes.
Read-only explorer
Filter endpoint groups by workflow.
Choose a workflow group, copy fake examples, and keep real test keys in server-side environment variables only.
API recipes
Follow server-side workflow patterns before copying route examples.
Webhooks
Review active and planned event schemas, signatures, and retries.
Accounting model
Review posting rules, reversals, A/R, A/P, and report boundaries.
Security
Read API-key, scope, rate-limit, storage, and production gate notes.
Changelog
Review /api/v1 versioning, compatibility, and deprecation policy.
Integration guide
Env setup, auth headers, test/live behavior, and boundaries.
OpenAPI YAML
Download the manual OpenAPI 3.1 reference.
Error envelope
Standard error shape and safe handling guidance.
Standard Error Shape
Public API routes return the shared error envelope. Branch on `error.code`, not message text.
The future `module_disabled` code is documented for planned hard module enforcement, but this reference remains read-only and current APIs are not broadly blocked by module state.
Error response
{
"error": {
"code": "validation_failed",
"message": "Validation failed.",
"details": [],
"request_id": "req_example"
}
}Auth
Check that a server-side API key is valid.
Always available
GET/api/v1/auth/checkCheck API key
Returns the connected app, organization, and environment context resolved from the bearer API key.
View
/api/v1/auth/checkCheck API key
Returns the connected app, organization, and environment context resolved from the bearer API key.
checkLedgerlineAuthcurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/auth/check \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { checkLedgerlineAuth } from "@/lib/sdk";
await checkLedgerlineAuth({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
});Response example
{
"data": {
"authenticated": true,
"environment": "test",
"connected_app_id": "app_demo_123"
}
}Customers
Create and read customer reference records for money-in workflows.
Module guidance: customers
GET/api/v1/customersList customers
Returns organization-scoped customers with standard pagination.
View
/api/v1/customersList customers
Returns organization-scoped customers with standard pagination.
listCustomerscurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/customers \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listCustomers } from "@/lib/sdk";
await listCustomers({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
limit: 50,
offset: 0,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000001",
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com",
"status": "active"
}
],
"customers": [
{
"id": "00000000-0000-4000-8000-000000000001",
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com",
"status": "active"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}POST/api/v1/customersCreate customer
Creates a customer. Use external_customer_id for retry-safe creates.
View
/api/v1/customersCreate customer
Creates a customer. Use external_customer_id for retry-safe creates.
createCustomercurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/customers \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com"
}'SDK snippet
import { createCustomer } from "@/lib/sdk";
await createCustomer({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
customer: {
externalCustomerId: "cus_demo_123",
name: "Acme Holdings",
email: "billing@example.com",
},
});Request body
{
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000001",
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com",
"status": "active"
},
"customer": {
"id": "00000000-0000-4000-8000-000000000001",
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com",
"status": "active"
}
}GET/api/v1/customers/{id}Get customer
Reads one customer by id in the API key organization scope.
View
/api/v1/customers/{id}Get customer
Reads one customer by id in the API key organization scope.
getCustomercurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/customers/00000000-0000-4000-8000-000000000001 \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getCustomer } from "@/lib/sdk";
await getCustomer({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
customerId: "00000000-0000-4000-8000-000000000001",
});Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000001",
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com",
"status": "active"
},
"customer": {
"id": "00000000-0000-4000-8000-000000000001",
"external_customer_id": "cus_demo_123",
"name": "Acme Holdings",
"email": "billing@example.com",
"status": "active"
}
}Invoices
Create invoices and post approved invoices to Accounts Receivable and revenue.
Module guidance: invoices
GET/api/v1/invoicesList invoices
Returns invoices with standard pagination and status/customer filters.
View
/api/v1/invoicesList invoices
Returns invoices with standard pagination and status/customer filters.
listInvoicescurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/invoices \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listInvoices } from "@/lib/sdk";
await listInvoices({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
status: "open",
limit: 50,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000002",
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"status": "open",
"total_cents": 25000,
"currency": "USD"
}
],
"invoices": [
{
"id": "00000000-0000-4000-8000-000000000002",
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"status": "open",
"total_cents": 25000,
"currency": "USD"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}POST/api/v1/invoicesCreate invoice
Creates a draft/open invoice. Posting is a separate accounting action.
View
/api/v1/invoicesCreate invoice
Creates a draft/open invoice. Posting is a separate accounting action.
createInvoicecurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/invoices \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"invoice_number": "INV-1001",
"issue_date": "2026-05-20",
"due_date": "2026-06-19",
"line_items": [
{
"description": "Platform subscription",
"quantity": 1,
"unit_amount_cents": 25000
}
]
}'SDK snippet
import { createInvoice } from "@/lib/sdk";
await createInvoice({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
invoice: {
externalInvoiceId: "inv_demo_123",
customerId: "00000000-0000-4000-8000-000000000001",
invoiceNumber: "INV-1001",
issueDate: "2026-05-20",
dueDate: "2026-06-19",
lineItems: [{ description: "Platform subscription", quantity: 1, unitAmountCents: 25000 }],
},
});Request body
{
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"invoice_number": "INV-1001",
"issue_date": "2026-05-20",
"due_date": "2026-06-19",
"line_items": [
{
"description": "Platform subscription",
"quantity": 1,
"unit_amount_cents": 25000
}
]
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000002",
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"status": "open",
"total_cents": 25000,
"currency": "USD"
},
"invoice": {
"id": "00000000-0000-4000-8000-000000000002",
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"status": "open",
"total_cents": 25000,
"currency": "USD"
}
}POST/api/v1/invoices/{id}/postPost invoice
Posts an eligible invoice to the ledger.
View
/api/v1/invoices/{id}/postPost invoice
Posts an eligible invoice to the ledger.
postInvoicecurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/invoices/00000000-0000-4000-8000-000000000002/post \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { postInvoice } from "@/lib/sdk";
await postInvoice({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
invoiceId: "00000000-0000-4000-8000-000000000002",
});Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000002",
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"status": "open",
"total_cents": 25000,
"currency": "USD"
},
"invoice": {
"id": "00000000-0000-4000-8000-000000000002",
"external_invoice_id": "inv_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"status": "open",
"total_cents": 25000,
"currency": "USD"
},
"action": {
"type": "posted",
"status": "completed"
}
}Payments
Record customer payments and provider payout clearing.
Module guidance: payments
POST/api/v1/paymentsCreate payment
Records a customer payment against an invoice.
View
/api/v1/paymentsCreate payment
Records a customer payment against an invoice.
createPaymentcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/payments \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_payment_id": "pay_demo_123",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"amount_cents": 25000,
"received_at": "2026-05-20",
"source": "manual"
}'SDK snippet
import { createPayment } from "@/lib/sdk";
await createPayment({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
payment: {
externalPaymentId: "pay_demo_123",
invoiceId: "00000000-0000-4000-8000-000000000002",
amountCents: 25000,
receivedAt: "2026-05-20",
source: "manual",
},
});Request body
{
"external_payment_id": "pay_demo_123",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"amount_cents": 25000,
"received_at": "2026-05-20",
"source": "manual"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000005",
"external_payment_id": "pay_demo_123",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"amount_cents": 25000,
"source": "manual"
},
"payment": {
"id": "00000000-0000-4000-8000-000000000005",
"external_payment_id": "pay_demo_123",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"amount_cents": 25000,
"source": "manual"
}
}GET/api/v1/paymentsList payments
Returns customer payments with standard pagination.
View
/api/v1/paymentsList payments
Returns customer payments with standard pagination.
listPaymentscurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/payments \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listPayments } from "@/lib/sdk";
await listPayments({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
limit: 50,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000005",
"external_payment_id": "pay_demo_123",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"amount_cents": 25000,
"source": "manual"
}
],
"payments": [
{
"id": "00000000-0000-4000-8000-000000000005",
"external_payment_id": "pay_demo_123",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"amount_cents": 25000,
"source": "manual"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}POST/api/v1/processor-payoutsCreate provider payout clearing
Records provider payout clearing through the current processor-payout API when supported metadata is available.
View
/api/v1/processor-payoutsCreate provider payout clearing
Records provider payout clearing through the current processor-payout API when supported metadata is available.
createProcessorPayoutcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/processor-payouts \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_payout_id": "po_demo_123",
"processor": "stripe",
"payout_date": "2026-05-20",
"gross_cents": 25000,
"fee_cents": 750,
"net_cents": 24250
}'SDK snippet
import { createProcessorPayout } from "@/lib/sdk";
await createProcessorPayout({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
payout: {
externalPayoutId: "po_demo_123",
processor: "stripe",
payoutDate: "2026-05-20",
grossCents: 25000,
feeCents: 750,
netCents: 24250,
},
});Request body
{
"external_payout_id": "po_demo_123",
"processor": "stripe",
"payout_date": "2026-05-20",
"gross_cents": 25000,
"fee_cents": 750,
"net_cents": 24250
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
},
"processor_payout": {
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
}
}Provider Payouts
Create and read provider payout clearing records through the current processor-payout API.
Module guidance: payments
GET/api/v1/processor-payoutsList provider payouts
Returns provider payouts with standard pagination.
View
/api/v1/processor-payoutsList provider payouts
Returns provider payouts with standard pagination.
listProcessorPayoutscurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/processor-payouts \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listProcessorPayouts } from "@/lib/sdk";
await listProcessorPayouts({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
limit: 50,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
}
],
"processor_payouts": [
{
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}POST/api/v1/processor-payoutsCreate provider payout clearing
Records provider payout clearing through the current processor-payout API when supported metadata is available.
View
/api/v1/processor-payoutsCreate provider payout clearing
Records provider payout clearing through the current processor-payout API when supported metadata is available.
createProcessorPayoutcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/processor-payouts \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_payout_id": "po_demo_123",
"processor": "stripe",
"payout_date": "2026-05-20",
"gross_cents": 25000,
"fee_cents": 750,
"net_cents": 24250
}'SDK snippet
import { createProcessorPayout } from "@/lib/sdk";
await createProcessorPayout({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
payout: {
externalPayoutId: "po_demo_123",
processor: "stripe",
payoutDate: "2026-05-20",
grossCents: 25000,
feeCents: 750,
netCents: 24250,
},
});Request body
{
"external_payout_id": "po_demo_123",
"processor": "stripe",
"payout_date": "2026-05-20",
"gross_cents": 25000,
"fee_cents": 750,
"net_cents": 24250
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
},
"processor_payout": {
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
}
}GET/api/v1/processor-payouts/{id}Get provider payout
Reads one provider payout by id.
View
/api/v1/processor-payouts/{id}Get provider payout
Reads one provider payout by id.
getProcessorPayoutcurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/processor-payouts/00000000-0000-4000-8000-000000000009 \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getProcessorPayout } from "@/lib/sdk";
await getProcessorPayout({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
processorPayoutId: "00000000-0000-4000-8000-000000000009",
});Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
},
"processor_payout": {
"id": "00000000-0000-4000-8000-000000000009",
"external_payout_id": "po_demo_123",
"status": "created",
"net_cents": 24250
}
}Events
Ingest retry-safe events from connected apps.
Module guidance: webhooks
POST/api/v1/eventsSend event
Stores an event and processes supported payment.received events.
View
/api/v1/eventsSend event
Stores an event and processes supported payment.received events.
sendLedgerlineEventcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/events \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"event_type": "payment.received",
"external_event_id": "evt_demo_001",
"payload": {
"external_payment_id": "pay_demo_123",
"external_invoice_id": "inv_demo_123",
"amount_cents": 25000,
"received_at": "2026-05-20"
}
}'SDK snippet
import { sendLedgerlineEvent } from "@/lib/sdk";
await sendLedgerlineEvent({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
eventType: "payment.received",
externalEventId: "evt_demo_001",
idempotencyKey: "evt_demo_001",
payload: {
external_payment_id: "pay_demo_123",
external_invoice_id: "inv_demo_123",
amount_cents: 25000,
received_at: "2026-05-20",
},
});Request body
{
"event_type": "payment.received",
"external_event_id": "evt_demo_001",
"payload": {
"external_payment_id": "pay_demo_123",
"external_invoice_id": "inv_demo_123",
"amount_cents": 25000,
"received_at": "2026-05-20"
}
}Response example
{
"data": {
"event_id": "evt_demo_001",
"event_type": "payment.received",
"duplicate": false,
"status": "processed"
},
"event": {
"event_id": "evt_demo_001",
"event_type": "payment.received",
"duplicate": false,
"status": "processed"
}
}Estimates
Manage non-accounting estimate workflows and conversion to draft invoices.
Module guidance: estimates
POST/api/v1/estimatesCreate estimate
Creates a non-accounting estimate.
View
/api/v1/estimatesCreate estimate
Creates a non-accounting estimate.
createEstimatecurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/estimates \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_estimate_id": "est_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"issue_date": "2026-05-20",
"line_items": [
{
"description": "Implementation package",
"quantity": 1,
"unit_amount_cents": 50000
}
]
}'SDK snippet
import { createEstimate } from "@/lib/sdk";
await createEstimate({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
estimate: {
externalEstimateId: "est_demo_123",
customerId: "00000000-0000-4000-8000-000000000001",
issueDate: "2026-05-20",
lineItems: [{ description: "Implementation package", quantity: 1, unitAmountCents: 50000 }],
},
});Request body
{
"external_estimate_id": "est_demo_123",
"customer_id": "00000000-0000-4000-8000-000000000001",
"issue_date": "2026-05-20",
"line_items": [
{
"description": "Implementation package",
"quantity": 1,
"unit_amount_cents": 50000
}
]
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000010",
"external_estimate_id": "est_demo_123",
"status": "draft",
"total_cents": 50000
},
"estimate": {
"id": "00000000-0000-4000-8000-000000000010",
"external_estimate_id": "est_demo_123",
"status": "draft",
"total_cents": 50000
}
}POST/api/v1/estimates/{id}/statusUpdate estimate status
Moves an estimate through supported non-accounting statuses.
View
/api/v1/estimates/{id}/statusUpdate estimate status
Moves an estimate through supported non-accounting statuses.
updateEstimateStatuscurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/estimates/00000000-0000-4000-8000-000000000010/status \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"status": "sent"
}'SDK snippet
import { updateEstimateStatus } from "@/lib/sdk";
await updateEstimateStatus({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
estimateId: "00000000-0000-4000-8000-000000000010",
status: "sent",
});Request body
{
"status": "sent"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000010",
"status": "sent"
},
"estimate": {
"id": "00000000-0000-4000-8000-000000000010",
"status": "sent"
}
}POST/api/v1/estimates/{id}/convertConvert estimate
Converts an accepted estimate into a draft invoice.
View
/api/v1/estimates/{id}/convertConvert estimate
Converts an accepted estimate into a draft invoice.
convertEstimateToInvoicecurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/estimates/00000000-0000-4000-8000-000000000010/convert \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { convertEstimateToInvoice } from "@/lib/sdk";
await convertEstimateToInvoice({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
estimateId: "00000000-0000-4000-8000-000000000010",
});Response example
{
"data": {
"estimate_id": "00000000-0000-4000-8000-000000000010",
"invoice_id": "00000000-0000-4000-8000-000000000002",
"invoice_status": "draft"
}
}Documents
Manage private evidence documents, links, shares, and render metadata.
Module guidance: documents
POST/api/v1/documentsUpload document
Uploads an evidence file with safe metadata.
View
/api/v1/documentsUpload document
Uploads an evidence file with safe metadata.
createDocumentcurl example
curl https://your-ledgerline-domain.com/api/v1/documents \ -H "Authorization: Bearer ll_test_replace_me" \ -F "file=@receipt.pdf" \ -F "source=api" \ -F "document_type=receipt"
SDK snippet
import { createDocument } from "@/lib/sdk";
await createDocument({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
file: receiptFile,
metadata: {
source: "api",
documentType: "receipt",
},
});Request body
multipart/form-data file=@receipt.pdf source=api document_type=receipt
Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000006",
"file_name": "receipt.pdf",
"document_type": "receipt",
"status": "uploaded"
},
"document": {
"id": "00000000-0000-4000-8000-000000000006",
"file_name": "receipt.pdf",
"document_type": "receipt",
"status": "uploaded"
}
}GET/api/v1/documentsList documents
Returns evidence documents with standard pagination and filters.
View
/api/v1/documentsList documents
Returns evidence documents with standard pagination and filters.
listDocumentscurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/documents \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listDocuments } from "@/lib/sdk";
await listDocuments({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
limit: 50,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000006",
"file_name": "receipt.pdf",
"status": "uploaded"
}
],
"documents": [
{
"id": "00000000-0000-4000-8000-000000000006",
"file_name": "receipt.pdf",
"status": "uploaded"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}POST/api/v1/documents/{id}/linkLink document
Links an evidence document to a customer, invoice, estimate, vendor, or bill where supported.
View
/api/v1/documents/{id}/linkLink document
Links an evidence document to a customer, invoice, estimate, vendor, or bill where supported.
linkDocumentcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/documents/00000000-0000-4000-8000-000000000006/link \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"record_type": "invoice",
"record_id": "00000000-0000-4000-8000-000000000002"
}'SDK snippet
import { linkDocument } from "@/lib/sdk";
await linkDocument({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
documentId: "00000000-0000-4000-8000-000000000006",
recordType: "invoice",
recordId: "00000000-0000-4000-8000-000000000002",
});Request body
{
"record_type": "invoice",
"record_id": "00000000-0000-4000-8000-000000000002"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000006",
"linked_record_id": "00000000-0000-4000-8000-000000000002"
},
"document": {
"id": "00000000-0000-4000-8000-000000000006",
"linked_record_id": "00000000-0000-4000-8000-000000000002"
},
"action": {
"type": "linked",
"status": "completed"
}
}GET/api/v1/documents/{id}/downloadDownload document
Downloads the file stream through the API route.
View
/api/v1/documents/{id}/downloadDownload document
Downloads the file stream through the API route.
getDocumentDownloadUrlcurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/documents/00000000-0000-4000-8000-000000000006/download \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getDocumentDownloadUrl } from "@/lib/sdk";
const downloadUrl = getDocumentDownloadUrl({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
documentId: "00000000-0000-4000-8000-000000000006",
});Response example
application/octet-stream (binary file response)
POST/api/v1/document-sharesCreate document share
Creates safe share metadata for customer-facing documents where supported.
View
/api/v1/document-sharesCreate document share
Creates safe share metadata for customer-facing documents where supported.
createDocumentSharecurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/document-shares \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"record_type": "invoice",
"record_id": "00000000-0000-4000-8000-000000000002"
}'SDK snippet
import { createDocumentShare } from "@/lib/sdk";
await createDocumentShare({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
recordType: "invoice",
recordId: "00000000-0000-4000-8000-000000000002",
});Request body
{
"record_type": "invoice",
"record_id": "00000000-0000-4000-8000-000000000002"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000007",
"status": "active",
"record_id": "00000000-0000-4000-8000-000000000002"
},
"document_share": {
"id": "00000000-0000-4000-8000-000000000007",
"status": "active",
"record_id": "00000000-0000-4000-8000-000000000002"
}
}GET/api/v1/document-renders/{id}Get document render
Reads safe render metadata for generated customer-facing documents.
View
/api/v1/document-renders/{id}Get document render
Reads safe render metadata for generated customer-facing documents.
getDocumentRendercurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/document-renders/00000000-0000-4000-8000-000000000007 \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getDocumentRender } from "@/lib/sdk";
await getDocumentRender({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
renderId: "00000000-0000-4000-8000-000000000007",
});Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000007",
"status": "ready",
"document_type": "invoice"
},
"document_render": {
"id": "00000000-0000-4000-8000-000000000007",
"status": "ready",
"document_type": "invoice"
}
}Settings and Defaults
Read capabilities and manage connected-app document branding/default settings.
Capabilities always available; defaults/branding use embedded_settings
GET/api/v1/settings/capabilitiesGet settings capabilities
Returns enabled public settings capabilities for the API key context.
View
/api/v1/settings/capabilitiesGet settings capabilities
Returns enabled public settings capabilities for the API key context.
getSettingsCapabilitiescurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/settings/capabilities \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getSettingsCapabilities } from "@/lib/sdk";
await getSettingsCapabilities({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
});Response example
{
"data": {
"document_branding": true,
"invoice_defaults": true,
"estimate_defaults": true
}
}PUT/api/v1/settings/document-brandingUpdate document branding
Updates safe document branding settings when the capability is active.
View
/api/v1/settings/document-brandingUpdate document branding
Updates safe document branding settings when the capability is active.
updateDocumentBrandingSettingscurl example
curl -X PUT https://your-ledgerline-domain.com/api/v1/settings/document-branding \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"business_name": "Acme Holdings",
"payment_instructions": "Pay by ACH using the instructions on file."
}'SDK snippet
import { updateDocumentBrandingSettings } from "@/lib/sdk";
await updateDocumentBrandingSettings({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
settings: {
businessName: "Acme Holdings",
paymentInstructions: "Pay by ACH using the instructions on file.",
},
});Request body
{
"business_name": "Acme Holdings",
"payment_instructions": "Pay by ACH using the instructions on file."
}Response example
{
"data": {
"business_name": "Acme Holdings",
"payment_instructions": "Pay by ACH using the instructions on file."
}
}GET/api/v1/settings/invoice-defaultsGet invoice defaults
Reads connected-app invoice default settings.
View
/api/v1/settings/invoice-defaultsGet invoice defaults
Reads connected-app invoice default settings.
getInvoiceDefaultscurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/settings/invoice-defaults \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getInvoiceDefaults } from "@/lib/sdk";
await getInvoiceDefaults({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
});Response example
{
"data": {
"default_terms": "Net 30",
"default_memo": "Thank you for your business."
}
}PUT/api/v1/settings/estimate-defaultsUpdate estimate defaults
Updates connected-app estimate default settings.
View
/api/v1/settings/estimate-defaultsUpdate estimate defaults
Updates connected-app estimate default settings.
updateEstimateDefaultscurl example
curl -X PUT https://your-ledgerline-domain.com/api/v1/settings/estimate-defaults \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"default_terms": "Valid for 30 days"
}'SDK snippet
import { updateEstimateDefaults } from "@/lib/sdk";
await updateEstimateDefaults({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
settings: {
defaultTerms: "Valid for 30 days",
},
});Request body
{
"default_terms": "Valid for 30 days"
}Response example
{
"data": {
"default_terms": "Valid for 30 days"
}
}Reports
Read summary, receivables, payables, and 1099 support reports.
Module guidance: reports; A/P also bills_ap; 1099 also tax_1099
GET/api/v1/reports/summaryReport summary
Reads high-level accounting report summary data.
View
/api/v1/reports/summaryReport summary
Reads high-level accounting report summary data.
getReportSummarycurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/reports/summary \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getReportSummary } from "@/lib/sdk";
await getReportSummary({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
from: "2026-01-01",
to: "2026-12-31",
});Response example
{
"data": {
"from": "2026-01-01",
"to": "2026-12-31",
"revenue_cents": 25000,
"accounts_receivable_cents": 0
},
"report_summary": {
"from": "2026-01-01",
"to": "2026-12-31",
"revenue_cents": 25000,
"accounts_receivable_cents": 0
}
}GET/api/v1/reports/accounts-receivableA/R summary
Reads open Accounts Receivable summary data.
View
/api/v1/reports/accounts-receivableA/R summary
Reads open Accounts Receivable summary data.
getAccountsReceivableSummarycurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/reports/accounts-receivable \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getAccountsReceivableSummary } from "@/lib/sdk";
await getAccountsReceivableSummary({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
asOf: "2026-12-31",
});Response example
{
"data": {
"total_open_cents": 25000,
"customer_count": 1
},
"accounts_receivable": {
"total_open_cents": 25000,
"customer_count": 1
}
}GET/api/v1/reports/accounts-payableA/P summary
Reads posted-bill open A/P with payment-aware allocations.
View
/api/v1/reports/accounts-payableA/P summary
Reads posted-bill open A/P with payment-aware allocations.
getAccountsPayableSummarycurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/reports/accounts-payable \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { getAccountsPayableSummary } from "@/lib/sdk";
await getAccountsPayableSummary({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
asOf: "2026-12-31",
});Response example
{
"data": {
"total_open_cents": 75000,
"vendor_count": 1
},
"accounts_payable": {
"total_open_cents": 75000,
"vendor_count": 1
}
}GET/api/v1/reports/1099-summary1099 summary
Reads CPA/tax-support totals from posted, non-reversed vendor payments.
View
/api/v1/reports/1099-summary1099 summary
Reads CPA/tax-support totals from posted, non-reversed vendor payments.
get1099Summarycurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/reports/1099-summary \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { get1099Summary } from "@/lib/sdk";
await get1099Summary({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
year: 2026,
includeIneligible: false,
});Response example
{
"data": {
"reporting_year": 2026,
"total_reportable_paid_cents": 75000,
"eligible_vendor_count": 1
},
"tax_1099_summary": {
"reporting_year": 2026,
"total_reportable_paid_cents": 75000,
"eligible_vendor_count": 1
}
}1099 Summary
Review CPA/tax-support vendor payment totals without filing forms.
Module guidance: reports + tax_1099
GET/api/v1/reports/1099-summary1099 summary
Reads support totals from posted, non-reversed vendor payments by payment date.
View
/api/v1/reports/1099-summary1099 summary
Reads support totals from posted, non-reversed vendor payments by payment date.
get1099Summarycurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/reports/1099-summary \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { get1099Summary } from "@/lib/sdk";
await get1099Summary({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
year: 2026,
includeIneligible: false,
});Response example
{
"data": {
"reporting_year": 2026,
"total_reportable_paid_cents": 75000,
"eligible_vendor_count": 1,
"missing_w9_count": 0
},
"tax_1099_summary": {
"reporting_year": 2026,
"total_reportable_paid_cents": 75000,
"eligible_vendor_count": 1,
"missing_w9_count": 0
}
}Vendors
Manage vendor master data and 1099 support metadata.
Module guidance: vendors
POST/api/v1/vendorsCreate vendor
Creates organization-scoped vendor metadata.
View
/api/v1/vendorsCreate vendor
Creates organization-scoped vendor metadata.
curl example
curl -X POST https://your-ledgerline-domain.com/api/v1/vendors \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_vendor_id": "vendor_demo_123",
"display_name": "Jordan Smith",
"vendor_type": "contractor",
"is_1099_eligible": true
}'SDK snippet
import { createVendor } from "@/lib/sdk";
await createVendor({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
vendor: {
externalVendorId: "vendor_demo_123",
displayName: "Jordan Smith",
vendorType: "contractor",
is1099Eligible: true,
},
});Request body
{
"external_vendor_id": "vendor_demo_123",
"display_name": "Jordan Smith",
"vendor_type": "contractor",
"is_1099_eligible": true
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000003",
"external_vendor_id": "vendor_demo_123",
"display_name": "Jordan Smith",
"vendor_type": "contractor",
"is_1099_eligible": true
},
"vendor": {
"id": "00000000-0000-4000-8000-000000000003",
"external_vendor_id": "vendor_demo_123",
"display_name": "Jordan Smith",
"vendor_type": "contractor",
"is_1099_eligible": true
}
}GET/api/v1/vendorsList vendors
Returns vendors with standard pagination and filters.
View
/api/v1/vendorsList vendors
Returns vendors with standard pagination and filters.
curl example
curl -X GET https://your-ledgerline-domain.com/api/v1/vendors \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listVendors } from "@/lib/sdk";
await listVendors({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
limit: 50,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000003",
"external_vendor_id": "vendor_demo_123",
"display_name": "Jordan Smith",
"vendor_type": "contractor",
"is_1099_eligible": true
}
],
"vendors": [
{
"id": "00000000-0000-4000-8000-000000000003",
"external_vendor_id": "vendor_demo_123",
"display_name": "Jordan Smith",
"vendor_type": "contractor",
"is_1099_eligible": true
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}Bills
Create operational bills and post reviewed bills to A/P and expense.
Module guidance: bills_ap
POST/api/v1/billsCreate bill
Creates an operational vendor bill.
View
/api/v1/billsCreate bill
Creates an operational vendor bill.
curl example
curl -X POST https://your-ledgerline-domain.com/api/v1/bills \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"vendor_id": "00000000-0000-4000-8000-000000000003",
"external_bill_id": "bill_demo_123",
"bill_number": "BILL-1001",
"issue_date": "2026-05-20",
"due_date": "2026-06-19",
"line_items": [
{
"description": "Contractor services",
"quantity": 1,
"unit_amount_cents": 75000
}
]
}'SDK snippet
import { createBill } from "@/lib/sdk";
await createBill({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
bill: {
vendorId: "00000000-0000-4000-8000-000000000003",
externalBillId: "bill_demo_123",
billNumber: "BILL-1001",
issueDate: "2026-05-20",
dueDate: "2026-06-19",
lineItems: [{ description: "Contractor services", quantity: 1, unitAmountCents: 75000 }],
},
});Request body
{
"vendor_id": "00000000-0000-4000-8000-000000000003",
"external_bill_id": "bill_demo_123",
"bill_number": "BILL-1001",
"issue_date": "2026-05-20",
"due_date": "2026-06-19",
"line_items": [
{
"description": "Contractor services",
"quantity": 1,
"unit_amount_cents": 75000
}
]
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000004",
"external_bill_id": "bill_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"total_cents": 75000,
"currency": "USD"
},
"bill": {
"id": "00000000-0000-4000-8000-000000000004",
"external_bill_id": "bill_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"total_cents": 75000,
"currency": "USD"
}
}POST/api/v1/bills/{id}/postPost bill
Posts an eligible bill to A/P and expense.
View
/api/v1/bills/{id}/postPost bill
Posts an eligible bill to A/P and expense.
postBillcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/bills/00000000-0000-4000-8000-000000000004/post \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { postBill } from "@/lib/sdk";
await postBill({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
billId: "00000000-0000-4000-8000-000000000004",
});Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000004",
"external_bill_id": "bill_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"total_cents": 75000,
"currency": "USD"
},
"bill": {
"id": "00000000-0000-4000-8000-000000000004",
"external_bill_id": "bill_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"total_cents": 75000,
"currency": "USD"
},
"action": {
"type": "posted",
"status": "completed"
}
}POST/api/v1/bills/{id}/reverseReverse bill
Creates a reversing journal entry for an eligible posted bill.
View
/api/v1/bills/{id}/reverseReverse bill
Creates a reversing journal entry for an eligible posted bill.
reverseBillcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/bills/00000000-0000-4000-8000-000000000004/reverse \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"reversal_reason": "Entered in error"
}'SDK snippet
import { reverseBill } from "@/lib/sdk";
await reverseBill({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
billId: "00000000-0000-4000-8000-000000000004",
reversalReason: "Entered in error",
});Request body
{
"reversal_reason": "Entered in error"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000004",
"external_bill_id": "bill_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "reversed",
"total_cents": 75000,
"currency": "USD"
},
"bill": {
"id": "00000000-0000-4000-8000-000000000004",
"external_bill_id": "bill_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "reversed",
"total_cents": 75000,
"currency": "USD"
},
"action": {
"type": "reversed",
"status": "completed"
}
}Vendor Payments
Manage vendor payment records and post them to reduce A/P.
Module guidance: bills_ap
POST/api/v1/vendor-paymentsCreate vendor payment
Creates an operational vendor payment record with allocations.
View
/api/v1/vendor-paymentsCreate vendor payment
Creates an operational vendor payment record with allocations.
createVendorPaymentcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/vendor-payments \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"amount_cents": 75000,
"payment_date": "2026-05-20",
"cash_account_id": "00000000-0000-4000-8000-000000000011",
"allocations": [
{
"bill_id": "00000000-0000-4000-8000-000000000004",
"amount_cents": 75000
}
]
}'SDK snippet
import { createVendorPayment } from "@/lib/sdk";
await createVendorPayment({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
vendorPayment: {
externalVendorPaymentId: "vp_demo_123",
vendorId: "00000000-0000-4000-8000-000000000003",
amountCents: 75000,
paymentDate: "2026-05-20",
cashAccountId: "00000000-0000-4000-8000-000000000011",
allocations: [{ billId: "00000000-0000-4000-8000-000000000004", amountCents: 75000 }],
},
});Request body
{
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"amount_cents": 75000,
"payment_date": "2026-05-20",
"cash_account_id": "00000000-0000-4000-8000-000000000011",
"allocations": [
{
"bill_id": "00000000-0000-4000-8000-000000000004",
"amount_cents": 75000
}
]
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"amount_cents": 75000,
"currency": "USD"
},
"vendor_payment": {
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"amount_cents": 75000,
"currency": "USD"
}
}GET/api/v1/vendor-paymentsList vendor payments
Returns vendor payments with pagination and vendor/status filters.
View
/api/v1/vendor-paymentsList vendor payments
Returns vendor payments with pagination and vendor/status filters.
listVendorPaymentscurl example
curl -X GET https://your-ledgerline-domain.com/api/v1/vendor-payments \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { listVendorPayments } from "@/lib/sdk";
await listVendorPayments({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
vendorId: "00000000-0000-4000-8000-000000000003",
limit: 50,
});Response example
{
"data": [
{
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"amount_cents": 75000,
"currency": "USD"
}
],
"vendor_payments": [
{
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"amount_cents": 75000,
"currency": "USD"
}
],
"pagination": {
"limit": 50,
"offset": 0,
"count": 1,
"has_more": false
}
}POST/api/v1/vendor-payments/{id}/postPost vendor payment
Posts an eligible vendor payment to reduce A/P.
View
/api/v1/vendor-payments/{id}/postPost vendor payment
Posts an eligible vendor payment to reduce A/P.
postVendorPaymentcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/vendor-payments/00000000-0000-4000-8000-000000000008/post \ -H "Authorization: Bearer ll_test_replace_me"
SDK snippet
import { postVendorPayment } from "@/lib/sdk";
await postVendorPayment({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
vendorPaymentId: "00000000-0000-4000-8000-000000000008",
});Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"amount_cents": 75000,
"currency": "USD"
},
"vendor_payment": {
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "posted",
"amount_cents": 75000,
"currency": "USD"
},
"action": {
"type": "posted",
"status": "completed"
}
}POST/api/v1/vendor-payments/{id}/reverseReverse vendor payment
Creates a reversing journal entry for an eligible posted vendor payment.
View
/api/v1/vendor-payments/{id}/reverseReverse vendor payment
Creates a reversing journal entry for an eligible posted vendor payment.
reverseVendorPaymentcurl example
curl -X POST https://your-ledgerline-domain.com/api/v1/vendor-payments/00000000-0000-4000-8000-000000000008/reverse \
-H "Authorization: Bearer ll_test_replace_me" \
-H "Content-Type: application/json" \
--data '{
"reversal_reason": "Payment returned"
}'SDK snippet
import { reverseVendorPayment } from "@/lib/sdk";
await reverseVendorPayment({
baseUrl: process.env.LEDGERLINE_BASE_URL!,
apiKey: process.env.LEDGERLINE_API_KEY!,
vendorPaymentId: "00000000-0000-4000-8000-000000000008",
reversalReason: "Payment returned",
});Request body
{
"reversal_reason": "Payment returned"
}Response example
{
"data": {
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "reversed",
"amount_cents": 75000,
"currency": "USD"
},
"vendor_payment": {
"id": "00000000-0000-4000-8000-000000000008",
"external_vendor_payment_id": "vp_demo_123",
"vendor_id": "00000000-0000-4000-8000-000000000003",
"status": "reversed",
"amount_cents": 75000,
"currency": "USD"
},
"action": {
"type": "reversed",
"status": "completed"
}
}Developer Docs
Use the reference with the rest of the docs
The API Reference stays read-only. Use the surrounding docs for setup, workflow recipes, accounting boundaries, security posture, and the OpenAPI source.
Overview
Browse the technical LedgerLine developer documentation hub.
Open docs homeQuickstart
Follow the first-run setup/testing path for connected apps.
Start setup pathAuthentication
Review server-side API keys, first calls, webhooks, errors, and boundaries.
Read guideOpenAPI YAML
Download the manual OpenAPI 3.1 source for the public API.
View specAI Prompt Bridge
Preserved bridge to the Build with AI prompt library.
Open bridgeAPI Recipes
Use workflow examples for money-in, money-out, documents, and reports.
Browse recipesWebhooks
Review event schemas, idempotency, webhook signatures, and active/planned events.
Review eventsChangelog
Review API versioning, changelog, deprecation, and compatibility policy.
Review policyAccounting Model
Understand posting, reversals, A/R, A/P, reports, and documents.
Read modelSecurity
Review API-key safety, scope isolation, storage, rate limits, and gates.
Read securityBuild with AI
Use the guided setup planner when you are not sure which endpoints you need.
Open planner