Skip to content
Routes, their parameters and responses, rendered from the published OpenAPI contract (version 1.3.0). Download the contract for the full schema of bodies and documents.
The downloadable OpenAPI contract is written in French; this page gives its descriptions in English. Route, parameter and code names are the same in both.

Before you start

Each instance has its own address: the shared Cloud service or the address of your dedicated instance. Routes and parameters are the same everywhere.

Address
https://{instance}
Default address in the contract: api.dsnlint.com.
Contract version
1.3.0
The API version follows the DSNLint version. Routes are prefixed with /v1.

Authentication

Each request carries an API key, or a short-lived token issued to the application, in the Authorization header, as “Bearer” followed by the key. A test key only checks the published sample files.

ApiKey
http · bearer
dsn_test_ or dsn_live_ followed by 64 random lowercase hexadecimal characters. The full key is shown only when it is created; only its SHA-256 fingerprint is passed to the API service.
ShortToken
http · bearer · dsn_jc_v1
dsn_jc_<payload>.<signature>: the payload is a JSON object encoded in base64url without padding, the signature an HMAC-SHA256 in lowercase hexadecimal. Short-lived token for the browser, issued by your DSNLint workspace. Its signed lifetime is at most 900 seconds, with a fixed tolerance of 30 seconds. The audience is cloud, or the exact HTTPS URL of the Dedicated instance. The key_id field identifies an active key in the organisation: the token shares that key’s quotas, idempotency and counting. The token may be replayed while it is valid. The payload is readable and never contains payroll data.

Idempotency

Processing calls carry an Idempotency-Key header. For 900 seconds at most, within the same workspace and mode, an identical completed request receives 204 with no document; while running, or with different content, the same key receives 409. Keep the first response: this protection may end earlier, rarely.

Limits

  • 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.

The deferred response of POST /v1/controles (Prefer header, value respond-async), in the documentation

Common parameters

These parameters appear on several routes. Under its own parameters, each route says which of them it accepts.

Common parameters
NameDescription
Idempotency-Keyheader · string · required
Idempotency key of 1 to 128 characters. Its scope is the organisation, the mode (test or live) and the instance, for 900 s. The request fingerprint covers all files and all options; the multipart boundary is excluded.
X-DSN-Sizeheader · integer
Exact size, in bytes, of the whole multipart body, including the multipart framing; required when Content-Length is absent. If both are present, they must be equal.

Common responses

These responses appear on several routes. Under its own responses, each route says which of them it can return. Technical errors all have the same shape, described with the error codes further down.

Common responses
StatusDescription
204
Request already processed (same Idempotency-Key); no report is retained, so the response is empty. Keep your first response.
400403404408409411413414415421422431500503
Stable technical error (code, message and request_id), with no values from the request.
401
401, code authentification: absent Authorization header, token refused (format, signature, secret, dates, audience or authorisation) or inactive key. The response gives no detail about the cause and includes no values from the token or key. A repeated Authorization header, where no token is involved, is a 400 error (demande_invalide).
429
Quota, spending cap or saturation reached; this refusal is not billed. On each instance, each key has as many calls per UTC minute as its workspace has per minute (120 for a new workspace). The workspace may refuse beyond 120 calls per sliding minute, 20 per second and 10,000 per UTC day; each key has 60 per minute and 10 per second. On each instance, each workspace has a budget of 3,600 calls per UTC hour and 4 concurrent calls. Per hour, this budget also caps 32 GiB received, 32 GiB decompressed, 64 GiB returned and 4 hours of processing. The function routes draw on it: /v1/controles/avec-pieces, /v1/lots-fonctions, /v1/retours, /v1/substitutions, /v1/paie, /v1/egalite, /v1/social, /v1/compta, /v1/prelevements, /v1/extractions, /v1/decoupages, /v1/pseudonymisations and /v1/regularisations. The simple check of a DSN (/v1/controles) and its batches (/v1/lots) do not draw on it. Resubmissions after a correction, MCP calls and batch submissions use the same limits. The Retry-After header gives the seconds before retrying; it is absent when no wait frees the limit (spending or individuals cap).

Checking a file

Check a DSN sent in the request body and receive its report in the requested format.

Checking with supporting documents

Checking one or more DSN files with supporting documents: supplementary scheme forms, notified rates, Urssaf data entry or a profile.

Payroll, equality and HR documents

Recomputed payroll, gender equality and HR documents, drawn from the DSN files provided.

Accounting and direct debits

Reconciling the DSN with the FEC, and the statement of direct debits.

Official returns and substitution

Official returns read and linked to the DSN files, and the substitution report.

Transformations

Extraction, splitting, pseudonymisation and assisted corrections.

Check batches

Several checks submitted as a batch for background processing, with each report retrieved once.

Function batches

Several functions with their supporting documents submitted as a batch, with each result retrieved once.

Error codes

A technical error returns a stable JSON object: a code, a message and the request identifier, with no values from your file. The table gives each possible value of the code, the HTTP statuses the contract publishes for it and its meaning. Anomalies in a DSN are not errors: they are in the report, with a 200 response.

Error codes
Code
demande_invalide
400409415
The request does not match the required format or batch state; correct it before sending it again.
authentification
401
The Authorization header is absent, the token is rejected or the key is inactive; check your authentication before calling again.
exemple_requis
403
A test key accepts only exact copies of published files, attachments included; use a published example.
interrompu
408
Processing was interrupted.
idempotence_conflit
409
The same idempotency key was used with different content; use that key only for the original submission.
deja_en_cours
409
The same submission is already being processed under this idempotency key; wait for it to finish before calling again.
taille
411413
The required size is missing or exceeds a limit; supply the exact size or reduce the submission before retrying.
options_incompatibles
422
The requested options are incompatible; correct their combination before resubmitting the request.
annexe_invalide
422
An attachment is invalid or could not be fully read; correct it before resubmitting the request.
norme_non_embarquee
422
The requested standard is not included in the software.
option_non_disponible—The requested option is not available.
sature
429
The service is temporarily at capacity; retry after the delay specified by Retry-After.
releve_usage_indisponible
503
Usage reporting is unavailable; do not retry automatically, as the service requires intervention and no Retry-After is provided.
quota_depasse
429
A quota or spending cap has been exceeded; honour Retry-After when present, otherwise check your quotas and spending cap before retrying.
introuvable
404
The requested object cannot be found; check its identifier.
rapport_recupere
410
The batch result has already been retrieved and can only be read once; use your saved copy.
rapport_trop_grand
413
The report exceeds the accepted size; reduce the request before retrying, as no truncated result is delivered or billed.
deja_traite—The request has already been processed.
interne
500
An internal error occurred.
trop_grand_pour_l_instance
413
The request exceeds the instance’s capacity even when idle; this rejection is permanent for this request, so do not retry it unchanged.
memoire_insuffisante
422503
Processing was stopped due to insufficient memory, with no usage counted: 503 for a direct call, 422 when reading a batch result; another attempt is possible.
instance_incorrecte
421
Keep the affinity cookie between the submission and the reads: the report is in the memory of the instance that produced it. Any batch operation that reaches another instance receives 421 instance_incorrecte, with no redirect or Retry-After. Affinity reduces these wrong arrivals without ruling them out.
indisponible
503
The service is unavailable; wait for service to be restored before resuming your calls.
plan_controle_invalide
503
On a Dedicated instance, check metering returned an invalid response; the check does not complete.
plan_controle_indisponible
503
The control plane is unavailable, when authorising a key on its first use or, on a Dedicated instance, when metering checks; the check does not complete: wait for it to be restored before resuming your calls.
operation_non_autorisee
403
The requested operation is not authorised.
A dash: the contract publishes no HTTP status for this code.