DSNLint Connect: the API from your terminal
A command-line client in French and an MCP server link your local files to the v1 API. The API performs the calculations: Connect contains no rules.
One command and the documents it writes
DSNLint Connect
dsnlint-connect controler contrat-duplique.dsn \
--option fichier=contrat-duplique.dsn \
--format text \
--format json \
--format csv \
--format pdf \
--format xlsx \
--format xml \
--format powerbi| Document |
|---|
rapport-csv.zipYour programs: linked tables and their dictionary |
rapport-powerbi.zipPower BI: the tables, the model and Power Query |
rapport.jsonYour software, through a versioned contract |
rapport.pdfPrinting and archiving |
rapport.txtReading on screen |
rapport.xlsxExcel: a workbook with typed amounts and dates |
rapport.xmlIntegrations that require it |
Before you start
Download it in the application, Developers › Connect, whatever your plan. The table shows the differences between systems.
- Node.js 24Connect runs on Node.js 24. It needs no other library.
- An API addressThat of your instance, set in DSNLINT_API_URL. HTTPS is mandatory.
- An active keyA dsn_test_ or dsn_live_ key, set in DSNLINT_API_KEY. A test key only checks the published sample files.
Terminal
export DSNLINT_API_URL="https://…"
export DSNLINT_API_KEY="…"
dsnlint-connect controler exemple.dsn --format json --sortie ./rapports
dsnlint-connect paie exemple.dsn --format pdf --sortie ./paie
dsnlint-connect compta exemple.dsn --piece fec=comptabilite.fec --format json --sortie ./compta| System |
|---|
macOSKey from a private file or the environment. Documents are written after the access rights (ACLs) are checked. |
LinuxKey from a private file or the environment. Documents are written with private permissions. |
WindowsKey from the environment only. Connect writes no document there: it serves the MCP server, which returns JSON without an output folder, and the technical management of batches. |
The commands
One command per function, plus those for the two batch types. The files listed are DSN files, except for retours (return files) and regulariser (the month’s DSN file).
| Command |
|---|
controler fichier.dsnChecks a DSN file and writes the reports in the formats you ask for. |
controler-avec-pieces [fichiers…]Checks DSN files alone, or with one family of supporting documents: supplementary scheme forms (FPOC), notified rates, Urssaf data entry or a profile. |
comparer A.dsn B.dsnCompares two versions of a set of DSN files. The dsn_a and dsn_b files designate the two sets or archives. |
retours [fichiers…]Reads the official returns and matches them to the DSN files supplied. |
substitution [fichiers…]Prepares the substitution statement. |
paie [fichiers…]Produces payroll statements, payroll check files, cumulative totals, contribution liabilities and employee payroll check sheets, which are not payslips. |
egalite [fichiers…]Produces the gender equality documents, the social and economic committee (CSE) file and the Egapro sheet. |
social [fichiers…]Produces HR statements, the BDESE, the social report, the draft staff register and your clients’ portfolio. |
compta [fichiers…]Reconciles the DSN file with the FEC and produces the verification entries. |
prelevements [fichiers…]Draws up the statement of declared payment orders. |
extraire [fichiers…]Extracts data by field or by individual. |
decouper [fichiers…]Splits DSN files by establishment. |
pseudonymiser [fichiers…]Produces pseudonyms, with an optional private key. |
regulariser [fichiers…]Produces the proposal package and, where available, a candidate corrected DSN. |
lot creer fichiers…Creates a batch of checks, submits the files to it and closes it. |
lot etat idShows the technical counters of the batch. |
lot deposer id index fichierResumes the submission of a check to the batch. |
lot rapport id indexRetrieves a report, once only. |
lot cloturer idEnds the submissions to the batch. |
lot annuler idDeletes the batch and its reports. |
lots-fonctions creer nombreReserves a function batch, with no automatic submission. |
lots-fonctions etat idShows the technical counters of the batch. |
lots-fonctions deposer id index fonction [fichiers…]Submits a function and its files to the batch. |
lots-fonctions resultat id indexRetrieves a result, once only. |
lots-fonctions cloturer idEnds the submissions to the batch. |
lots-fonctions annuler idDeletes the batch and its results. |
formats, version, aide, mcpShow the formats of the standard check, the version and the help, or start the stdio server. |
A payroll discrepancy, in one command
A sample DSN file and its supplementary scheme form. The report recomputes the health cover contribution: €20.00 declared, €12.80 recomputed, a €7.20 difference.
rapport.txt · lines 32 to 34 of 68
Prévoyance et mutuelle OC-MONTANT : recalculée ; déclaré 20,00 €, recalculé 12,80 €, écart 7,20 €
Règle : Cas A ; 79 ligne 119 nature 11 montant 3 200,00 € × 0,40 % = 12,80 €, arrondi unitaire au centime ; somme par affiliation ; parts patronale et salariale non ventilées ; Centime par composant, déduit des exemples V16 cas A ; demi-centime non départagé ; tolérance 1,00 euro ; Le montant déclaré ne semble pas correspondre au calcul documenté
Référence : DSN-FPOC-presentation-V16-2026-04-24.pdf — V16 — Contrôle des Montants 79 et 81 ; cas A et BDSNLint Connect
dsnlint-connect paie oc-a-ecart.dsn \
--piece fpoc=oc-a-ecart.xml \
--option dossier=true \
--format textThe options
The options of the commands. The names and combinations allowed for each function are those of the API contract.
| Option |
|---|
--piece role=pathAdds a supporting document. Roles use the API’s names, for example fpoc or fec. |
--pieces-fichierReads a local JSON file: the ordered list of supporting documents, with role, chemin and, if needed, nom, contenant and taille_decompressee. |
--option name=valueSets a simple option. Booleans expect true or false. |
--options-fichierReads a local JSON object. Individual selections go through this file only. |
--formatChooses the document format. The other functions accept one per call; the standard check accepts several. |
--sortieNames the folder where documents are written. Without it, Connect writes to the current folder. |
--idempotenceSets the UUID of the request. Re-sending a request already processed can return 204 with no document: keep the first response. |
--verbeuxDisplays only the function, format, year and UUID before sending. It never displays a key. |
--cle-fichierReads the API key from a private file, instead of the DSNLINT_API_KEY variable. |
An MCP server for your assistant
The MCP server gives your assistant one tool per function and per batch action. The assistant is yours: DSNLint provides none, and no AI takes part in checking your DSN files.
MCP
dsnlint-connect mcpStart dsnlint-connect mcp as a stdio server in your assistant, passing the address and the keys through its environment: no tool argument contains a key. Connect opens the paths named with your user’s permissions, so allow only the ones you need. Input schemas are closed; tool descriptions are in French.
One tool per API function: controler_dsn, controler_avec_pieces, retours, substitution, paie, egalite, social, compta, prelevements, extraire, decouper, pseudonymiser, regulariser, comparer. The simple check takes fichier, formats, options, sortie and idempotences; the others take pieces, options, sortie and idempotence.
| MCP tool |
|---|
creer_lotCreates a batch of checks. Arguments: fichiers, format, options, webhook, retention_secondes. |
etat_lotShows the technical counters of the batch. Argument: id. Read-only. |
deposer_fichier_lotSubmits a file to the batch. Arguments: id, index, fichier, format, options, idempotence. |
rapport_lotRetrieves a report, once only. Tool annotated as destructive. Arguments: id, index, format, sortie. |
cloturer_lot, annuler_lotEnds the submissions, or cancels the batch (tool annotated as destructive). Argument: id. |
creer_lot_fonctionsReserves a function batch. Arguments: nombre_operations, ttl_seconds, webhook. |
etat_lot_fonctionsShows the technical counters of the function batch. Argument: id. Read-only. |
deposer_operation_lotSubmits a function and its files. Arguments: id, index, fonction, pieces, options, idempotence. |
resultat_lot_fonctionsRetrieves a result, once only. Tool annotated as destructive. Arguments: id, index, sortie. |
cloturer_lot_fonctions, annuler_lot_fonctionsEnds the submissions, or cancels the batch (tool annotated as destructive). Argument: id. |
formats_disponiblesLists the 8 formats of the standard check. No arguments. Read-only. |
Security of keys and files
Connect reads your keys from the environment or from a private file, and writes your documents with restricted permissions only.
- The address comes from DSNLINT_API_URL and the key from DSNLINT_API_KEY, or from a private file named with --cle-fichier. No key is accepted as an argument or in an MCP tool.
- HTTPS is mandatory. HTTP is reserved for the machine’s own local addresses, for tests. Connect follows no redirects and never retries a request.
- Before writing a document or replying to your assistant, Connect searches its content for your keys of 16 bytes or more. The --verbeux option never displays a key.
- Errors are constant messages in French. They reproduce no DSN data, selection or entry, and no technical message from the server.
- The pseudonymisation key is separate from the API key. It comes from DSNLINT_PSEUDONYMISATION_KEY, from DSNLINT_PSEUDONYMISATION_KEY_FILE or from --cle-pseudonymisation-fichier; its file must be private.
- On macOS and Linux, new documents get mode 600 and created folders mode 700. Connect never overwrites an existing file or an output link.
- Pseudonyms remain personal data: they do not make DSN files fit to be filed.
Limits to know about
The API limits, then the formats, batches and billing as Connect sees them. Detailed combinations are in the API contract.
- A file is one DSN submission in the sense of Net-entreprises: one monthly DSN, which may cover several establishments.
- Maximum size: 128 MiB (134,217,728 bytes) and 5,000,000 lines per file, which is of the order of 50,000 declared individuals. Beyond that, the file is refused with a clear message: send one file per establishment. For a readable document (PDF, Excel, CSV for Excel), a very large DSN can be refused for lack of memory: ask for JSON or machine CSV instead.
- Immediate response: 120 seconds at most per exchange; the report is streamed, even a very large one.
- Deferred response (on request): the report is kept in memory for 300 seconds and can be read once only; 2 MiB per report by default.
- Batches: from 1 to 32 files.
- Request a deferred response from the API with the standard Prefer header (value respond-async, optionally with wait=N): a check that finishes within that time returns 200, otherwise 202 gives the batch address. Send back the cookies received and read the report once, within 5 minutes after the check finishes.
- The standard check and the check with supporting documents return text, json, csv, jsonl, pdf, xlsx, xml and powerbi; jsonl is reserved for them, and the check with supporting documents returns it only when no file is attached. Official returns, substitution, payroll, HR statements and direct debits return 6 formats: text, json, csv, pdf, xlsx and powerbi, with neither xml nor jsonl. Gender equality adds egapro to these, and accounting adds fec.
- DSNLint Connect also lets you mask the values in the report (--option masquer_valeurs=true) and receive the JSON Lines stream (--format jsonl, with --sortie) for the standard check and the check with supporting documents when no file is attached, and compare two versions (the comparer command, and the MCP tool of the same name).
- Connect converts no format and decompresses nothing. The CSV of the business reports and Power BI come as ZIP files, and a ZIP received stays a ZIP.
- One request accepts 512 supporting documents at most. Its multipart body is limited to 128 MiB in Connect; the manifest and each JSON file of options or supporting documents, to 1 MiB. An MCP input message is limited to 128 KB; for a large selection of individuals, use --options-fichier on the command line.
- An archive has 4,096 members at most, and the archives of a request, 128 MiB decompressed at most, in total.
- A batch holds 1 to 32 checks or operations, indexed from 0 to 31. Each result is limited to 2 MiB by default on the API side. Transformations, corrections, the FEC alone and the accounting package stay outside batches.
- A pre-registered webhook is mandatory for lot creer and optional for lots-fonctions creer. Each result is retrieved once only, and cancelling also destroys results already calculated.
- A batch gets a deadline of 300 seconds when it is created. Once the batch is closed and finished, a new deadline of 1 to 300 seconds, of your choosing, applies: the total time can exceed five minutes.
- Each format requested is a separate call and counts towards call quotas. Billing counts the maximum number of declared individuals checked per establishment and per declared month: another format or a new check of the same DSN file does not raise that maximum.
Exit codes
The standard check keeps its own codes. The other functions keep the business code from the API; MCP returns it in code_sortie and flags a call error with isError.
| Exit code |
|---|
0Standard check: no blocking anomaly. Other functions: the business code 0 given by the API. |
1Standard check: at least one blocking anomaly. Check with supporting documents: a warning with the strict option. |
2Standard check: usage error. Check with supporting documents: at least one blocking anomaly. Payroll, accounting, direct debits, incomplete corrections: a business result, with a complete document. |
3Technical error of the standard check. The check with supporting documents can also return 3. |
10Some returns not read or only partly read. The check with supporting documents can also return 10. |
Frequently asked questions
Yes. The thirteen functions with supporting documents, including the comparison of two versions, are available alongside the standard check and the two batch types. Your key’s permissions still apply.
No. Connect writes the body of the API response byte for byte. The JSON check keeps its dated API envelope, and a JSON response over MCP is also decoded so you can read it.
Each format is a separate call, counted in the call quotas. Billing counts the maxima of declared individuals per establishment and per declared month, even a past one: another format or a new check of the same DSN file does not raise those maxima.
Its initial deadline is 300 seconds. When the closed batch finishes, a new deadline starts: the retrieval period you chose, from 1 to 300 seconds. The total time can exceed five minutes. Each result is retrieved once only.
Each new request uses fresh randomness. To reproduce the same pseudonyms, use the same supporting documents and the same private key.
No. Correction proposals must be applied in your payroll. Connect makes no payments and files nothing on net-entreprises.
No. Use a JSON MCP tool with no output folder, or a system where the private permissions of documents can be checked.
No. Connect embeds no rules: the API does the calculations, and the internal binary is never supplied. The assistant you connect is your own, and no AI takes part in checking your DSN files.
Integrate Connect with your tools
The API reference describes every route Connect calls. The pricing page presents the Cloud and Dedicated plans.