Skip to content

Submit DSN checks in batches

A batch groups submissions for background processing. It is held only in memory: nothing is written to disk, each result is retrieved once, and an instance restart clears the results. For one file at a time, a direct call is simpler: it returns the document in the response.
  • Item
    Content
    Check batch
    From 1 to 32 simple checks of a DSN.
    Function batch
    From 1 to 32 operations: check with supporting documents, official returns, substitution, payroll, gender equality, HR documents, accounting (report only) or direct debits.
  • Item
    Creation
    Check batch
    files (from 1 to 32), retention_seconds (from 1 to 300), a pre-registered webhook (mandatory) and consent_memory.
    Function batch
    nombre_operations (from 1 to 32), ttl_seconds (from 1 to 300), consent_memory and webhook (optional).
  • Item
    Submission
    Check batch
    One file per index, from 0 to 31, with its own idempotency key.
    Function batch
    One operation per index, from 0 to 31: the function and its supporting documents.
  • Item
    Retrieval
    Check batch
    One report per index, once only.
    Function batch
    One result per index, once only.
  • Item
    API route
    Check batch
    /v1/lots
    Function batch
    /v1/lots-fonctions
  • Item
    DSNLint Connect command
    Check batch
    lot
    Function batch
    lots-fonctions

Both creation requests take a JSON object with the fields below. All are required except webhook for a function batch. No extra fields are accepted.

  • JSON field
    files
    POST /v1/lots
    Integer from 1 to 32: number of expected files.
    POST /v1/lots-fonctions
    Absent.
  • JSON field
    nombre_operations
    POST /v1/lots
    Absent.
    POST /v1/lots-fonctions
    Integer from 1 to 32: number of expected operations.
  • JSON field
    retention_seconds
    POST /v1/lots
    Integer from 1 to 300: report retrieval window, in seconds. No default in the creation JSON.
    POST /v1/lots-fonctions
    Absent.
  • JSON field
    ttl_seconds
    POST /v1/lots
    Absent.
    POST /v1/lots-fonctions
    Integer from 1 to 300: result retrieval window, in seconds. No default in the creation JSON.
  • JSON field
    consent_memory
    POST /v1/lots
    true is required: consent to keeping only results in temporary memory.
    POST /v1/lots-fonctions
    true is required: the same consent.
  • JSON field
    webhook
    POST /v1/lots
    Required preregistered identifier: 1 to 128 ASCII letters, digits, hyphens or underscores; no URL.
    POST /v1/lots-fonctions
    Optional preregistered identifier with the same form; omitted or an empty string by default.

retention_seconds and ttl_seconds serve the same purpose for different batch families: they set the single-use retrieval window after the batch is closed and all processing has finished. They do not change the initial 300-second deadline. With DSNLint Connect, --retention sets the former on lot creer and --ttl-seconds sets the latter on lots-fonctions creer; both default to 300. Connect sends consent_memory:true for both creation requests.

  1. Create the batch — Specify the number of files or operations (from 1 to 32), the retrieval period (from 1 to 300 seconds) and your consent to temporary storage in memory. For a check batch, add a pre-registered webhook: you supply only its registered identifier, never an address. The API returns 201 with the batch identifier and a 300-second deadline.
  2. Submit — Submit each file at its index, from 0 to 31, with its own idempotency key. The API returns 202 once it has received the whole file in memory; calculation continues in the background. For a function batch, the composition, supporting documents and admission requirements are checked before this 202.
  3. Close — Closing the batch ends submissions. A check batch cannot be closed if any slot is still empty.
  4. Wait for completion — Check the batch status: its counters (finished, failed, closed) are technical. The webhook completion notice carries only identifiers and counters.
  5. Retrieve — Read each report or result: reading removes it from the batch. A broken transfer loses it, with no retry copy. A second read returns 410, rapport_recupere.
  6. Cancel if needed — A cancellation destroys the batch and all its results, including those already calculated.

With DSNLint Connect, lot creer creates a check batch, submits the files and closes it in a single command. lot deposer resumes a file submission, and lot cloturer ends submissions. lots-fonctions creer reserves a function batch without automatic submission: you then submit each operation.

Terminal
dsnlint-connect lot creer fichiers…
dsnlint-connect lot etat id
dsnlint-connect lot deposer id index fichier
dsnlint-connect lot rapport id index
dsnlint-connect lot cloturer id
dsnlint-connect lot annuler id
Terminal
dsnlint-connect lots-fonctions creer nombre
dsnlint-connect lots-fonctions etat id
dsnlint-connect lots-fonctions deposer id index fonction [fichiers…]
dsnlint-connect lots-fonctions resultat id index
dsnlint-connect lots-fonctions cloturer id
dsnlint-connect lots-fonctions annuler id

This workflow reserves two operations without a webhook: April payroll and January and February direct debits from the demonstration. Each command reuses the identifier returned at creation. After both submissions and closure, the status provides technical counters, then each result is retrieved once: reading it removes it from the batch.

1/reponse.txt
Lot réservé ; déposez les opérations puis clôturez.
Lot : lot_d91ee72e901d17113bf4_71db5274e489d781db60_183c
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: avril-2026.dsn, janvier-2026.dsn, fevrier-2026.dsn. Engine outputs are in French.

After closing, the batch status:

5/reponse.txt
Compteurs techniques du lot.
Lot : lot_d91ee72e901d17113bf4_71db5274e489d781db60_183c
Terminées : 2 ; échecs : 0 ; clôturé : oui.
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: avril-2026.dsn, janvier-2026.dsn, fevrier-2026.dsn. Engine outputs are in French.

Then each result, read only once: the April payroll review, then the direct debit statement.

6/rapport.txt · lines 1 to 3 of 7,851
Paie : 525 lignes, 144 recalculées, 25 écarts à vérifier. Résultat complet.
Les bases sont déclarées ; les taux sont publiés ou explicitement déclarés. Les choix de l’employeur sont saisis. Le recalcul n’affecte pas le verdict au regard de la norme.
avril-2026.dsn — contrôle de la norme : Conforme, 0 anomalie bloquante
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: avril-2026.dsn, janvier-2026.dsn, fevrier-2026.dsn. Engine outputs are in French.
7/rapport.txt · lines 1 to 4 of 3,654
Prélèvements : 408 éléments, 0 écart à vérifier. Résultat complet.
Montants déclarés, différences arithmétiques et qualifications saisies ; le relevé n’affecte pas le verdict au regard de la norme. Aucun fichier de virement produit.
janvier-2026.dsn — contrôle de la norme : Conforme, 0 anomalie bloquante
fevrier-2026.dsn — contrôle de la norme : Conforme, 0 anomalie bloquante
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: avril-2026.dsn, janvier-2026.dsn, fevrier-2026.dsn. Engine outputs are in French.

A batch has two successive deadlines:

  • On creation, it is given 300 seconds to be completed: an incomplete batch expires after this time.
  • Once the batch is closed and finished, a new deadline starts: the retrieval time you chose, from 1 to 300 seconds. The total time can therefore exceed five minutes.
  • This is a retrieval window, with no persistent storage: memory only, one read, then deletion.

The limits of a batch:

  • Each result is limited to 2 MiB by default. A result that is too large becomes an error, with no truncation and no billing.
  • Batch results awaiting retrieval take at most 64 MiB per workspace, within the capacity of the service; a check batch reserves 2 MiB per file.
  • A workspace has at most 8 check batches.
  • Transformations (extract, split, pseudonymise), correction, the FEC alone and the accounting entries package cannot be sent in a batch: they are refused before any calculation.
  • A batch can be read only by the workspace that created it: another workspace gets a 404. Another active key of the same workspace and the same mode, test or production, can retrieve its reports.
  • The objects of a batch are separated between test and production: a test key cannot retrieve a real report.
A batch is not a comparison of several months. Each submission is an independent check, with its own report, and a batch’s counters never constitute a DSN verdict.

See batches in the API overview

DSN API: immediate or deferred response
Previous section
DSN API: errors, limits and quotas
Next section