Accounts Module API
The Accounts module provides comprehensive financial management APIs for handling payments, invoices, journal entries, and accounting operations.Payment Entry APIs
get_payment_entry
Create a payment entry document against various transaction types like invoices, orders, and expenses.Document type (e.g., “Sales Invoice”, “Purchase Invoice”, “Sales Order”, “Purchase Order”)
Document name/ID
Amount to be paid/received
Bank or cash account for the transaction
Amount in bank account currency
Party type: “Customer” or “Supplier”
Payment type: “Receive”, “Pay”, or “Internal Transfer”
Reference date for payment
A new Payment Entry document with pre-filled values
Response Properties
Response Properties
payment_type: Type of payment (Receive/Pay/Internal Transfer)company: Company nameposting_date: Payment posting datepaid_from: Source accountpaid_to: Destination accountpaid_amount: Amount to be paidreceived_amount: Amount to be receivedreferences: List of reference documents
General Ledger APIs
get_balance_on
Get the balance of an account on a specific date with optional filters for party, cost center, and finance book.Account name
Date for balance calculation
Party type: “Customer”, “Supplier”, “Employee”
Party name
Company name
Return balance in account currency
Cost center for filtering
Finance book for filtering
Account balance as of the specified date
Fiscal Year APIs
get_fiscal_year
Retrieve fiscal year information for a given date and company.Transaction date
Fiscal year name
Company name
Return as dictionary instead of tuple
Returns tuple: (fiscal_year_name, year_start_date, year_end_date)
Outstanding Invoices
get_outstanding_invoices
Get list of outstanding invoices for a party with optional filters.Party type: “Customer” or “Supplier”
Party name
List of account names
Filter invoices up to this date
Minimum outstanding amount
Maximum outstanding amount
List of outstanding invoice details
Invoice Object Properties
Invoice Object Properties
voucher_no: Invoice numbervoucher_type: Document typeposting_date: Invoice dateinvoice_amount: Total invoice amountoutstanding_amount: Pending amountdue_date: Payment due datecurrency: Invoice currency
Account Management
get_account_currency
Get the currency of an account.Account name
Currency code of the account
get_children
Get child accounts for tree view navigation.Document type: “Account” or “Cost Center”
Parent account name
Company name
Whether fetching root level accounts
List of child accounts with hierarchy information
Reconciliation APIs
reconcile_against_document
Reconcile payment entries against invoices or other documents.List of reconciliation entries
Updates the payment entry and linked documents
Company Defaults
get_company_default
Get default value for a company field.Company name
Field name from Company doctype
Default value for the specified field