Fred Tax Declaration Api (v1)

Download OpenAPI specification:

Fred Tax Declaration API

This API sends French tax declarations (Liasse fiscale, 2571 / 2572, CVAE solde and acompte) to the French tax authorities, through the Teledec / Teleportail channel or the internal ApEF channel. It is part of the larger Fred platform and is consumed by other Fred services.

Authentication

All endpoints are protected and require a valid Fred bearer token, except where explicitly marked as anonymous. Authentication and authorization follow the common Inqom mechanism shared by every Fred microservice.

See the shared Inqom authentication documentation for how to obtain a token and call the API behind the gateway: Récupérer un token d'authentification API, Authentification API Partenaire : Authorization Code and les scopes disponibles.

Environments

Environment Base URL
Production https://api.inqom.com/taxdeclaration
Staging https://api-staging.inqom.com/taxdeclaration

Paths documented below are relative to that base URL, e.g. GET https://api.inqom.com/taxdeclaration/api/tax-declarations/accounting-folders/{accountingFolderId}/declarations.

The full mapping between legacy base URLs and the ones above is published in URLs des API Inqom. Calls are rate limited to 15 requests per second per ClientId / user pair — see Limitation de débit des API Inqom.

Partner webhooks (service accounts)

Inbound partner endpoints are called by a service account: an OAuth 2.0 client using the client_credentials grant, with no Fred user behind it. The only such endpoint today is the Teledec status webhook, POST /api/tax-declarations/webhook/teledec.

Step Value
Token endpoint POST {identity}/connect/token (https://auth.inqom.com/identity in production, https://auth-staging.inqom.com/identity in staging)
Grant grant_type=client_credentials, client authenticated with HTTP Basic (client_id:client_secret) or client_id / client_secret in the form body
Scope scope=taxdeclarationapi — the API scope, and nothing else
Token lifetime Set per client by Inqom (3600 s for the Teledec webhook); no refresh token is issued
Call Authorization: Bearer <access_token> on the webhook route

The webhook accepts only the token of the service account provisioned for it: another client, a user token (even one obtained through the same client) or a token without the taxdeclarationapi scope is refused with 403 Forbidden; a missing or invalid token gets 401 Unauthorized. The service-account token is, conversely, refused on every other endpoint of this API, which all require a Fred user. Rate limiting is enforced by the Inqom API gateway, as for every Inqom API (see above). The webhook identifies the target declaration by its Teledec declarationId alone — no folder or company identifier is part of the call.

Jedeclare

Sends a JeDeclare tax declaration for the given accounting folder.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

Request Body schema:
required

The JeDeclare send parameters

EndDate
required
string <date-time>
Sujet
required
string
DeclarationType
required
string
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"

Responses

Request samples

Content type
{
  • "EndDate": "2019-08-24T14:15:22Z",
  • "Sujet": "string",
  • "DeclarationType": "Liasse"
}

Response samples

Content type
{
  • "NumeroADS": "string"
}

Downloads a raw archived JeDeclare piece for the given declaration, exactly as stored: the deposited EDI ({Sent}) or an inbound avis returned by JeDeclare ({Ads} accusé de dépôt, {Acs} accusé de conformité syntaxique, {Ars} accusé de rejet/résultat). For debugging and legal proof.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

pieceType
required
string
Enum: "Sent" "Ads" "Acs" "Ars"

Piece type to download (Sent, Ads, Acs, Ars)

query Parameters
endDate
required
string <date-time>

End date of the declaration period

declarationType
string
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"

Declaration type (defaults to Liasse)

format
string
Enum: "Xml" "Signed"

For an avis (Ads/Acs/Ars): Xml = readable avis.xml (default), Signed = raw signed MIME (legal proof). Ignored for Sent.

Responses

Downloads the raw EDI file deposited to JeDeclare for the given declaration, exactly as it was sent (raw EDIFACT, charset ISO-8859-15). Deprecated alias kept for compatibility: this route already shipped — use {GET .../jedeclare/pieces/Sent} instead. Deprecated

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
endDate
required
string <date-time>

End date of the declaration period

declarationType
string
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"

Declaration type (defaults to Liasse)

Responses

TaxDeclaration

Get the Teledec reminders for a given accounting folder

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
startDate
string <date-time>

Start date of the targeted exercise

endDate
string <date-time>

End date of the targeted exercise

declarationType
string
Default: "Liasse"
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"

Type of declaration targeted by the reminders (defaults to Liasse)

Responses

Response samples

Content type
[
  • {
    }
]

Get the accounting folder config (flags such as DisableReadOnlyForms, AllowSendingDeclarationWithFscpError, DisableReadOnlyPayloadFields) for a given (accountingFolderId, period). Always returns a value: defaults are returned when nothing has been stored yet.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
startDate
required
string <date-time>

Start date of the targeted exercise

endDate
required
string <date-time>

End date of the targeted exercise

Responses

Response samples

Content type
{
  • "AccountingFolderId": 0,
  • "StartDate": "2019-08-24T14:15:22Z",
  • "EndDate": "2019-08-24T14:15:22Z",
  • "DisableReadOnlyForms": true,
  • "AllowSendingDeclarationWithFscpError": true,
  • "DisableReadOnlyPayloadFields": true
}

Get the Teledec declarations url for a given accounting folder

Returns 400 when accountingFolderId is not greater than 0, when urlType cannot be bound (any value that is not a member name nor an integer), or when urlType is bound but is not a known value.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
urlType
string
Default: "MesDeclarations"
Enum: "MesDeclarations" "ChoixDeclaration"

Which Teledec page the url points to: the "mes déclarations" listing (default) or the "choix déclaration" creation page

Responses

Response samples

Content type
"string"

Get the Teledec url of the greffe (court registry) filing page for a given accounting folder

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

Responses

Response samples

Content type
"string"

Get the EDI file of a declaration from Teledec

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
startDate
string <date-time>

Start date of the targeted exercise

endDate
string <date-time>

End date of the targeted exercise

declarationType
string
Default: "Liasse"
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"

Type of the declaration whose EDI file is requested (defaults to Liasse)

Responses

Response samples

Content type
{
  • "DomainDeclarationId": 0,
  • "TeledecId": 0,
  • "EdiContent": "string"
}

Send a declaration for a given accounting folder

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
testPayload
boolean
Default: false
Example: testPayload=true

If true, the declaration will not be sent to Teledec

Request Body schema:
required

Set of data required for sending a declaration (check subsets of PublishDeclarationCommand for additional parameters)

StartDate
required
string <date-time>
EndDate
required
string <date-time>
DeclarationType
required
string
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"
DeclarationSourceType
required
string
Enum: "Manual" "Inqom"

Responses

Request samples

Content type
{
  • "StartDate": "2019-08-24T14:15:22Z",
  • "EndDate": "2019-08-24T14:15:22Z",
  • "DeclarationType": "Liasse",
  • "DeclarationSourceType": "Manual"
}

Response samples

Content type
{
  • "TeledecUrl": "string",
  • "JsonContent": "string",
  • "Reminders": [
    ],
  • "TransmissionChannel": "Teledec",
  • "DeclarationId": 0,
  • "StartDate": "2019-08-24T14:15:22Z",
  • "EndDate": "2019-08-24T14:15:22Z",
  • "DeclarationType": "Liasse"
}

Send a declaration for a given accounting folder and an existing declaration

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
declarationType
string
Enum: "Liasse" "IS2571" "IS2572" "IS2573" "LiasseTeteDeGroupe" "CVAESolde" "CVAEAcompte" "Inconnu"

Declaration type

bloquerSiIncoherence
boolean
Default: true

Do not send declaration if errors are detected by Teledec

Request Body schema:
required

Set of data required for sending a declaration (check subsets of PublishExistingDeclarationCommand for additional parameters)

StartDate
required
string <date-time>
EndDate
required
string <date-time>

Responses

Request samples

Content type
{
  • "StartDate": "2019-08-24T14:15:22Z",
  • "EndDate": "2019-08-24T14:15:22Z"
}

Response samples

Content type
{
  • "Message": "string",
  • "TeledecId": 0
}

Get the declarations for a given accounting folder.

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder.

query Parameters
refreshTeledecData
boolean or null

When true, refreshes only the Teledec-channel declarations (reconciliation against Teledec). JeDeclare declarations are left untouched. Ignored when refreshData is true.

refreshData
boolean or null

When true, refreshes declaration data from all providers (Teledec reconciliation + JeDeclare sync). Takes priority over refreshTeledecData when both are supplied.

Responses

Response samples

Content type
[
  • {
    }
]

Add declarations for a given accounting folder

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

Request Body schema:
required

Declarations to add

AccountingFolderId
required
integer <int32>
Array of objects or null (AddOrUpdateTaxDeclarationCommand)

Responses

Request samples

Content type
{
  • "AccountingFolderId": 0,
  • "Declarations": [
    ]
}

Update existing declarations of a given accounting folder

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

Request Body schema:
required

Declarations to update

AccountingFolderId
required
integer <int32>
Array of objects or null (AddOrUpdateTaxDeclarationCommand)

Responses

Request samples

Content type
{
  • "AccountingFolderId": 0,
  • "Declarations": [
    ]
}

Get the tax declarations of a company that were updated within a given time window. Partner-facing endpoint (Cerfrance): the caller replays consecutive windows to stay in sync without re-reading the whole history. A company outside the caller's scope is rejected with 403; within a company the caller can see, only the accounting folders the caller is entitled to are read, so a company where the caller holds no folder returns an empty list. EDI / PDF links are deliberately absent: Teledec only mints them folder by folder. The window is half-open [updatedAfter, updatedBefore[: chain windows by reusing the previous updatedBefore as the next updatedAfter, which leaves neither a gap nor a duplicate. Do not chain on the highest UpdatedAt returned — the lower bound being inclusive, that would return this declaration, and every declaration sharing its timestamp, in every window. The endpoint reads the stored state; it never refreshes against Teledec or JeDeclare. All dates of this contract are French local time (Europe/Paris) unless an offset is supplied.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Identifier of the company (the accounting firm) owning the folders

query Parameters
updatedAfter
required
string <date-time>

Lower bound of the update window, inclusive. French local time when no offset is given (e.g. 2026-06-01T09:00:00); an explicit offset or a trailing Z is honoured as supplied. Callers going through the generated RestClient must pass UTC: the client serialises a DateTime whose Kind is Unspecified as if it were already UTC — relabelled, not shifted — so an intended Paris time would land one to two hours off, silently. Kind Utc or Local is transmitted correctly.

updatedBefore
required
string <date-time>

Upper bound of the update window, exclusive. Same time zone rule as updatedAfter.

Responses

Response samples

Content type
[
  • {
    }
]

Get the advance payment calendar (due date ranges) for a given accounting folder and period

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
StartDate
required
string <date-time>

Start date of the targeted exercise

EndDate
required
string <date-time>

End date of the targeted exercise

Responses

Response samples

Content type
[
  • [
    ]
]

Mark the status of a declaration as checked by the user

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

query Parameters
declarationId
required
integer <int32>

Identifier of the declaration

Responses

Get the Teledec download url of a declaration document for a given accounting folder

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Identifier of the accounting folder

declarationId
required
integer <int32>

Identifier of the declaration

query Parameters
downloadType
required
string
Enum: "Unknown" "Pdf" "Edi"

Type of document to download

Responses

Response samples

Content type
"string"

TaxDeclarationWebhook

Reçoit une notification de statut Teledec et met à jour la déclaration correspondante (identifiée par son id Teledec) ; un statut « deleted » supprime la déclaration côté Inqom. Répond 200 OK dès que la notification est prise en compte : une déclaration inconnue ou déjà passée sur JeDeclare est ignorée sans erreur. Un payload sans declarationId ni declarationStatus exploitables est en revanche rejeté en 400 Bad Request plutôt qu'ignoré silencieusement.

Authorizations:
oauth2
Request Body schema:
declarationId
integer <int32>
declarationStatus
string or null

Statut de la déclaration, obligatoire : « Accepted », « Rejected », « Sent », ou « deleted » lorsque Teledec a supprimé la déclaration de son côté — la déclaration est alors supprimée côté Inqom. Un payload sans statut est rejeté en 400 Bad Request, y compris lorsqu'il ne porte qu'un paiementStatus.

paiementStatus
string or null
dateHeureDGFiP
string or null <date-time>

Date et heure de retour (réponse) de la DGFIP sur la déclaration.

dateEnvoiDGFIP
string or null <date-time>

Date et heure d'envoi de la déclaration à la DGFIP.

dateHeureModification
string or null <date-time>

Date et heure de dernière modification de la déclaration sur Teledec.

dateEcheance
string or null <date-time>
siren
string or null

SIREN de l'entreprise déclarante. Sert à retrouver le dossier comptable lorsque la déclaration notifiée n'existe pas encore côté Inqom et doit être créée.

dateDebut
string or null <date-time>

Date de début de la période déclarée.

dateFin
string or null <date-time>

Date de fin de la période déclarée.

declarationType
string or null

Type de déclaration tel que nommé par Teledec (« Liasse », « Paiement », « TVA »…).

declarationLibelle
string or null

Libellé complet de la déclaration, fourni tel quel par Teledec : il alimente le nom de la déclaration sans qu'on ait à le reconstruire à partir du type et de la période.

declarationPdfUrl
string or null

Lien vers le PDF de la déclaration hébergé par Teledec.

declarationUrl
string or null

Lien vers la déclaration sur Teledec.

accuseDeReceptionPDFUrl
string or null

Lien vers le PDF de l'accusé de réception DGFIP.

fichierEDIUrl
string or null

Lien vers le fichier EDI transmis à la DGFIP.

Array of objects or null (TeledecWebhookDeclarationErreur)

Motifs de rejet DGFIP, fournis directement dans le payload en cas de rejet.

Responses

Request samples

Content type
{
  • "declarationId": 0,
  • "declarationStatus": "string",
  • "paiementStatus": "string",
  • "dateHeureDGFiP": "2019-08-24T14:15:22Z",
  • "dateEnvoiDGFIP": "2019-08-24T14:15:22Z",
  • "dateHeureModification": "2019-08-24T14:15:22Z",
  • "dateEcheance": "2019-08-24T14:15:22Z",
  • "siren": "string",
  • "dateDebut": "2019-08-24T14:15:22Z",
  • "dateFin": "2019-08-24T14:15:22Z",
  • "declarationType": "string",
  • "declarationLibelle": "string",
  • "declarationPdfUrl": "string",
  • "declarationUrl": "string",
  • "accuseDeReceptionPDFUrl": "string",
  • "fichierEDIUrl": "string",
  • "declarationErreurs": [
    ]
}