/cpro/factures/v1/soumettreSoumettre une facture PDF
Soumettre une facture avec une pièce jointe PDF. La facture doit référencer un fichier préalablement téléchargé.
Authentification multiple requise
TOUTES REQUISESCe point de terminaison nécessite toutes les méthodes d'authentification suivantes :
OAuth2 Bearer token
Chorus Pro account credentials
En-tête requis
cpro-account: base64(login:password)Comment s'authentifier
Incluez votre token Bearer dans l'en-tête Authorization :
Authorization: Bearer YOUR_API_TOKENVous pouvez obtenir votre token API depuis votre tableau de bord.
Comment s'authentifier
Incluez l'en-tête personnalisé dans votre requête :
cpro-account: base64(login:password)Paramètres du corps
| Paramètre | Requis | Description |
|---|---|---|
numeroFactureSaisi Type: string | Requis | Invoice number. |
dateFacture Type: string | Requis | Invoice date (YYYY-MM-DD). |
cadreDeFacturation.codeCadreFacturation Type: string | Requis | Invoicing framework code (e.g., A1_FACTURE_FOURNISSEUR). |
destinataire.codeDestinataire Type: string | Requis | Recipient SIRET. |
destinataire.codeServiceExecutant Type: string | Optionnel | Recipient service code. ⚠️ Must be sent EXACTLY as returned by rechercher/services (character-by-character match, including any leading/trailing spaces). A trimmed code triggers GFT_MSG_01.033 (« Le service destinataire ne correspond pas à la structure destinataire ») even if the service exists and is active. Note also that when a service is set, its own parameters (consulter/service → parametres.numeroEngagement) override the structure-level mandatory-field rules. |
fournisseur.idFournisseur Type: number | Requis | Supplier structure ID. |
fournisseur.codeCoordonneesBancairesFournisseur Type: number | Requis | Bank details code. |
idUtilisateurCourant Type: number | Requis | Current user ID. |
lignePoste Type: array | Requis | Invoice line items. Watch the field length limits: lignePosteDenomination and lignePosteReference are varchar(40), lignePosteUnite is varchar(20). Exceeding a limit does NOT return a validation error - the API answers 500 "Erreur interne" with no hint about the faulty field. Truncate before sending. |
ligneTva Type: array | Optionnel | VAT summary lines, one per VAT rate. Never include a zero-rate (0%) line: only rates > 0 belong here. If the whole invoice is VAT-exempt, omit ligneTva entirely and set references.typeTva to SANS_TVA (line-level lignePosteTauxTvaManuel values are then ignored). |
modeDepot Type: string | Requis | Deposit mode (DEPOT_PDF_API, SAISIE_API). |
montantTotal Type: object | Requis | Total amounts. Chorus Pro renders amounts with up to 4 decimals exactly as sent: a floating-point residue (e.g. 99.9997 instead of 100.00) shows up verbatim on the generated invoice. Round every amount to the cent (Math.round(x*100)/100) before sending. |
pieceJointePrincipale Type: array | Optionnel | Main attached file (required for PDF mode). |
references Type: object | Requis | Invoice references (currency, payment method, etc.). typeTva rule: if no ligneTva is provided, typeTva MUST be SANS_TVA; EXONERATION additionally requires motifExonerationTva; otherwise use TVA_SUR_DEBIT or TVA_SUR_ENCAISSEMENT. An inconsistent combination (e.g. TVA_SUR_ENCAISSEMENT with no ligneTva) triggers an unexplained 500. |
Exemple de corps de requête
{
"numeroFactureSaisi": "F333",
"dateFacture": "2025-11-05",
"cadreDeFacturation": {
"codeCadreFacturation": "A1_FACTURE_FOURNISSEUR"
},
"destinataire": {
"codeDestinataire": "19672337516762"
},
"fournisseur": {
"codeCoordonneesBancairesFournisseur": 144050,
"idFournisseur": 26262962
},
"idUtilisateurCourant": 65336344681929,
"lignePoste": [
{
"lignePosteDenomination": "Licence",
"lignePosteMontantRemiseHT": 0,
"lignePosteMontantUnitaireHT": 16.6667,
"lignePosteNumero": 1,
"lignePosteQuantite": 1,
"lignePosteReference": "votil_licence",
"lignePosteTauxTvaManuel": 20,
"lignePosteUnite": "licence"
}
],
"ligneTva": [
{
"ligneTvaMontantBaseHtParTaux": 16.6667,
"ligneTvaMontantTvaParTaux": 3.3333,
"ligneTvaTauxManuel": 20
}
],
"modeDepot": "DEPOT_PDF_API",
"montantTotal": {
"montantAPayer": 20,
"montantHtTotal": 16.6667,
"montantRemiseGlobaleTTC": 0,
"montantTVA": 3.3333,
"montantTtcTotal": 20
},
"pieceJointePrincipale": [
{
"pieceJointePrincipaleDesignation": "Facture",
"pieceJointePrincipaleId": 10321512
}
],
"references": {
"deviseFacture": "EUR",
"modePaiement": "VIREMENT",
"typeFacture": "FACTURE",
"typeTva": "TVA_SUR_ENCAISSEMENT"
}
}En-têtes
| En-tête | Requis | Description |
|---|---|---|
Content-Type | Requis | Content type Par défaut: application/json;charset=utf-8 |
Accept | Requis | Expected response type Par défaut: application/json;charset=utf-8 |
Réponses
/cpro/factures/v1/soumettreSoumettre une facture PDF
Soumettre une facture avec une pièce jointe PDF. La facture doit référencer un fichier préalablement téléchargé.
Authentification multiple requise
TOUTES REQUISESCe point de terminaison nécessite toutes les méthodes d'authentification suivantes :
OAuth2 Bearer token
Chorus Pro account credentials
En-tête requis
cpro-account: base64(login:password)Comment s'authentifier
Incluez votre token Bearer dans l'en-tête Authorization :
Authorization: Bearer YOUR_API_TOKENVous pouvez obtenir votre token API depuis votre tableau de bord.
Comment s'authentifier
Incluez l'en-tête personnalisé dans votre requête :
cpro-account: base64(login:password)Paramètres du corps
| Paramètre | Requis | Description |
|---|---|---|
numeroFactureSaisi Type: string | Requis | Invoice number. |
dateFacture Type: string | Requis | Invoice date (YYYY-MM-DD). |
cadreDeFacturation.codeCadreFacturation Type: string | Requis | Invoicing framework code (e.g., A1_FACTURE_FOURNISSEUR). |
destinataire.codeDestinataire Type: string | Requis | Recipient SIRET. |
destinataire.codeServiceExecutant Type: string | Optionnel | Recipient service code. ⚠️ Must be sent EXACTLY as returned by rechercher/services (character-by-character match, including any leading/trailing spaces). A trimmed code triggers GFT_MSG_01.033 (« Le service destinataire ne correspond pas à la structure destinataire ») even if the service exists and is active. Note also that when a service is set, its own parameters (consulter/service → parametres.numeroEngagement) override the structure-level mandatory-field rules. |
fournisseur.idFournisseur Type: number | Requis | Supplier structure ID. |
fournisseur.codeCoordonneesBancairesFournisseur Type: number | Requis | Bank details code. |
idUtilisateurCourant Type: number | Requis | Current user ID. |
lignePoste Type: array | Requis | Invoice line items. Watch the field length limits: lignePosteDenomination and lignePosteReference are varchar(40), lignePosteUnite is varchar(20). Exceeding a limit does NOT return a validation error - the API answers 500 "Erreur interne" with no hint about the faulty field. Truncate before sending. |
ligneTva Type: array | Optionnel | VAT summary lines, one per VAT rate. Never include a zero-rate (0%) line: only rates > 0 belong here. If the whole invoice is VAT-exempt, omit ligneTva entirely and set references.typeTva to SANS_TVA (line-level lignePosteTauxTvaManuel values are then ignored). |
modeDepot Type: string | Requis | Deposit mode (DEPOT_PDF_API, SAISIE_API). |
montantTotal Type: object | Requis | Total amounts. Chorus Pro renders amounts with up to 4 decimals exactly as sent: a floating-point residue (e.g. 99.9997 instead of 100.00) shows up verbatim on the generated invoice. Round every amount to the cent (Math.round(x*100)/100) before sending. |
pieceJointePrincipale Type: array | Optionnel | Main attached file (required for PDF mode). |
references Type: object | Requis | Invoice references (currency, payment method, etc.). typeTva rule: if no ligneTva is provided, typeTva MUST be SANS_TVA; EXONERATION additionally requires motifExonerationTva; otherwise use TVA_SUR_DEBIT or TVA_SUR_ENCAISSEMENT. An inconsistent combination (e.g. TVA_SUR_ENCAISSEMENT with no ligneTva) triggers an unexplained 500. |
Exemple de corps de requête
{
"numeroFactureSaisi": "F333",
"dateFacture": "2025-11-05",
"cadreDeFacturation": {
"codeCadreFacturation": "A1_FACTURE_FOURNISSEUR"
},
"destinataire": {
"codeDestinataire": "19672337516762"
},
"fournisseur": {
"codeCoordonneesBancairesFournisseur": 144050,
"idFournisseur": 26262962
},
"idUtilisateurCourant": 65336344681929,
"lignePoste": [
{
"lignePosteDenomination": "Licence",
"lignePosteMontantRemiseHT": 0,
"lignePosteMontantUnitaireHT": 16.6667,
"lignePosteNumero": 1,
"lignePosteQuantite": 1,
"lignePosteReference": "votil_licence",
"lignePosteTauxTvaManuel": 20,
"lignePosteUnite": "licence"
}
],
"ligneTva": [
{
"ligneTvaMontantBaseHtParTaux": 16.6667,
"ligneTvaMontantTvaParTaux": 3.3333,
"ligneTvaTauxManuel": 20
}
],
"modeDepot": "DEPOT_PDF_API",
"montantTotal": {
"montantAPayer": 20,
"montantHtTotal": 16.6667,
"montantRemiseGlobaleTTC": 0,
"montantTVA": 3.3333,
"montantTtcTotal": 20
},
"pieceJointePrincipale": [
{
"pieceJointePrincipaleDesignation": "Facture",
"pieceJointePrincipaleId": 10321512
}
],
"references": {
"deviseFacture": "EUR",
"modePaiement": "VIREMENT",
"typeFacture": "FACTURE",
"typeTva": "TVA_SUR_ENCAISSEMENT"
}
}En-têtes
| En-tête | Requis | Description |
|---|---|---|
Content-Type | Requis | Content type Par défaut: application/json;charset=utf-8 |
Accept | Requis | Expected response type Par défaut: application/json;charset=utf-8 |