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 – Approvals
View Categories

REST API – Approvals

5 minutes

0:00 / 5:55
  • 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 covers the entire approval cycle: configuring a module’s workflow, requesting approval for a record, responding to steps, and tracking requests. The controls match those of the screens: whatever a screen rejects, the API rejects with the same reason. The same operations are available to the Kafinea AI assistant and to assistants connected to Kafinea.

All operations use the REST API session. Identifiers are those of the API (89x47808); a simple number is also accepted.

Operation Method Who Effect
approval_circuit_read GET administrator Workflows, or a module’s workflow with its templates and expected format
approval_circuit_configure POST administrator Check, save, enable, disable, or delete a workflow
approval_circuit_simulate GET administrator What a workflow would require for 1 to 20 records, without saving anything
approval_inbox GET everyone Items awaiting their response, their requests, and requests from others they are authorized to view
approval_request_read GET everyone The approval of a record, as shown in its panel
approval_request POST everyone Request approval for a record they can modify
approval_answer POST the approver Their own response to a step assigned to them
approval_cancel POST requester or administrator Cancel a pending request

Request and response operations are available when the Approvals feature is active.


1. Configuring a workflow #

approval_circuit_read without parameters lists the workflows and modules that can receive one. With moduleName, it returns the module’s workflow (circuit, with its revision), the starting templates (templates), and the format of a workflow (contract).

curl -G 'https://apps.kafinea.com/YourKafinea/webservice.php' \
  --data-urlencode 'operation=approval_circuit_read' \
  --data-urlencode 'sessionName=YOUR_SESSION_ID' \
  --data-urlencode 'moduleName=Quotes'

A workflow is described in its entirety:

{
  "label": "Devis au-delà de 5 000 € HT",
  "active": true,
  "condition": [{"fieldname": "pre_tax_total", "operation": "greater than", "value": "5000", "groupid": "0"}],
  "finalizeOnApproval": true,
  "steps": [{
    "label": "Responsable commercial",
    "condition": [],
    "approver": {"mode": "manager", "managerOf": "requester"},
    "dueDays": 2,
    "summaryTemplate": "Devis $subject : $pre_tax_total € HT"
  }]
}
Element Content
condition Records that must be approved, in the workflow condition format; [] for all. groupid 0: all these criteria; 1: at least one of them
steps[].approver fixed with ownerId (a user or a group), manager with managerOf (requester or owner), or field with expression (for example assigned_user_id)
steps[].condition Optional: a step whose condition is not met is skipped
steps[].stepId To be returned as read: requests already made continue to name their step
watchedFields Fields whose modification after approval makes it void, in addition to those read by conditions (always monitored); watchedLabels lists them all, with their labels

approval_circuit_configure receives moduleName, action and, depending on the action, definition (the workflow in JSON) and revision:

action Effect
validate Checks definition without saving anything and returns valid and the problems list (each with path, code and message)
save Saves definition in full; revision is the one read, 0 to create the workflow for a module that does not have one
activate, deactivate Enables or disables the workflow of the revision read
delete Deletes the workflow; requests already made remain
curl -X POST 'https://apps.kafinea.com/YourKafinea/webservice.php' \
  --data-urlencode 'operation=approval_circuit_configure' \
  --data-urlencode 'sessionName=YOUR_SESSION_ID' \
  --data-urlencode 'moduleName=Quotes' \
  --data-urlencode 'action=save' \
  --data-urlencode 'revision=3' \
  --data-urlencode 'definition={"label":"Devis au-delà de 5 000 € HT","active":true,…}'

An active workflow must be capable of being approved: each step has a valid approver. An inactive workflow can remain as a draft.

Before enabling, approval_circuit_simulate shows, for saved records (recordIds, a JSON list) and a requester (requesterId, the connected user by default), if the workflow condition is met and who would be solicited at each step, or why no one could respond (error). Pass definition to test a workflow before saving it. Nothing is saved or sent.


2. Requesting, responding, tracking #

approval_inbox returns, depending on box: toAnswer (steps awaiting the user’s response, directly or through one of their groups), requested (their requests), or others (other pending requests they are authorized to view). Without box, all three. Each step to be processed carries its lineId.

approval_request_read with recordId returns the record’s current request, its steps (approver, response, reason, canAnswer for the one the user can respond to) and wouldAsk: what a new request would solicit.

approval_request with recordId requests approval on behalf of the connected user. It is rejected when nothing requires approval or when a request is already pending.

approval_answer receives lineId, answer (approve, refuse or changes) and reason, mandatory for rejecting or requesting modifications:

curl -X POST 'https://apps.kafinea.com/YourKafinea/webservice.php' \
  --data-urlencode 'operation=approval_answer' \
  --data-urlencode 'sessionName=YOUR_SESSION_ID' \
  --data-urlencode 'lineId=194x48180' \
  --data-urlencode 'answer=approve'

The response is always that of the connected user: no parameter designates another user. It is rejected when the step is not assigned to this user or to one of their groups (including administrators), when it is their own request, or when another member of the group has already responded.

approval_cancel with approvalId cancels a pending request: by its requester or an administrator.


3. Record approval status #

Each record of a module that has a workflow carries the read-only field mdsapprovalstatus: empty as long as no approval has been requested, then APPROVAL_STATUS_PENDING, APPROVAL_STATUS_APPROVED, APPROVAL_STATUS_REFUSED, APPROVAL_STATUS_CHANGES_REQUESTED, APPROVAL_STATUS_CANCELLED or APPROVAL_STATUS_OBSOLETE (void approval). It is read like any field, with retrieve or query:

curl -G 'https://apps.kafinea.com/YourKafinea/webservice.php' \
  --data-urlencode 'operation=query' \
  --data-urlencode 'sessionName=YOUR_SESSION_ID' \
  --data-urlencode "query=SELECT potentialname, amount FROM Potentials WHERE mdsapprovalstatus = 'APPROVAL_STATUS_APPROVED';"

Only approvals write to it. An approval becomes void when a monitored field of the record subsequently changes; the request then keeps the reason in its description.


4. Rejections #

A rejection starts with its code, followed by the readable reason:

Code Meaning
APPROVAL_CIRCUIT_INVALID The workflow is not valid; each problem follows, one line per problem, with its path and code
APPROVAL_CIRCUIT_REVISION_CHANGED The workflow has changed since it was read: re-read it, then perform the modification again
APPROVAL_CIRCUIT_NOT_FOUND, APPROVAL_CIRCUIT_EXISTS The module has no workflow, or already has one
APPROVAL_REFUSED The request, response, or cancellation is not permitted; the reason is the one displayed on the screen
APPROVAL_FEATURE_DISABLED The Approvals feature is not active
ACCESS_DENIED The operation is restricted to administrators
Index
  • 1. Configuring a workflow
  • 2. Requesting, responding, tracking
  • 3. Record approval status
  • 4. Rejections

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