DSN check options
Options set what the report contains and how it is presented. The status of the file comes from the standard check, which includes the checks of the DSN standard and the reporting conventions declared by DSNLint, notably the stop at 200 anomalies without the complet option. With POST /v1/controles, you pass options as URL parameters; for the check with supporting documents, they go in the options field of the multipart manifest. With DSNLint Connect, you pass them one by one with --option name=value. A boolean takes true or false.
- Option
- complet
- What it does
- Boolean, false by default. Without it, the report stops at 200 anomalies and says so. With it, the report lists every anomaly.
- Option
- declarations
- What it does
- Boolean, false by default. Adds the status of each declaration in the file: its rank, SIREN, NIC, nature, month and status. The status of the file does not change.
- Option
- enrichi
- What it does
- Boolean. Adds the official sources, the labels of the codes, the context (individual and contract), the groupings, the declared totals and, when there is no blocking anomaly, the score out of 100. Implies complet. Requires limite to be 0.
- Option
- etendu
- What it does
- Boolean. Adds the additional checks validated for the DSN’s edition, counted separately: the verdict, counts, score and exit code remain those of the standard check. Implies complet. Requires limite to be 0.
- Option
- detail
- What it does
- Boolean. Gives the full statements and details of unassessed checks in the text report. For the check, requires enrichi, etendu,
multi_fichiersor a profile; for the comparison of versions, requires enrichi or etendu. On its own, it is refused.
- Option
- strict
- What it does
- Boolean. Makes the check fail when a warning of the standard check is present, without changing the report. Additional warnings stay neutral. This option only exists for the check with supporting documents.
- Option
- limite
- What it does
- Integer from 0 to 10,000, 0 by default. Limits the number of anomalies displayed, never the verdict or the counts. Must stay at 0 with enrichi, etendu,
multi_fichiersor a profile.
- Option
masquer_comptes- What it does
- Boolean, false by default. Shows only the last four characters of IBANs and BICs in the report, in every format. This also applies to a valid IBAN mistakenly written outside the banking fields, and to a BIC when it is labelled as such or written with an IBAN. The check runs on the original data: the accounts and verdict do not change.
- Option
masquer_valeurs- What it does
- Boolean, false by default. Removes every value read in the DSN file from the report, in every format. The verdict, severities, counts, exit codes and computed amounts remain. An individual is named by rank (“Individu 3”), a file by its input rank (fichier-1.dsn), and its SHA-256 is kept. It is separate from
masquer_comptes. With DSNLint Connect, add--optionmasquer_valeurs=true. See the section “Check without any value read from the DSN”.
- Option
- annee
- What it does
- Integer from 2000 to 2100. Check year; by default, the UTC year of the request. Always set it to replay a check identically. The check with supporting documents calls it
annee_controle, from 1900 to 9999.
- Option
- fichier
- What it does
- Text of at most 1,024 bytes. Name of the file as it appears in the report; message.dsn by default. The API never opens this name: it is just a label.
- Option
- format
- What it does
- One of text (default), json, jsonl, csv, pdf, xlsx, xml and powerbi. Chooses the format of the document. With jsonl, the check returns a JSON Lines stream (media type application/jsonl): one line per file, then a summary line. The check with supporting documents returns jsonl only when no file is attached: with a profile, forms, notified rates or Urssaf data entry, the request is refused (422
options_incompatibles). With DSNLint Connect, the format is chosen with--format, jsonl included; the stream is then written to the output folder. See the section “Receive DSN checks as JSON Lines”.
Options can be combined. Here is the check from the previous section: in curl, options are URL parameters.
POST /v1/controles
curl -X POST "$DSNLINT_API_URL/v1/controles?format=text&enrichi=true&etendu=true&fichier=contrat-duplique.dsn" \
-H "Authorization: Bearer $DSNLINT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/octet-stream" \
--data-binary @contrat-duplique.dsn \
-o rapport.txtPOST /v1/controles
import { readFile, writeFile } from "node:fs/promises";
import { randomUUID } from "node:crypto";
const headers = {
"Authorization": "Bearer " + process.env.DSNLINT_API_KEY,
"Idempotency-Key": randomUUID(),
"Content-Type": "application/octet-stream",
};
const body = await readFile("contrat-duplique.dsn");
const response = await fetch(process.env.DSNLINT_API_URL + "/v1/controles?format=text&enrichi=true&etendu=true&fichier=contrat-duplique.dsn", {
method: "POST", headers, body, signal: AbortSignal.timeout(120000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
await writeFile("rapport.txt", new Uint8Array(await response.arrayBuffer()));POST /v1/controles
import os
import uuid
import urllib.request
headers = {
"Authorization": "Bearer " + os.environ["DSNLINT_API_KEY"],
"Idempotency-Key": str(uuid.uuid4()),
"Content-Type": "application/octet-stream",
}
with open("contrat-duplique.dsn", "rb") as source:
body = source.read()
request = urllib.request.Request(os.environ["DSNLINT_API_URL"] + "/v1/controles?format=text&enrichi=true&etendu=true&fichier=contrat-duplique.dsn",
data=body, headers=headers, method="POST")
with urllib.request.urlopen(request, timeout=120) as response:
if not 200 <= response.status < 300:
raise RuntimeError(f"HTTP {response.status}")
with open("rapport.txt", "wb") as output:
output.write(response.read())POST /v1/controles
<?php
$headers = [
'Authorization: Bearer ' . getenv('DSNLINT_API_KEY'),
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
'Content-Type: application/octet-stream',
];
$body = file_get_contents('contrat-duplique.dsn');
if ($body === false) { exit(1); }
$curl = curl_init(getenv('DSNLINT_API_URL') . '/v1/controles?format=text&enrichi=true&etendu=true&fichier=contrat-duplique.dsn');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body, CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 120,
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
if ($response === false || $status < 200 || $status >= 300) {
fwrite(STDERR, "HTTP $status\n");
exit(1);
}
if (file_put_contents('rapport.txt', $response) === false) { exit(1); }With DSNLint Connect, each option becomes --option name=value. The next example checks a compliant DSN file with the declarations option: the report gives the status of its declaration.
rapport.txt
Fichier : mensuelle-complete.dsn
Norme : DSN P26V01
Lignes : 330
Statut : VALIDE (0 bloquant(s), 0 avertissement(s))
Identités : 661 / 669 (inventaire)
Déclarations : 1
1 SIREN 800000002 NIC 00017 nature 01 mois 01012026 VALIDE
Aucune anomalie détectée par les contrôles portés.DSNLint Connect
dsnlint-connect controler mensuelle-complete.dsn \
--format text \
--option declarations=true \
--option fichier=mensuelle-complete.dsnOn the fictional March DSN, this simple check combines masquer_comptes=true, profil_csv=machine and limite=2. The excerpt retains the file and anomaly tables in the CSV ZIP; account masking applies to the banking tables of the ZIP, which the excerpt does not show.
rapport-csv.zip · 7 files
donnees/contrats.csv
donnees/controles.csv
donnees/fichiers.csv
donnees/fichiers_anomalies.csv
donnees/fichiers_couverture.csv
donnees/origines_faits.csv
dictionnaire.jsondonnees/fichiers.csv
cle_ligne;commune;commune_etat;document_id;fichier;fichier_sha256;fichier_sha256_etat;lignes_lues;mois_principal;mois_principal_etat;nb_avertissements;nb_bloquants;norme;siret;siret_etat;statut;version_format
1cfffeb3e526709d1cb8348a01a36f8ccd96c921d6e9b394b795d0a0b61ae6a8-1;;non disponible dans le rapport;d1;message.dsn;6a1dcbb1eb052666f11d5b4919af8a6b2abfb1d83131b839ff12068c7d4e7e3b;;3217;;non déclaré;2;6;DSN P26V01;;non déclaré;non_valide;21donnees/fichiers_anomalies.csv
cle_ligne;cle_parent;code;declaration;declaration_ligne;document_id;fichier;fichier_sha256;gravite;libelle;libelle_rubrique;ligne;message;rubrique;valeur_date;valeur_date_etat
53acaa554f4fbd8a880404484e52eb2d653cbb3d20e5fbd04dfee66ce09515f4-1;1cfffeb3e526709d1cb8348a01a36f8ccd96c921d6e9b394b795d0a0b61ae6a8-1;S21.G00.30.006/CCH-11;1;17;d1;message.dsn;6a1dcbb1eb052666f11d5b4919af8a6b2abfb1d83131b839ff12068c7d4e7e3b;bloquant;Date de naissance;Libellé non disponible;528;année de naissance 1994 incohérente avec l'identifiant;S21.G00.30.006;1994-07-08;
19c458f2bce614c2a825834118228c2a7ccdc8dbfc65945e549b0154b8b1cc11-1;1cfffeb3e526709d1cb8348a01a36f8ccd96c921d6e9b394b795d0a0b61ae6a8-1;S21.G00.40.021/SIG-11;1;17;d1;message.dsn;6a1dcbb1eb052666f11d5b4919af8a6b2abfb1d83131b839ff12068c7d4e7e3b;avertissement;Motif de recours;Libellé non disponible;1128;Motif de recours attendu pour le contrat non concerné par un dispositif de politique publique.;S21.G00.40.021;;non déclaréDSNLint Connect
dsnlint-connect controler mars-2026.dsn \
--option annee=2026 \
--option masquer_comptes=true \
--option limite=2 \
--option profil_csv=machine \
--format csvThe API refuses an incompatible combination, for example enrichi with a limit above 0.
All the parameters of the POST /v1/controles route