Skip to content

Build DSN checks into payroll software

This section follows an integration from first try to production: what your software sends, what it reads in the response, and what it does in each case. API v1 has the same routes on Cloud and on Dedicated.
  1. Try with a test key — A dsn_test_ key checks the published sample files, with nothing counted. Develop on these files: they cover a compliant DSN and non-compliant ones.
  2. Send the DSN — POST /v1/controles, the file as an application/octet-stream body, the key in Authorization, one idempotency key per submission, the exact size in Content-Length or X-DSN-Size, and the format you want in format=.
  3. Read the verdict — With format=json, read documents[0].resultat: statut is VALIDE, VALIDE_AVEC_AVERTISSEMENTS or NON_VALIDE, and nb_bloquants and nb_avertissements give the counts.
  4. Show the anomalies — Each anomaly carries its code, severity, line, rubric and message, with its value when there is one. With masquer_valeurs, a title and an action replace the value and the message.
  5. Handle refusals — Tell apart a non-compliant DSN, which arrives in a 200, from a technical error, which arrives with another status.
  6. Go to production — Replace the key with a dsn_live_ key and, on Dedicated, the address with your instance’s. The rest of your code does not change.
Non-compliantBlocking anomalies: 2Warnings: 0

Standard P26V01, 146 lines read

  • BlockingS21.G00.40.009/CCH-12Line 60
    Numéro du contrat

    Le numéro de contrat est repris par plusieurs contrats d'un même individu et établissement.

    Value
    CDI-001
  • BlockingS21.G00.40.009/CCH-12Line 85
    Numéro du contrat

    Le numéro de contrat est repris par plusieurs contrats d'un même individu et établissement.

    Value
    CDI-001
Excerpts from a real DSNLint API response, received with DSNLint Connect 1.3.0 on 5 December 2026, for public examples with fictitious data: contrat-duplique.dsn. Engine outputs are in French. The same request sent with curl returns the same document, byte for byte, apart from the response date.

Declare the exact file size in bytes in X-DSN-Size. This command checks the fictional March DSN with masked accounts, machine CSV and limite=2.

POST /v1/controles
curl -X POST "$DSNLINT_API_URL/v1/controles?format=csv&annee=2026&masquer_comptes=true&limite=2&profil_csv=machine" \
  -H "Authorization: Bearer $DSNLINT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/octet-stream" \
  -H "X-DSN-Size: 77163" \
  --data-binary @mars-2026.dsn \
  -o rapport-csv.zip
Each example was replayed against the API and returns the same document as the curl command, byte for byte.

An anomaly is not an error

A non-compliant DSN is a normal result: for an immediate response, the API responds 200 with its report. An HTTP error status signals a refusal to process or a technical problem. Your software must never deduce a DSN’s verdict from the HTTP status.

  • Response
    200
    What it says
    The check is done, the report is in the response.
    What your software does
    Read the verdict in the report.
  • Response
    202
    What it says
    Received, running (deferred response).
    What your software does
    Read the address given by Location.
  • Response
    204
    What it says
    Already processed, same idempotency key.
    What your software does
    Reuse the first response.
  • Response
    400, 413, 415, 422
    What it says
    The request is refused.
    What your software does
    Fix the request. Do not resend it as is.
  • Response
    401, 403
    What it says
    Key refused, or sample required.
    What your software does
    Check the key and its mode.
  • Response
    409
    What it says
    Submission still running, or the same idempotency key with different content.
    What your software does
    Wait, or generate a new key for new content.
  • Response
    429
    What it says
    Technical quota, saturation or spending cap.
    What your software does
    Respect Retry-After when present, then resend with the same key. Waiting does not lift a cap.
  • Response
    503
    What it says
    Service unavailable, or usage collection pending.
    What your software does
    Resend later with the same key; for releve_usage_indisponible, do not retry automatically.
  • Response
    404, 410
    What it says
    Object not found, or report already read.
    What your software does
    Do not resend the read: run the check again if needed.
  • Response
    408
    What it says
    Processing interrupted before the end.
    What your software does
    Resend with the same key, or split a very large file.
  • Response
    411
    What it says
    Request size missing.
    What your software does
    Add the Content-Length or X-DSN-Size header.
  • Response
    421
    What it says
    Read received without the cookies returned on submission.
    What your software does
    Read again, sending back those cookies.
  • Response
    500
    What it says
    Internal service error.
    What your software does
    Retry once, then quote X-Request-ID to support.

Choose how to submit

  • Need
    One file at a time, the user waits.
    Mode
    Immediate response, the default.
    Left to you
    The waiting screen and storing the report.
  • Need
    Not blocking your service during a large file.
    Mode
    Deferred response, with Prefer: respond-async.
    Left to you
    Reading it, once only, within 300 seconds of the end of processing.
  • Need
    1 to 32 files at once.
    Mode
    Batch.
    Left to you
    Uploading each file, closing the batch and retrieving each report.

What does not move, and what stays with you

  • Addresses are under /v1. JSON documents carry their contract version in version_format, and the version of the check response in version_reponse.
  • The OpenAPI contract can be downloaded from the API reference on this site, or from the application: generate your types from it.
  • The Server-Timing header gives the processing time of each response, useful for your logs.
  • DSNLint does not keep the report of an immediate response: storing it is up to your software.
  • DSNLint sends no email to your customers: your notifications stay yours.
  • DSNLint files nothing. Filing remains with your software or your customer.
  • Response header
    X-Request-ID
    What it provides
    Server-generated request identifier, including for a rejection or a 204 replay. It matches request_id in an error body: quote it to support.
  • Response header
    Content-Disposition
    What it provides
    When a document is attached, attachment and a fixed download name for the format, such as rapport.pdf, rapport.zip or comparaison.csv. This name never includes your DSN filename.
  • Response header
    X-DSN-Date-Controle
    What it provides
    UTC instant assigned to the check or operation, in date-time format. In a batch, this instant is kept with the result and returned on retrieval; it is not replaced by the retrieval date.
  • Response header
    Server-Timing
    What it provides
    Processing time for the response.
  • Response header
    Location
    What it provides
    For a deferred check accepted with 202, the batch status address.
  • Response header
    Preference-Applied
    What it provides
    respond-async confirms the deferred response preference.
  • Response header
    X-DSN-Code-Sortie
    What it provides
    The function’s business exit code, separate from the HTTP status.
  • Response header
    Retry-After
    What it provides
    When present on a temporary refusal, the delay before retrying.

This is the HTTP response to the immediate check shown above, including its public headers.

200 OK13 ms
HTTP response
HTTP/1.1 200 OK
content-type: application/json
x-request-id: req_71db5274e489d781db60_1197
cache-control: no-store
x-content-type-options: nosniff
content-security-policy: default-src 'none'; frame-ancestors 'none'
referrer-policy: no-referrer
x-frame-options: DENY
strict-transport-security: max-age=31536000
x-dsn-date-controle: 2026-12-05T12:40:10Z
server-timing: traitement;dur=1.423

A function that returns a document to download, here the payroll charges statement, adds Content-Disposition, with the file name, and X-DSN-Code-Sortie, its business code.

200 OK562 ms
HTTP response
HTTP/1.1 200 OK
content-type: application/json
x-request-id: req_71db5274e489d781db60_1963
cache-control: no-store
x-content-type-options: nosniff
content-security-policy: default-src 'none'; frame-ancestors 'none'
referrer-policy: no-referrer
x-frame-options: DENY
strict-transport-security: max-age=31536000
x-dsn-date-controle: 2026-12-05T12:45:08Z
x-dsn-code-sortie: 0
content-disposition: attachment; filename="rapport.json"
server-timing: traitement;dur=509.341

View the check’s HTTP response in the API overview

View the deferred check receipt

See every route in the reference

First check with DSNLint Connect
Previous section
DSN check profiles: your internal rules
Next section