---
title: "General ledger: CSV columns, entities, and import API"
description: "Business scope, exact column headers, entity resolution, text and multipart ledger import (.csv/.xlsx), JSON counters and per-line errors."
locale: en
canonical: https://www.ninonai.com/en/guides/ingest-ledger-csv-api
last_updated: "2026-09-01"
---

# Feed the general ledger: ERP export, columns, and API call

Any ERP that can export rows as a table can feed Ninon. Each imported row becomes a GL line tied to a group entity and a period—the material for intercompany matching. To trigger matching via API afterwards, see the “REST integration” guide in the same guides section.

## Minimum business path

(1) Declare the legal entities in scope inside Ninon. (2) Create or open a reconciliation session for the period you are closing (often YYYY-MM, aligned with your close calendar). (3) Load relevant lines with the CSV or Excel import described in this guide (recommended for Sage 1000 and other ERPs without a live connector). (4) Run matching from the dashboard or via the REST integration guide once lines are present.

## CSV header row

The first row may use canonical keys (entity, date, amount, currency, description, accountCode, period) or FR/EN aliases (entity name, posting date, amount, debit, credit, currency, wording, account, period, document, partner). A column map can be saved per organisation. UTF-8; BOM tolerated.

## What each field means for group finance

entity (or entityId, name, internal code): maps to a Ninon entity — UUID no longer required; ambiguity rejects the row, no silent insert. period: reporting period (e.g. 2025-03). date: posting date (ISO-8601). amount: signed amount, or debit/credit columns. currency. accountCode. description. reference (optional). partnerCode (optional, corridors). source: defaults to csv.

## CSV import endpoint

Two entry points share the same validation rules. (1) Method POST, path /api/integrations/csv: JSON body with a csvText field containing the full CSV as one string (header included). (2) Method POST, path /api/integrations/ledger-import: multipart/form-data with a single field file — UTF-8 .csv or .xlsx (first worksheet only; row 1 must be the same headers as below). Max upload size 10 MB. Authentication: signed-in session. Roles: admin or member (not viewer). When billing enforcement is enabled on this Ninon deployment, an active subscription is required (HTTP 402).

## Resolve entityId (API)

Each row resolves by Ninon id, internal entity code, or normalised name. Ambiguous or unknown tokens reject the row — no silent insert. List entities via the API (id, name, code, country, currency). Create with the admin API (name, country, currency, optional code).

## JSON response

inserted: GL rows created. scanned: number of data rows in the file (header excluded from this count). parsedValid: rows that passed field validation. skippedWrongOrg / skippedBadDate: counts of rejected rows after validation. errors: array of objects (line, message, code) for parse-time and insert-time issues; errorsTruncated is true if more than 80 errors were omitted. Malformed CSV/Excel rows appear in errors with a line number when known.

## Sitemap

See the full [sitemap](/en/sitemap.md) for all pages.
