API REST pour convertir vos factures PDF en format Facture-X conforme EN 16931
Incluez votre clé API dans le header de chaque requête:
X-API-Key: fx_your_api_key_here
ou
Authorization: Bearer fx_your_api_key_hereConvertit une facture PDF en Facture-X
{
"pdfBase64": "JVBERi0xLjQKJeLjz9...", // Required: PDF en base64
"profile": "comfort", // Optional: basic | comfort | extended
"autoValidate": true // Optional: valider automatiquement
}{
"success": true,
"data": {
"extractedData": {
"invoiceNumber": "2025119002",
"invoiceDate": "2025-11-19",
"supplierName": "MASSAGE CONCEPT",
...
},
"factureX": {
"xml": "<?xml version='1.0'...",
"profile": "comfort",
"fileName": "facture-x-2025119002.xml"
},
"validation": {
"isValid": true,
"score": 95,
"errors": [],
"warnings": []
}
},
"meta": {
"apiVersion": "1.0",
"creditsRemaining": 950
}
}Valide une facture ou un XML Facture-X
{
"invoiceData": {
"invoiceNumber": "INV-001",
"supplierVAT": "FR32123456789",
...
}
}{
"success": true,
"validation": {
"isValid": true,
"score": 100,
"errors": [],
"warnings": []
}
}401 UnauthorizedClé API invalide ou manquante429 Rate Limit ExceededLimite mensuelle atteinte422 Unprocessable EntityImpossible d'extraire les données du PDF0€
100 conversions/mois
49€/mois
1,000 conversions/mois (0.05€/conv)
199€/mois
10,000 conversions/mois (0.02€/conv)
curl -X POST https://formatx.app/api/v1/convert \
-H "X-API-Key: fx_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"pdfBase64": "JVBERi0xLjQKJeLjz9...",
"profile": "comfort",
"autoValidate": true
}'