Skip to content
📢 Kafinea is a compatible solution for electronic invoicing! Learn more ➔
kafinea logo svg

Kafinea

  • Features
        • Finance
          • Purchases
          • Audits & KPIs
          • Accounting
          • Invoicing
        • Management
          • Documents
          • Project Management
          • Inventory Management
          • Maintenance
        • HR
          • Employees
          • Timesheets
          • Absence Management
          • Recruitment
        • Customer Service
          • Service Contracts
          • Interventions
          • Warranty Tracking
          • Tickets
        • Sales
          • Subscriptions
          • Sales Automation
          • CRM
          • Points of Sale
        • Cross-Features
          • API
          • Extranet
          • Electronic Signature
          • Workflows
  • Use Cases
  • Pricing
  • Login
  • Discover the demo
📢 Kafinea is electronic invoicing compatible! ➔
kafinea logo svg
Kafinea

API

16
  • REST API – Bulk import (upsert)
  • REST API – Authentication
  • REST API – Retrieve a Document’s PDF
  • REST API – File Management
  • REST API – Entity Relationships
  • REST API – Introduction
  • REST API – Taxes, Tax Regions, and Territorial Rules
  • REST API – Requests and Querying
  • REST API – Refresh an online store order
  • REST API – Bulk deletion (trash)
  • REST API – Cost Accounting
  • REST API – Product Kits
  • REST API – Generic and Specific Products
  • REST API – Action links
  • REST API – Approvals
  • REST API – Full Reference (OpenAPI)

Marketing

1
  • Leads

Sales

14
  • Customer purchase orders
  • Customer accounts
  • Customer Quotes
  • Customer credit notes
  • Company Search (Sirene)
  • Margins in quotes
  • Invoicing
    • Classic Invoicing
    • Progress Invoicing
    • Issue an electronic invoice
    • Invoicing Article Consumption
    • Recurring invoicing
  • Payments
    • Customer payments
    • Linking a payment to one or more invoices
  • Price list
    • Price list administrator guide

Purchases

5
  • Supplier invoices
  • Supplier Purchase Orders
  • Suppliers
  • Supplier Credits
  • Receiving an Electronic Invoice

Catalog

8
  • Units of measure
  • Products
  • Services
  • Sourcing Management
  • The Purchase Order Assistant
  • Generic products
  • Product kits
  • Catalog margin analysis

Finance

11
  • Bank Accounts
  • Manual entries
  • SEPA Mandates
  • Third-party bank accounts
  • Bank Transactions
  • Accounting
    • Cash accounting
    • Accounting entries
    • Tools for Checking Your Accounting
    • Accounting
    • Financial statements
    • Fiscal years

Human Resources

5
  • Timesheets
  • Activities
  • Pay Slips
  • Employee Extranet
    • Leave Management
    • The employee portal card

Project management

2
  • Secure assignments using a people list
  • The responder area: view and accept my assignments

Customer Support

1
  • The Client Portal

Inventory management

4
  • Goods receipt notes
  • Delivery Notes
  • Stock movements
  • Inventory Valuation

Cash register

1
  • Cash Registers

Document management

1
  • Electronic signature

Automation

2
  • Forms
  • Workflows

Templates

2
  • Email templates
  • Document templates

Artificial intelligence

4
  • AI Workflows
  • AI Chat
  • AI Text Assistant
  • Connect ChatGPT, Claude, or Gemini to Kafinea (MCP)

Kafinea interface

9
  • Automatic saving
  • Data Import/Export
  • Navigation
  • Records
  • Lists
  • The Layout Manager
  • Links Between Elements
  • Document Lines
  • List views: Kanban, Cards, Calendar, Planning, Gantt, Geographic map, and Analysis

Settings

10
  • Tax Configuration
  • Global search
  • Access Rights
  • User preferences
  • Numbering formats
  • SMTP Settings
  • Permanent locking
  • Catalog popup filtering
  • AI agents
  • Administer the MCP server

Business Guides

2
  • Enable employees to complete their HR record independently
  • Mobilizing thousands of field workers at scale
  • Kafinea
  • Documentation
  • API
  • REST API – Cost Accounting
View Categories

REST API – Cost Accounting

6 minutes

0:00 / 6:25
  • View as Markdown Open this page as plain Markdown (opens in a new tab)
  • Open in ChatGPT Ask questions about this page (opens in a new tab)
  • Open in Claude Ask questions about this page (opens in a new tab)
  • Open in Google AI Studio Ask questions about this page (Google account required) (opens in a new tab)

The API allows you to view posted allocations, cost accounting statements, and their reconciliation with general ledger accounting. It also allows you to configure dimensions, correct a recorded line, and reclassify a share after closing.

The operations below use the REST API session. The rights of the logged-in user apply to the requested company, document, dimensions, and values.

View Figures #

GET Operation Result
analytic_entry Recorded shares of an accounting entry, with their dimensions, values, and origin. Parameter: id, the Webservice ID of the entry.
analytic_axis_totals Debit, credit, and net amount per dimension value. Parameters: organizationId, dateFrom, dateTo, axisId, accountPrefix optional.
analytic_cross_axis Cross-tabulation of two dimensions, with “Unallocated,” totals, and reconciliation indicators. Parameters: company, dates, rowAxisId, columnAxisId.
analytic_profit_and_loss Cost accounting income statement and comparison with the general ledger total. Parameters: company, dates, axisId, analyticValueId optional.
analytic_general_ledger General ledger lines filtered by dimension, value, account, and optionally a second dimension. Parameters: company, dates, axisId, analyticValueId, accountPrefix, secondAxisId, secondValueId.
analytic_key_distribution Shares of a fixed key and available values. Parameter: id, the Webservice ID of the key.

The income statement, general ledger, cross-tabulation, and dashboard all accept allocationView: after (default) includes validated closing allocations, before gives the amounts before allocation.

In reporting operations, company and dimension IDs are the numeric record identifiers; document and key IDs use the Webservice Nx123 format. Dates are in AAAA-MM-JJ format.

Amounts are expressed in the company’s accounting currency. “Unallocated” is included in the cost accounting totals; a coverage gap separately indicates general ledger entries that do not yet have recorded shares. For two companies with different accounting currencies, request two separate reports.

Enter or Correct a Line Allocation #

Use the POST update_analytic_line_choice operation to change a dimension on an already recorded line. The operation updates the selection, regenerates the entries, and returns the recorded allocation. It requires an open accounting period and the right to modify both the document and the cost allocation.

Parameter Value
sourceId Webservice ID of the supplier invoice or manual entry.
lineKey Stable key of the line, returned with the recorded line.
axisId Webservice ID of the dimension.
mode automatic, value, key, or unallocated.
targetId Webservice ID of the value for value, or of the allocation key for key; empty string in other cases.
curl -X POST 'https://apps.kafinea.com/YourKafinea/webservice.php' \
  -d 'operation=update_analytic_line_choice' \
  -d 'sessionName=YOUR_SESSION_ID' \
  -d 'sourceId=81x123' \
  -d 'lineKey=00000000-0000-4000-8000-000000000001' \
  -d 'axisId=82x456' \
  -d 'mode=value' \
  -d 'targetId=83x789'

The line key must come from the API response for the relevant document. On a supplier invoice, it appears with the document lines; on a manual entry, with its accounting lines. The line’s sequence number and account number do not replace this key.

To revert to the company’s rules, send mode=automatic and an empty targetId. To keep the amount in the analysis without a value on this dimension, send mode=unallocated. A fixed key can split the same line across several values; the shares are calculated from the amount actually posted.

Reclassify After Closing #

For a closed period, the POST reclassify_analytic_allocation operation records a correction dated the current day in an open period. It creates two cost accounting entries with opposite amounts: the allocation for the closed period and the general ledger entry remain unchanged.

Parameter Value
allocationId Webservice ID of the share, provided in analytic_entry under portions[].id.
axisId Webservice ID of the dimension to correct.
targetValueId Webservice ID of the new value; empty string for “Unallocated.”
reason Explicit reason, 5 to 255 characters.

The operation requires a period open as of the current date, full accounting rights, and the same accounting currency for both periods. A share that has already been reclassified requires an accounting review before another correction. The cost accounting ledger shows both entries at their respective dates; cross-tabulations and the income statement reflect their net effect.

Allocate Shared Amounts at Closing #

Cycles, keys, and indicators are created and modified like ordinary records. The following operations read, simulate, and validate allocations. IDs are written in Webservice format; unallocated designates amounts with no value on the dimension. Amounts are decimal strings in the company’s accounting currency.

Operation Method Role Parameters
analytic_closing_cycles GET The company’s cycles in their order, with their key, their allocated values, and what remains to be corrected. organizationId
analytic_closing_simulation POST Simulation of an allocation, without posting: amount to allocate, already allocated in the fiscal year, amount moved, recipients with base, percentage and amount, warnings. postable indicates whether validation will pass. organizationId, dateFrom, dateTo, cycleIdsJson optional (JSON list), replaceBatchId optional
post_analytic_closing POST Validates the simulated allocation with the same parameters, dated dateTo. same parameters
analytic_closing_history GET The company’s allocations, from most recent to oldest, and the “up to date” status of the latest one. organizationId, limit optional
analytic_closing_batch GET Detail of an allocation by cycle. batchId
cancel_analytic_closing POST Cancels the company’s most recent allocation, as long as its period is open. batchId
analytic_indicator_quantities GET Quantities of an indicator for a company and a year, by month, quarter, or year. indicatorId, organizationId, year, granularity optional
update_analytic_indicator_quantities POST Records quantities; an empty quantity clears the period. indicatorId, organizationId, quantitiesJson: list of {value_id, start, end, quantity}
update_analytic_cycle_senders POST Replaces the values across which a cycle allocates amounts. id, valueIdsJson: list of value IDs and unallocated

A validation is rejected, with an explicit message, if a cycle has an error, if there is nothing new to allocate, if the accounting period is closed, or if the cycle has already been allocated as of that date. replaceBatchId reruns the last allocation, replacing it. Each warning carries a code: indicator_partial (quantities do not cover the entire period) or senders_excluded (values allocated by the cycle are excluded from the recipients). The detail of an allocation retains, for each cycle, the key and its description, the period read, the warnings, and, for each recipient, its base, percentage, and amount at the time of validation. The full process is described in Allocate Shared Amounts at Closing.

Configuring Dimensions and Keys #

Dimensions, values, mappings, rules, and keys are settings accessible through the usual read and write operations, depending on the user’s rights. Check the available fields and the company scope before writing. The update_analytic_key_distribution operation replaces all shares of a fixed key at once; the total must be exactly 100%.

The MCP server and the Kafinea Assistant provide access to these same statements, to line-level corrections, dated reclassification, and closing allocations, subject to their data modification controls. A setting change does not rewrite amounts already posted.

Related References #

  • Understanding Cost Accounting
  • Allocating Supplier Invoice Lines
  • Allocating a Manual Entry
  • Correcting an Allocation After Closing
  • Allocating Shared Amounts at Closing
Index
  • View Figures
  • Enter or Correct a Line Allocation
  • Reclassify After Closing
  • Allocate Shared Amounts at Closing
  • Configuring Dimensions and Keys
  • Related References

An all-in-one software designed for SMEs. Take advantage of the automation capabilities and flexibility of our business management platform to make work easier for all your employees.

RESOURCES

Blog
Brand Guidelines
Distributors
Help
Security

Customer portal
ABOUT

About Us
Contact Us
Cookie Policy
FAQ
Legal Notice
Privacy Policy
Terms of Service

Electronic invoicing compatible solution
French Tech Grand Paris Logo
FINANCE

Accounting
Audits & KPIs
Invoicing
Purchases

MANAGEMENT

Documents
Inventory Management
Maintenance
Project Management

HR

Absence Management
Employees
Recruitment
Timesheets

CUSTOMER SERVICE

Interventions
Service Contracts
Tickets
Warranty Tracking

SALES

CRM
Points of Sale
Sales Automation
Subscriptions

© 2026 Madiasoft - Kafinea

24 rue Louis Blanc, 75010 PARIS, France

+33 1 70 06 05 41

Facebook Linkedin
kafinea logo svg
Gérer le consentement aux cookies
Pour offrir les meilleures expériences, nous utilisons des cookies pour stocker et/ou accéder aux informations des appareils. Le fait de consentir à ces cookies nous permettra de traiter des données telles que le comportement de navigation ou les ID uniques sur ce site. Le fait de ne pas consentir ou de retirer son consentement peut avoir un effet négatif sur certaines caractéristiques et fonctions.
Fonctionnel Always active
Le stockage ou l’accès technique est strictement nécessaire dans la finalité d’intérêt légitime de permettre l’utilisation d’un service spécifique explicitement demandé par l’abonné ou l’internaute, ou dans le seul but d’effectuer la transmission d’une communication sur un réseau de communications électroniques.
Préférences
Le stockage ou l’accès technique est nécessaire dans la finalité d’intérêt légitime de stocker des préférences qui ne sont pas demandées par l’abonné ou la personne utilisant le service.
Statistiques
Le stockage ou l’accès technique qui est utilisé exclusivement à des fins statistiques. Le stockage ou l’accès technique qui est utilisé exclusivement dans des finalités statistiques anonymes. En l’absence d’une assignation à comparaître, d’une conformité volontaire de la part de votre fournisseur d’accès à internet ou d’enregistrements supplémentaires provenant d’une tierce partie, les informations stockées ou extraites à cette seule fin ne peuvent généralement pas être utilisées pour vous identifier.
Marketing
Le stockage ou l’accès technique est nécessaire pour créer des profils d’internautes afin d’envoyer des publicités, ou pour suivre l’internaute sur un site web ou sur plusieurs sites web ayant des finalités marketing similaires.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Voir les préférences
  • {title}
  • {title}
  • {title}
  • Features
    • Finance
      • Purchases
      • Audits & KPIs
      • Accounting
      • Invoicing
    • Management
      • Documents
      • Interventions
      • Project Management
      • Inventory Management
    • HR
      • Employees
      • Timesheets
      • Absence Management
      • Recruitment
    • Customer Service
      • Service Contracts
      • Warranty Tracking
      • Maintenance
      • Tickets
    • Sales
      • Subscriptions
      • Sales Automation
      • CRM
      • Points of Sale
    • Cross-Features
      • API
      • Extranet
      • Electronic Signature
      • Workflows
  • Use Cases
  • Pricing
  • Login
  • Discover the demo