---
title: ERPNext API Integration on Truto
slug: erpnext
category: Accounting
canonical: "https://truto.one/integrations/detail/erpnext/"
---

# ERPNext API Integration on Truto



**Category:** Accounting  
**Status:** Generally available

## Unified APIs

### Unified Accounting API

- **Accounts** — Account represents bank accounts or a general ledger account
- **Invoices** — Invoices represents the invoices of the company
- **Journal Entries** — Journal Entries represents the journal entries of the company
- **Payments** — Payments represents the payments of the company
- **Transactions** — Transactions represents the transactions of the company

## How it works

1. **Link your customer's ERPNext account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach ERPNext.** The Proxy API is a 1-to-1 mapping of the ERPNext API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Sync expense data into ERPNext without CSV uploads** — Spend management and corporate card platforms can push categorized expenses directly into ERPNext as journal entries or purchase invoices, eliminating the manual month-end reconciliation their customers dread.
- **Automate payroll journal entries into ERPNext** — Payroll SaaS providers can post multi-line journal entries after each pay run — splitting wages by cost center, handling tax liabilities, and crediting cash accounts — so controllers never manually key in payroll data again.
- **Close the order-to-cash loop from your platform to ERPNext** — E-commerce, CRM, or field service platforms can create sales invoices and payment entries in ERPNext the moment a deal closes or a customer pays, keeping AR accurate in real time without double-entry.
- **Power AR automation with live ERPNext invoice and payment data** — B2B payments and collections platforms can pull outstanding sales invoices and customer records from ERPNext to drive dunning workflows, then write payment entries back when funds are collected.
- **Let users map GL accounts from ERPNext inside your product** — Any SaaS app that needs its users to categorize transactions — procurement tools, billing platforms, expense managers — can pull the ERPNext chart of accounts so users tag line items to the correct GL codes before data is pushed back.

## What you can build

- **Chart of Accounts picker for transaction categorization** — Pull your customer's ERPNext account list into a native dropdown so end users can map expenses, revenue, or line items to the correct GL accounts without leaving your app.
- **Automated purchase invoice creation from approved bills** — Push supplier bills from your AP automation workflow directly into ERPNext as purchase invoices, complete with line-item detail and account mappings.
- **Real-time payment entry sync for invoice reconciliation** — Write payment entries into ERPNext allocated against specific sales or purchase invoices so your customers' open AR/AP balances stay current automatically.
- **Multi-line journal entry posting for complex transactions** — Post summarized payroll runs, depreciation schedules, or intercompany transfers as detailed multi-leg journal entries with cost center and account breakdowns.
- **GL transaction export for reporting and audit dashboards** — Read general ledger entries from ERPNext to power cash-flow analysis, spend visibility dashboards, or audit trail views inside your product.
- **Bidirectional invoice status tracking** — Create sales invoices in ERPNext from your platform and read payment status back so your users see real-time paid/unpaid state without switching tools.

## FAQs

### How does authentication work for ERPNext integrations through Truto?

ERPNext supports API key and secret-based authentication as well as OAuth 2.0 (available on Frappe Cloud deployments). Truto handles credential storage, token management, and session lifecycle so your team doesn't manage auth flows directly.

### Does ERPNext have rate limits on its API?

ERPNext's rate limits depend on the hosting environment. Frappe Cloud instances enforce configurable rate limits, while self-hosted deployments may have none by default but can be constrained by server resources. Truto manages retry logic and backoff strategies to handle rate-limited responses gracefully.

### How does ERPNext's draft-and-submit workflow affect invoice creation via API?

ERPNext requires transactional documents like Sales Invoices, Purchase Invoices, and Journal Entries to be created as drafts first, then explicitly submitted to post them to the general ledger. Any integration needs to handle both steps — creating the document and then triggering the submit action.

### What Unified API resources map to ERPNext?

Truto's Unified Accounting API covers Accounts, Invoices, Journal Entries, Payments, and Transactions. These map to ERPNext's Account, Sales Invoice, Purchase Invoice, Journal Entry, Payment Entry, and GL Entry DocTypes respectively. Specific tools for ERPNext are built on request to match your workflow needs.

### Can I access custom fields added to ERPNext DocTypes?

Yes. ERPNext's metadata-driven architecture means custom fields are exposed through the same API as standard fields. Truto can surface these custom fields alongside unified model data, so your integration respects your customers' unique ERPNext configurations.

### Is ERPNext's API automatically generated, and what does that mean for data access?

ERPNext auto-generates REST API endpoints for every DocType in the system via the Frappe framework. This means any standard or custom document — accounts, invoices, payments, journal entries — is API-accessible out of the box with full CRUD support, making it straightforward to read and write financial data programmatically.
