Fred ViDA Api (v1)

Download OpenAPI specification:

Introduction

L'API ViDA est le point d'entrée central et sécurisé pour interagir avec l'écosystème de facturation électronique dans le cadre de la directive européenne VAT in Digital Age (ViDA). Conçue pour les Partenaires Agréés (PA) et les systèmes d'information des entreprises, elle facilite l'automatisation complète du cycle de vie des factures électroniques et la gestion des obligations fiscales associées.

Authentication

DirectoryLines

Controller for querying the e-invoicing directory within a specific company context.

Returns the directory lines registered for the specified accounting folder. Verifies the accounting folder belongs to the given company before querying the directory.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company (cabinet).

accountingFolderId
required
integer <int32>

Internal identifier of the accounting folder whose directory lines are returned.

Responses

Response samples

Content type
[
  • {
    }
]

Mandate

Controller for managing mandates within a specific company context. Provides endpoints for creating, retrieving, sending reminders, and recreating mandates based on various criteria.

Creates one or more mandates for the given company, processing each dossier independently and exposing partial success at the HTTP level (US 67257), aligned on {CreateDirect}: 200 when every dossier was registered, 207 Multi-Status on partial success (valid dossiers registered, the others listed with a generic reason), 400 when no dossier could be registered. A single invalid dossier no longer turns the whole call into a 400, and error payloads carry only the accounting folder id (no PII).

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company (cabinet) owning the mandates.

Request Body schema:
required

List of mandate entries to create. Each entry must contain the full mandate data.

Array
Siren
required
string

SIREN number of the company for which the mandate is being created (9-digit French company identifier).

Siret
string or null

Optional SIRET number (14-digit French establishment identifier: 9-digit SIREN + 5-digit NIC) of the establishment covered by the mandate. When provided it is transmitted to the partner and must be consistent with the target accounting folder (same SIREN and NIC). A SIRET and addressing suffixes are mutually exclusive on the same entry. {null} when the mandate targets the company at the SIREN level.

CompanyExecutive
required
string

Full name of the company executive (dirigeant) responsible for the mandate.

BusinessName
required
string

Official business name (raison sociale) of the company covered by the mandate.

Address
required
string

Full postal address of the company covered by the mandate.

required
object (ContactWithRoleCommand)

Command extending Fred.ViDA.Application.Mandates.Commands.ContactCommand with an additional mandatory Fred.ViDA.Application.Mandates.Commands.ContactWithRoleCommand.Role field. Used when the contact's function within the mandate must be explicitly specified.

required
object (CertifiedAccountantCommand)

Command representing the certified public accountant (expert-comptable) linked to the mandate. Inherits contact information (name, email, phone) from Fred.ViDA.Application.Mandates.Commands.ContactCommand.

SkipMandateCreation
required
boolean

Indicates whether to skip the creation of mandate envelopes for the KYC job.

SkipMandateLegalConfirmation
required
boolean

Indicates whether a valid Platform Designation Mandate has already been duly signed, skipping the legal confirmation step.

AccountingFolderId
required
integer <int32>

Folder id associated with the mandate.

Array of objects or null (AccountingFolderSuffixCommand)

Data-driven addressing suffixes grouped by accounting folder. Each entry maps one accounting folder to its list of addressing suffixes.

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
{
  • "SuccessCount": 0,
  • "Errors": [
    ],
  • "HasErrors": true,
  • "IsFullFailure": true
}

Registers a batch of dossiers with the PA (ChainTrust) using the cabinet-less PME direct flow. Each dossier is processed independently: incomplete or ineligible dossiers are returned as per-entry errors (keyed by accounting folder id) while valid dossiers proceed.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the PME enterprise owning the dossiers.

Request Body schema:
required

The dossiers to register. The list size is bounded by the command validator.

Array
AccountingFolderId
required
integer <int32>

Folder (dossier) being registered. The SIREN is read from this folder.

BusinessName
string or null

Official business name (raison sociale) of the company being registered.

Address
string or null

Full postal address of the company's registered office.

CompanyExecutive
string or null

Optional company executive (dirigeant). When absent, the signatory's full name is used.

object (DirectMandateSignatory)

The signatory of a direct-flow registration entry. Mirrors Fred.ViDA.Application.Mandates.Commands.ContactWithRoleCommand but with every field nullable and without data annotations, so an incomplete signatory deserializes instead of failing model binding. Completeness and format are validated per entry inside the handler (non-blocking).

Responses

Request samples

Content type
[
  • {
    }
]

Response samples

Content type
{
  • "SuccessCount": 0,
  • "Errors": [
    ],
  • "HasErrors": true,
  • "IsFullFailure": true
}

Attaches a new accounting folder to a SIREN that already has a terminal (reusable) mandate, including a Finalized one (US 67459). Generates the SIREN_suffix addressing identifiers of the new folder and re-arms the existing mandate so a new formal agreement is triggered at the partner (ChainTrust); the existing mandate is reused — no new mandate is created in ViDA.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company (cabinet) owning the mandate.

Request Body schema:
required

The new accounting folder id and its addressing suffixes.

Array of objects or null (AccountingFolderSuffixCommand)

New accounting folders (each with its addressing suffixes) to attach to the existing mandate.

Responses

Request samples

Content type
{
  • "FolderSuffixes": [
    ]
}

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Switches the bare-SIREN carrier directory line to a different accounting folder (immutable-mandate model B, US 68788). The carrier of the bare SIREN is held by the directory line, not by the mandate, so the switch is an explicit operation: the SIREN is resolved from the target folder and the directory line is moved from the current carrier folder to the target folder. No mandate is mutated and no ChainTrust call is made. Switching to the folder that already carries the SIREN is a no-op.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company (cabinet) owning the mandate.

Request Body schema:
required

The target accounting folder that should become the carrier.

AccountingFolderId
required
integer <int32>

Target accounting folder that should become the carrier of the bare SIREN line.

Responses

Request samples

Content type
{
  • "AccountingFolderId": 0
}

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Retrieves the mandate detail for the given accounting folder for the specified company. The folder may be the bare-SIREN carrier or a folder attached to it (immutable-mandate model B): the exposed {SyncStatus} is always resolved for THIS folder specifically, so an attachment in progress on it is never masked by an older Finalized mandate on the same SIREN (US 68789).

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company owning the mandate.

accountingFolderId
required
integer <int32>

Internal identifier of the accounting folder linked to the mandate.

Responses

Response samples

Content type
{
  • "Id": 0,
  • "CompanyId": 0,
  • "AccountingFolderId": 0,
  • "CreatedAt": "2019-08-24T14:15:22Z",
  • "SignedAt": "2019-08-24T14:15:22Z",
  • "Siren": "string",
  • "ErrorMessage": "string",
  • "Documents": [
    ],
  • "SyncStatus": "Received",
  • "SignatureSettings": {
    },
  • "FolderSuffixes": [
    ],
  • "ErrorCode": "DuplicateCsv",
  • "IdentityDocuments": [
    ],
  • "Siret": "string",
  • "CompanyExecutive": "string",
  • "BusinessName": "string",
  • "Address": "string",
  • "CompanyLegalRepresentative": {
    },
  • "CertifiedAccountant": {
    }
}

Retrieves, per SIREN, every accounting folder linked to it (the bare-SIREN carrier and every folder attached to it) with its own resolved mandate status (immutable-mandate model B, US 68789 read model). An attachment still in progress on a folder is never masked by an older Finalized mandate on another folder of the same SIREN.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company whose mandates are retrieved.

Responses

Response samples

Content type
[
  • {
    }
]

Sends a friendly reminder to the signatories of the specified mandates.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company owning the mandates.

Request Body schema:
required

List of internal mandate identifiers whose signatories should be reminded.

Array
integer <int32>

Responses

Request samples

Content type
[
  • 0
]

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Recreates mandates that are in an expired or rejected state for the specified company.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company owning the mandates to recreate.

Request Body schema:
required

List of internal identifiers of the expired or rejected mandates to recreate.

Array
integer <int32>

Responses

Request samples

Content type
[
  • 0
]

Response samples

Content type
{
  • "SuccessCount": 0,
  • "Errors": [
    ]
}

Cancels the mandate identified by mandateId. When the mandate has a PartnerId, acts as a pass-through to the ChainTrust Partner API: the cancel call is forwarded and ChainTrust recursively cancels the linked Yousign signature requests and rejects the linked directory line requests. When the mandate has no PartnerId (never sent to the partner, e.g. waiting for its SIREN), it is cancelled locally only.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company owning the mandate.

mandateId
required
integer <int32>

Internal identifier of the mandate to cancel.

Responses

Response samples

Content type
{
  • "property1": null,
  • "property2": null
}

Downloads a signed KYC document from the partner for the given mandate. The document is streamed back as-is (PDF or ZIP depending on the partner response).

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Internal identifier of the company owning the mandate.

mandateId
required
integer <int32>

Internal identifier of the mandate containing the document.

documentId
required
integer <int32>

Internal identifier of the document to download.

Responses

Response samples

Content type
"string"

SubTokens

Manages ChainTrust sub-tokens on behalf of the authenticated partner. Sub-token requests are persisted locally (CompanyId + AccountingFolderIds) while ChainTrust remains the live source-of-truth for IsActive and scopes. Requires the Fred.ViDA.Application.Common.FeatureFlags.SubTokens feature flag to be enabled.

Returns the list of sub-tokens known locally for the given company, enriched with live IsActive and Scopes from ChainTrust.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>

Responses

Response samples

Content type
[
  • {
    }
]

Creates a new sub-token for the authenticated partner. The returned Fred.ViDA.Application.SubTokens.ViewModels.SubTokenCreatedViewModel.ClientSecret is only available at creation time and is never stored server-side. Returns 207 Multi-Status when the sub-token was created but linking inbound routes to ChainTrust failed.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>
Request Body schema:
required
DisplayName
string or null
Scopes
Array of strings or null
Enum: "DirectoryRead" "FlowsRead" "FlowsWrite"
AccountingFolderIds
Array of integers or null <int32> [ items <int32 > ]

Responses

Request samples

Content type
{
  • "DisplayName": "string",
  • "Scopes": [
    ],
  • "AccountingFolderIds": [
    ]
}

Response samples

Content type
{
  • "ClientId": "string",
  • "ClientSecret": "string",
  • "DisplayName": "string",
  • "IsActive": true,
  • "Scopes": [
    ],
  • "Sirens": [
    ],
  • "AccountingFolderIds": [
    ]
}

Returns the details of a single sub-token identified by its OAuth2 client ID. Performs an ownership check against local persistence before fetching live data from ChainTrust.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>
clientId
required
string

Responses

Response samples

Content type
{
  • "ClientId": "string",
  • "DisplayName": "string",
  • "IsActive": true,
  • "Scopes": [
    ],
  • "Sirens": [
    ],
  • "AccountingFolderIds": [
    ]
}

Replaces the scopes, accounting folders, display name and active flag of an existing sub-token. This is a full replacement: omitting an accounting folder removes it from the sub-token scope. Performs an ownership check against local persistence before calling ChainTrust. Returns 207 Multi-Status when the sub-token was updated but linking inbound routes to ChainTrust failed.

Authorizations:
oauth2
path Parameters
companyId
required
integer <int32>
clientId
required
string
Request Body schema:
required
DisplayName
string or null
IsActive
boolean or null
Scopes
Array of strings or null
Enum: "DirectoryRead" "FlowsRead" "FlowsWrite"
AccountingFolderIds
Array of integers or null <int32> [ items <int32 > ]

Responses

Request samples

Content type
{
  • "DisplayName": "string",
  • "IsActive": true,
  • "Scopes": [
    ],
  • "AccountingFolderIds": [
    ]
}

Response samples

Content type
{
  • "ClientId": "string",
  • "DisplayName": "string",
  • "IsActive": true,
  • "Scopes": [
    ],
  • "Sirens": [
    ],
  • "AccountingFolderIds": [
    ]
}

Platform

ViDAPlatform_GetAccountingFolderPlatformConfiguration

Authorizations:
oauth2
path Parameters
accountingFolderId
required
integer <int32>

Responses

Response samples

Content type
{
  • "AccountingFolderId": 0,
  • "HasIncomingConfiguration": true,
  • "HasOutgoingConfiguration": true,
  • "DirectoryLines": [
    ]
}