factpulse 1.0.9__py3-none-any.whl → 3.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of factpulse might be problematic. Click here for more details.

Files changed (269) hide show
  1. factpulse/__init__.py +275 -203
  2. factpulse/api/__init__.py +5 -3
  3. factpulse/api/afnorpdppa_api.py +559 -9
  4. factpulse/api/afnorpdppa_directory_service_api.py +4313 -66
  5. factpulse/api/afnorpdppa_flow_service_api.py +23 -23
  6. factpulse/api/chorus_pro_api.py +362 -404
  7. factpulse/api/{signature_lectronique_api.py → document_conversion_api.py} +519 -371
  8. factpulse/api/health_api.py +526 -0
  9. factpulse/api/invoice_processing_api.py +3437 -0
  10. factpulse/api/pdfxml_verification_api.py +1719 -0
  11. factpulse/api/{sant_api.py → user_api.py} +18 -17
  12. factpulse/api_client.py +6 -6
  13. factpulse/configuration.py +6 -4
  14. factpulse/exceptions.py +8 -5
  15. factpulse/models/__init__.py +133 -99
  16. factpulse/models/acknowledgment_status.py +38 -0
  17. factpulse/models/additional_document.py +115 -0
  18. factpulse/models/afnor_credentials.py +106 -0
  19. factpulse/models/afnor_destination.py +127 -0
  20. factpulse/models/afnor_health_check_response.py +91 -0
  21. factpulse/models/afnor_result.py +105 -0
  22. factpulse/models/allowance_charge.py +147 -0
  23. factpulse/models/allowance_reason_code.py +42 -0
  24. factpulse/models/allowance_total_amount.py +145 -0
  25. factpulse/models/amount.py +139 -0
  26. factpulse/models/amount_due.py +139 -0
  27. factpulse/models/api_error.py +104 -0
  28. factpulse/models/async_task_status.py +97 -0
  29. factpulse/models/base_amount.py +145 -0
  30. factpulse/models/bounding_box_schema.py +100 -0
  31. factpulse/models/celery_status.py +40 -0
  32. factpulse/models/certificate_info_response.py +24 -24
  33. factpulse/models/charge_total_amount.py +145 -0
  34. factpulse/models/chorus_pro_destination.py +108 -0
  35. factpulse/models/chorus_pro_result.py +101 -0
  36. factpulse/models/contact.py +113 -0
  37. factpulse/models/convert_error_response.py +105 -0
  38. factpulse/models/convert_pending_input_response.py +114 -0
  39. factpulse/models/convert_resume_request.py +87 -0
  40. factpulse/models/convert_success_response.py +126 -0
  41. factpulse/models/convert_validation_failed_response.py +120 -0
  42. factpulse/models/delivery_party.py +121 -0
  43. factpulse/models/destination.py +27 -27
  44. factpulse/models/document_type_info.py +91 -0
  45. factpulse/models/electronic_address.py +90 -0
  46. factpulse/models/enriched_invoice_info.py +133 -0
  47. factpulse/models/error_level.py +37 -0
  48. factpulse/models/error_source.py +43 -0
  49. factpulse/models/extraction_info.py +93 -0
  50. factpulse/models/factur_x_invoice.py +320 -0
  51. factpulse/models/factur_x_profile.py +39 -0
  52. factpulse/models/factur_xpdf_info.py +91 -0
  53. factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py +95 -0
  54. factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +115 -0
  55. factpulse/models/field_status.py +40 -0
  56. factpulse/models/file_info.py +94 -0
  57. factpulse/models/files_info.py +106 -0
  58. factpulse/models/flow_direction.py +37 -0
  59. factpulse/models/flow_profile.py +38 -0
  60. factpulse/models/flow_summary.py +131 -0
  61. factpulse/models/flow_syntax.py +40 -0
  62. factpulse/models/flow_type.py +40 -0
  63. factpulse/models/generate_certificate_request.py +26 -26
  64. factpulse/models/generate_certificate_response.py +15 -15
  65. factpulse/models/get_chorus_pro_id_request.py +100 -0
  66. factpulse/models/get_chorus_pro_id_response.py +98 -0
  67. factpulse/models/get_invoice_request.py +98 -0
  68. factpulse/models/get_invoice_response.py +142 -0
  69. factpulse/models/get_structure_request.py +100 -0
  70. factpulse/models/get_structure_response.py +142 -0
  71. factpulse/models/global_allowance_amount.py +139 -0
  72. factpulse/models/gross_unit_price.py +145 -0
  73. factpulse/models/http_validation_error.py +2 -2
  74. factpulse/models/incoming_invoice.py +196 -0
  75. factpulse/models/incoming_supplier.py +144 -0
  76. factpulse/models/invoice_format.py +38 -0
  77. factpulse/models/invoice_line.py +354 -0
  78. factpulse/models/invoice_line_allowance_amount.py +145 -0
  79. factpulse/models/invoice_note.py +94 -0
  80. factpulse/models/invoice_references.py +194 -0
  81. factpulse/models/invoice_status.py +96 -0
  82. factpulse/models/invoice_totals.py +177 -0
  83. factpulse/models/invoice_totals_prepayment.py +145 -0
  84. factpulse/models/invoice_type_code.py +51 -0
  85. factpulse/models/invoicing_framework.py +110 -0
  86. factpulse/models/invoicing_framework_code.py +39 -0
  87. factpulse/models/line_net_amount.py +145 -0
  88. factpulse/models/line_total_amount.py +145 -0
  89. factpulse/models/mandatory_note_schema.py +124 -0
  90. factpulse/models/manual_rate.py +139 -0
  91. factpulse/models/manual_vat_rate.py +139 -0
  92. factpulse/models/missing_field.py +107 -0
  93. factpulse/models/operation_nature.py +49 -0
  94. factpulse/models/output_format.py +37 -0
  95. factpulse/models/page_dimensions_schema.py +89 -0
  96. factpulse/models/payee.py +168 -0
  97. factpulse/models/payment_card.py +99 -0
  98. factpulse/models/payment_means.py +41 -0
  99. factpulse/models/pdf_validation_result_api.py +169 -0
  100. factpulse/models/pdp_credentials.py +20 -13
  101. factpulse/models/percentage.py +145 -0
  102. factpulse/models/postal_address.py +134 -0
  103. factpulse/models/price_allowance_amount.py +145 -0
  104. factpulse/models/price_basis_quantity.py +145 -0
  105. factpulse/models/processing_options.py +94 -0
  106. factpulse/models/product_characteristic.py +89 -0
  107. factpulse/models/product_classification.py +101 -0
  108. factpulse/models/quantity.py +139 -0
  109. factpulse/models/recipient.py +167 -0
  110. factpulse/models/rounding_amount.py +145 -0
  111. factpulse/models/scheme_id.py +14 -8
  112. factpulse/models/search_flow_request.py +143 -0
  113. factpulse/models/search_flow_response.py +101 -0
  114. factpulse/models/search_services_response.py +101 -0
  115. factpulse/models/search_structure_request.py +119 -0
  116. factpulse/models/search_structure_response.py +101 -0
  117. factpulse/models/signature_info.py +6 -6
  118. factpulse/models/signature_info_api.py +122 -0
  119. factpulse/models/signature_parameters.py +133 -0
  120. factpulse/models/simplified_invoice_data.py +124 -0
  121. factpulse/models/structure_info.py +14 -14
  122. factpulse/models/structure_parameters.py +91 -0
  123. factpulse/models/structure_service.py +93 -0
  124. factpulse/models/submission_mode.py +38 -0
  125. factpulse/models/submit_complete_invoice_request.py +116 -0
  126. factpulse/models/submit_complete_invoice_response.py +145 -0
  127. factpulse/models/submit_flow_request.py +123 -0
  128. factpulse/models/submit_flow_response.py +109 -0
  129. factpulse/models/submit_gross_amount.py +139 -0
  130. factpulse/models/submit_invoice_request.py +176 -0
  131. factpulse/models/submit_invoice_response.py +103 -0
  132. factpulse/models/submit_net_amount.py +139 -0
  133. factpulse/models/submit_vat_amount.py +139 -0
  134. factpulse/models/supplementary_attachment.py +95 -0
  135. factpulse/models/supplier.py +225 -0
  136. factpulse/models/task_response.py +87 -0
  137. factpulse/models/tax_representative.py +95 -0
  138. factpulse/models/taxable_amount.py +139 -0
  139. factpulse/models/total_gross_amount.py +139 -0
  140. factpulse/models/total_net_amount.py +139 -0
  141. factpulse/models/total_vat_amount.py +139 -0
  142. factpulse/models/unit_net_price.py +139 -0
  143. factpulse/models/unit_of_measure.py +41 -0
  144. factpulse/models/validation_error.py +2 -2
  145. factpulse/models/validation_error_detail.py +107 -0
  146. factpulse/models/validation_error_loc_inner.py +2 -2
  147. factpulse/models/validation_error_response.py +87 -0
  148. factpulse/models/validation_info.py +105 -0
  149. factpulse/models/validation_success_response.py +87 -0
  150. factpulse/models/vat_accounting_code.py +39 -0
  151. factpulse/models/vat_amount.py +139 -0
  152. factpulse/models/vat_category.py +44 -0
  153. factpulse/models/vat_line.py +140 -0
  154. factpulse/models/vat_point_date_code.py +38 -0
  155. factpulse/models/vat_rate.py +145 -0
  156. factpulse/models/verification_success_response.py +135 -0
  157. factpulse/models/verified_field_schema.py +129 -0
  158. factpulse/rest.py +9 -4
  159. factpulse-3.0.7.dist-info/METADATA +292 -0
  160. factpulse-3.0.7.dist-info/RECORD +168 -0
  161. factpulse-3.0.7.dist-info/top_level.txt +2 -0
  162. factpulse_helpers/__init__.py +96 -0
  163. factpulse_helpers/client.py +2111 -0
  164. factpulse_helpers/exceptions.py +253 -0
  165. factpulse/api/processing_endpoints_unifis_api.py +0 -592
  166. factpulse/api/traitement_facture_api.py +0 -3439
  167. factpulse/api/utilisateur_api.py +0 -282
  168. factpulse/models/adresse_electronique.py +0 -90
  169. factpulse/models/adresse_postale.py +0 -120
  170. factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py +0 -104
  171. factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.py +0 -104
  172. factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +0 -102
  173. factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +0 -104
  174. factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py +0 -104
  175. factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +0 -104
  176. factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +0 -104
  177. factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +0 -104
  178. factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +0 -104
  179. factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py +0 -104
  180. factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +0 -104
  181. factpulse/models/cadre_de_facturation.py +0 -102
  182. factpulse/models/categorie_tva.py +0 -44
  183. factpulse/models/chorus_pro_credentials.py +0 -95
  184. factpulse/models/code_cadre_facturation.py +0 -39
  185. factpulse/models/code_raison_reduction.py +0 -42
  186. factpulse/models/consulter_facture_request.py +0 -98
  187. factpulse/models/consulter_facture_response.py +0 -142
  188. factpulse/models/consulter_structure_request.py +0 -100
  189. factpulse/models/consulter_structure_response.py +0 -142
  190. factpulse/models/credentials_afnor.py +0 -106
  191. factpulse/models/credentials_chorus_pro.py +0 -115
  192. factpulse/models/destinataire.py +0 -116
  193. factpulse/models/destination_afnor.py +0 -127
  194. factpulse/models/destination_chorus_pro.py +0 -108
  195. factpulse/models/direction_flux.py +0 -37
  196. factpulse/models/donnees_facture_simplifiees.py +0 -124
  197. factpulse/models/facture_enrichie_info_input.py +0 -123
  198. factpulse/models/facture_enrichie_info_output.py +0 -133
  199. factpulse/models/facture_factur_x.py +0 -173
  200. factpulse/models/flux_resume.py +0 -131
  201. factpulse/models/format_sortie.py +0 -37
  202. factpulse/models/fournisseur.py +0 -146
  203. factpulse/models/information_signature_api.py +0 -122
  204. factpulse/models/ligne_de_poste.py +0 -188
  205. factpulse/models/ligne_de_poste_montant_remise_ht.py +0 -145
  206. factpulse/models/ligne_de_poste_montant_total_ligne_ht.py +0 -145
  207. factpulse/models/ligne_de_poste_taux_tva_manuel.py +0 -145
  208. factpulse/models/ligne_de_tva.py +0 -118
  209. factpulse/models/mode_depot.py +0 -38
  210. factpulse/models/mode_paiement.py +0 -41
  211. factpulse/models/montant_ht_total.py +0 -139
  212. factpulse/models/montant_total.py +0 -138
  213. factpulse/models/montant_total_acompte.py +0 -145
  214. factpulse/models/montant_total_montant_remise_globale_ttc.py +0 -145
  215. factpulse/models/montant_ttc_total.py +0 -139
  216. factpulse/models/montant_tva.py +0 -139
  217. factpulse/models/montantapayer.py +0 -139
  218. factpulse/models/montantbaseht.py +0 -139
  219. factpulse/models/montanthttotal.py +0 -139
  220. factpulse/models/montantttctotal.py +0 -139
  221. factpulse/models/montanttva.py +0 -139
  222. factpulse/models/montanttva1.py +0 -139
  223. factpulse/models/montantunitaireht.py +0 -139
  224. factpulse/models/obtenir_id_chorus_pro_request.py +0 -100
  225. factpulse/models/obtenir_id_chorus_pro_response.py +0 -98
  226. factpulse/models/options_processing.py +0 -94
  227. factpulse/models/parametres_signature.py +0 -133
  228. factpulse/models/parametres_structure.py +0 -91
  229. factpulse/models/pdf_factur_x_info.py +0 -91
  230. factpulse/models/piece_jointe_complementaire.py +0 -95
  231. factpulse/models/profil_api.py +0 -39
  232. factpulse/models/profil_flux.py +0 -38
  233. factpulse/models/quantite.py +0 -139
  234. factpulse/models/quota_info.py +0 -95
  235. factpulse/models/rechercher_services_response.py +0 -101
  236. factpulse/models/rechercher_structure_request.py +0 -119
  237. factpulse/models/rechercher_structure_response.py +0 -101
  238. factpulse/models/references.py +0 -124
  239. factpulse/models/reponse_healthcheck_afnor.py +0 -91
  240. factpulse/models/reponse_recherche_flux.py +0 -101
  241. factpulse/models/reponse_soumission_flux.py +0 -109
  242. factpulse/models/reponse_tache.py +0 -87
  243. factpulse/models/reponse_validation_erreur.py +0 -87
  244. factpulse/models/reponse_validation_succes.py +0 -87
  245. factpulse/models/requete_recherche_flux.py +0 -143
  246. factpulse/models/requete_soumission_flux.py +0 -123
  247. factpulse/models/resultat_afnor.py +0 -105
  248. factpulse/models/resultat_chorus_pro.py +0 -101
  249. factpulse/models/resultat_validation_pdfapi.py +0 -169
  250. factpulse/models/service_structure.py +0 -93
  251. factpulse/models/soumettre_facture_complete_request.py +0 -116
  252. factpulse/models/soumettre_facture_complete_response.py +0 -145
  253. factpulse/models/soumettre_facture_request.py +0 -164
  254. factpulse/models/soumettre_facture_response.py +0 -103
  255. factpulse/models/statut_acquittement.py +0 -38
  256. factpulse/models/statut_facture.py +0 -96
  257. factpulse/models/statut_tache.py +0 -99
  258. factpulse/models/syntaxe_flux.py +0 -40
  259. factpulse/models/tauxmanuel.py +0 -139
  260. factpulse/models/type_facture.py +0 -37
  261. factpulse/models/type_flux.py +0 -40
  262. factpulse/models/type_tva.py +0 -39
  263. factpulse/models/unite.py +0 -41
  264. factpulse/models/utilisateur.py +0 -128
  265. factpulse-1.0.9.dist-info/METADATA +0 -182
  266. factpulse-1.0.9.dist-info/RECORD +0 -131
  267. factpulse-1.0.9.dist-info/top_level.txt +0 -1
  268. {factpulse-1.0.9.dist-info → factpulse-3.0.7.dist-info}/WHEEL +0 -0
  269. {factpulse-1.0.9.dist-info → factpulse-3.0.7.dist-info}/licenses/LICENSE +0 -0
@@ -1,9 +1,9 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- API REST FactPulse
4
+ FactPulse REST API
5
5
 
6
- API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }' ``` **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l'accès - ✅ Intégration facile dans n'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l'automatisation ### 📚 Documentation complète Pour plus d'informations sur l'authentification et l'utilisation de l'API : https://www.factpulse.fr/documentation-api/
6
+ REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://www.factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://www.factpulse.fr/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://www.factpulse.fr/documentation-api/
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -16,18 +16,17 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from pydantic import Field, StrictBool, StrictBytes, StrictStr
20
- from typing import Any, Optional, Tuple, Union
19
+ from pydantic import Field, StrictBytes, StrictStr
20
+ from typing import Any, Dict, Optional, Tuple, Union
21
21
  from typing_extensions import Annotated
22
- from factpulse.models.generate_certificate_request import GenerateCertificateRequest
23
- from factpulse.models.generate_certificate_response import GenerateCertificateResponse
22
+ from factpulse.models.convert_resume_request import ConvertResumeRequest
24
23
 
25
24
  from factpulse.api_client import ApiClient, RequestSerialized
26
25
  from factpulse.api_response import ApiResponse
27
26
  from factpulse.rest import RESTResponseType
28
27
 
29
28
 
30
- class SignatureLectroniqueApi:
29
+ class DocumentConversionApi:
31
30
  """NOTE: This class is auto generated by OpenAPI Generator
32
31
  Ref: https://openapi-generator.tech
33
32
 
@@ -41,9 +40,11 @@ class SignatureLectroniqueApi:
41
40
 
42
41
 
43
42
  @validate_call
44
- def generer_certificat_test_api_v1_traitement_generer_certificat_test_post(
43
+ def convert_document_api_v1_convert_post(
45
44
  self,
46
- generate_certificate_request: GenerateCertificateRequest,
45
+ file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
46
+ output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
47
+ callback_url: Optional[StrictStr] = None,
47
48
  _request_timeout: Union[
48
49
  None,
49
50
  Annotated[StrictFloat, Field(gt=0)],
@@ -56,13 +57,17 @@ class SignatureLectroniqueApi:
56
57
  _content_type: Optional[StrictStr] = None,
57
58
  _headers: Optional[Dict[StrictStr, Any]] = None,
58
59
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
- ) -> GenerateCertificateResponse:
60
- """Générer un certificat X.509 auto-signé de test
60
+ ) -> ConvertSuccessResponse:
61
+ """Convertir un document en Factur-X
61
62
 
62
- Génère un certificat X.509 auto-signé pour les tests de signature électronique PDF. **⚠️ ATTENTION : Certificat de TEST uniquement !** Ce certificat est : - Adapté pour tests et développement - Compatible signature PDF (PAdES) - ✅ Conforme eIDAS niveau **SES** (Simple Electronic Signature) - ❌ **JAMAIS utilisable en production** - **Non reconnu** par les navigateurs et lecteurs PDF - **Aucune valeur juridique** ## Niveaux eIDAS - **SES** (Simple) : Certificat auto-signé Généré par cet endpoint - **AdES** (Advanced) : Certificat CA commerciale (Let's Encrypt, etc.) - **QES** (Qualified) : Certificat qualifié PSCO (CertEurope, Universign, etc.) ## Utilisation Une fois généré, le certificat peut être : 1. **Enregistré dans Django** (recommandé) : - Django Admin > Certificats de signature - Upload `certificat_pem` et `cle_privee_pem` 2. **Utilisé directement** : - Signer un PDF avec `/signer-pdf` - Le certificat sera automatiquement utilisé ## Exemple d'appel ```bash curl -X POST \"https://www.factpulse.fr/api/facturation/generer-certificat-test\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organisation\": \"Client XYZ SARL\", \"email\": \"contact@xyz.fr\", \"duree_jours\": 365 }' ``` ## Cas d'usage - Tests de signature PDF en développement - POC de signature électronique - Formation et démos - Tests d'intégration automatisés ## Conformité technique Certificat généré avec : - Clé RSA 2048 ou 4096 bits - Algorithme SHA-256 - Extensions Key Usage : `digitalSignature`, `contentCommitment` (non-repudiation) - Extensions Extended Key Usage : `codeSigning`, `emailProtection` - Validité : 1 jour à 10 ans (configurable) - Format : PEM (certificat et clé) - Optionnel : PKCS#12 (.p12)
63
+ Convertit un document (PDF, DOCX, XLSX, image) en Factur-X conforme. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Extraction OCR + Classification** : Mistral OCR extrait les données et classifie le document en un seul appel 3. **Enrichissement** : Les données sont enrichies via SIRENE (SIRET raison sociale) 4. **Validation** : Les règles Schematron sont appliquées 5. **Génération** : Le Factur-X PDF/A-3 est généré ## Réponses possibles - **200** : Conversion réussie, fichiers disponibles - **202** : Données manquantes, complétion requise - **422** : Validation échouée, corrections nécessaires - **400** : Fichier invalide - **429** : Quota dépassé
63
64
 
64
- :param generate_certificate_request: (required)
65
- :type generate_certificate_request: GenerateCertificateRequest
65
+ :param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
66
+ :type file: bytearray
67
+ :param output: Format de sortie: pdf, xml, both
68
+ :type output: str
69
+ :param callback_url:
70
+ :type callback_url: str
66
71
  :param _request_timeout: timeout setting for this request. If one
67
72
  number provided, it will be total request
68
73
  timeout. It can also be a pair (tuple) of
@@ -85,8 +90,10 @@ class SignatureLectroniqueApi:
85
90
  :return: Returns the result object.
86
91
  """ # noqa: E501
87
92
 
88
- _param = self._generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
89
- generate_certificate_request=generate_certificate_request,
93
+ _param = self._convert_document_api_v1_convert_post_serialize(
94
+ file=file,
95
+ output=output,
96
+ callback_url=callback_url,
90
97
  _request_auth=_request_auth,
91
98
  _content_type=_content_type,
92
99
  _headers=_headers,
@@ -94,10 +101,10 @@ class SignatureLectroniqueApi:
94
101
  )
95
102
 
96
103
  _response_types_map: Dict[str, Optional[str]] = {
97
- '200': "GenerateCertificateResponse",
98
- '400': None,
99
- '500': None,
100
- '422': "HTTPValidationError",
104
+ '200': "ConvertSuccessResponse",
105
+ '202': "ConvertPendingInputResponse",
106
+ '422': "ConvertValidationFailedResponse",
107
+ '400': "ConvertErrorResponse",
101
108
  }
102
109
  response_data = self.api_client.call_api(
103
110
  *_param,
@@ -111,9 +118,11 @@ class SignatureLectroniqueApi:
111
118
 
112
119
 
113
120
  @validate_call
114
- def generer_certificat_test_api_v1_traitement_generer_certificat_test_post_with_http_info(
121
+ def convert_document_api_v1_convert_post_with_http_info(
115
122
  self,
116
- generate_certificate_request: GenerateCertificateRequest,
123
+ file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
124
+ output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
125
+ callback_url: Optional[StrictStr] = None,
117
126
  _request_timeout: Union[
118
127
  None,
119
128
  Annotated[StrictFloat, Field(gt=0)],
@@ -126,13 +135,17 @@ class SignatureLectroniqueApi:
126
135
  _content_type: Optional[StrictStr] = None,
127
136
  _headers: Optional[Dict[StrictStr, Any]] = None,
128
137
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
- ) -> ApiResponse[GenerateCertificateResponse]:
130
- """Générer un certificat X.509 auto-signé de test
138
+ ) -> ApiResponse[ConvertSuccessResponse]:
139
+ """Convertir un document en Factur-X
131
140
 
132
- Génère un certificat X.509 auto-signé pour les tests de signature électronique PDF. **⚠️ ATTENTION : Certificat de TEST uniquement !** Ce certificat est : - Adapté pour tests et développement - Compatible signature PDF (PAdES) - ✅ Conforme eIDAS niveau **SES** (Simple Electronic Signature) - ❌ **JAMAIS utilisable en production** - **Non reconnu** par les navigateurs et lecteurs PDF - **Aucune valeur juridique** ## Niveaux eIDAS - **SES** (Simple) : Certificat auto-signé Généré par cet endpoint - **AdES** (Advanced) : Certificat CA commerciale (Let's Encrypt, etc.) - **QES** (Qualified) : Certificat qualifié PSCO (CertEurope, Universign, etc.) ## Utilisation Une fois généré, le certificat peut être : 1. **Enregistré dans Django** (recommandé) : - Django Admin > Certificats de signature - Upload `certificat_pem` et `cle_privee_pem` 2. **Utilisé directement** : - Signer un PDF avec `/signer-pdf` - Le certificat sera automatiquement utilisé ## Exemple d'appel ```bash curl -X POST \"https://www.factpulse.fr/api/facturation/generer-certificat-test\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organisation\": \"Client XYZ SARL\", \"email\": \"contact@xyz.fr\", \"duree_jours\": 365 }' ``` ## Cas d'usage - Tests de signature PDF en développement - POC de signature électronique - Formation et démos - Tests d'intégration automatisés ## Conformité technique Certificat généré avec : - Clé RSA 2048 ou 4096 bits - Algorithme SHA-256 - Extensions Key Usage : `digitalSignature`, `contentCommitment` (non-repudiation) - Extensions Extended Key Usage : `codeSigning`, `emailProtection` - Validité : 1 jour à 10 ans (configurable) - Format : PEM (certificat et clé) - Optionnel : PKCS#12 (.p12)
141
+ Convertit un document (PDF, DOCX, XLSX, image) en Factur-X conforme. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Extraction OCR + Classification** : Mistral OCR extrait les données et classifie le document en un seul appel 3. **Enrichissement** : Les données sont enrichies via SIRENE (SIRET raison sociale) 4. **Validation** : Les règles Schematron sont appliquées 5. **Génération** : Le Factur-X PDF/A-3 est généré ## Réponses possibles - **200** : Conversion réussie, fichiers disponibles - **202** : Données manquantes, complétion requise - **422** : Validation échouée, corrections nécessaires - **400** : Fichier invalide - **429** : Quota dépassé
133
142
 
134
- :param generate_certificate_request: (required)
135
- :type generate_certificate_request: GenerateCertificateRequest
143
+ :param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
144
+ :type file: bytearray
145
+ :param output: Format de sortie: pdf, xml, both
146
+ :type output: str
147
+ :param callback_url:
148
+ :type callback_url: str
136
149
  :param _request_timeout: timeout setting for this request. If one
137
150
  number provided, it will be total request
138
151
  timeout. It can also be a pair (tuple) of
@@ -155,8 +168,10 @@ class SignatureLectroniqueApi:
155
168
  :return: Returns the result object.
156
169
  """ # noqa: E501
157
170
 
158
- _param = self._generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
159
- generate_certificate_request=generate_certificate_request,
171
+ _param = self._convert_document_api_v1_convert_post_serialize(
172
+ file=file,
173
+ output=output,
174
+ callback_url=callback_url,
160
175
  _request_auth=_request_auth,
161
176
  _content_type=_content_type,
162
177
  _headers=_headers,
@@ -164,10 +179,10 @@ class SignatureLectroniqueApi:
164
179
  )
165
180
 
166
181
  _response_types_map: Dict[str, Optional[str]] = {
167
- '200': "GenerateCertificateResponse",
168
- '400': None,
169
- '500': None,
170
- '422': "HTTPValidationError",
182
+ '200': "ConvertSuccessResponse",
183
+ '202': "ConvertPendingInputResponse",
184
+ '422': "ConvertValidationFailedResponse",
185
+ '400': "ConvertErrorResponse",
171
186
  }
172
187
  response_data = self.api_client.call_api(
173
188
  *_param,
@@ -181,9 +196,11 @@ class SignatureLectroniqueApi:
181
196
 
182
197
 
183
198
  @validate_call
184
- def generer_certificat_test_api_v1_traitement_generer_certificat_test_post_without_preload_content(
199
+ def convert_document_api_v1_convert_post_without_preload_content(
185
200
  self,
186
- generate_certificate_request: GenerateCertificateRequest,
201
+ file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
202
+ output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
203
+ callback_url: Optional[StrictStr] = None,
187
204
  _request_timeout: Union[
188
205
  None,
189
206
  Annotated[StrictFloat, Field(gt=0)],
@@ -197,12 +214,16 @@ class SignatureLectroniqueApi:
197
214
  _headers: Optional[Dict[StrictStr, Any]] = None,
198
215
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
199
216
  ) -> RESTResponseType:
200
- """Générer un certificat X.509 auto-signé de test
217
+ """Convertir un document en Factur-X
201
218
 
202
- Génère un certificat X.509 auto-signé pour les tests de signature électronique PDF. **⚠️ ATTENTION : Certificat de TEST uniquement !** Ce certificat est : - Adapté pour tests et développement - Compatible signature PDF (PAdES) - ✅ Conforme eIDAS niveau **SES** (Simple Electronic Signature) - ❌ **JAMAIS utilisable en production** - **Non reconnu** par les navigateurs et lecteurs PDF - **Aucune valeur juridique** ## Niveaux eIDAS - **SES** (Simple) : Certificat auto-signé Généré par cet endpoint - **AdES** (Advanced) : Certificat CA commerciale (Let's Encrypt, etc.) - **QES** (Qualified) : Certificat qualifié PSCO (CertEurope, Universign, etc.) ## Utilisation Une fois généré, le certificat peut être : 1. **Enregistré dans Django** (recommandé) : - Django Admin > Certificats de signature - Upload `certificat_pem` et `cle_privee_pem` 2. **Utilisé directement** : - Signer un PDF avec `/signer-pdf` - Le certificat sera automatiquement utilisé ## Exemple d'appel ```bash curl -X POST \"https://www.factpulse.fr/api/facturation/generer-certificat-test\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organisation\": \"Client XYZ SARL\", \"email\": \"contact@xyz.fr\", \"duree_jours\": 365 }' ``` ## Cas d'usage - Tests de signature PDF en développement - POC de signature électronique - Formation et démos - Tests d'intégration automatisés ## Conformité technique Certificat généré avec : - Clé RSA 2048 ou 4096 bits - Algorithme SHA-256 - Extensions Key Usage : `digitalSignature`, `contentCommitment` (non-repudiation) - Extensions Extended Key Usage : `codeSigning`, `emailProtection` - Validité : 1 jour à 10 ans (configurable) - Format : PEM (certificat et clé) - Optionnel : PKCS#12 (.p12)
219
+ Convertit un document (PDF, DOCX, XLSX, image) en Factur-X conforme. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Extraction OCR + Classification** : Mistral OCR extrait les données et classifie le document en un seul appel 3. **Enrichissement** : Les données sont enrichies via SIRENE (SIRET raison sociale) 4. **Validation** : Les règles Schematron sont appliquées 5. **Génération** : Le Factur-X PDF/A-3 est généré ## Réponses possibles - **200** : Conversion réussie, fichiers disponibles - **202** : Données manquantes, complétion requise - **422** : Validation échouée, corrections nécessaires - **400** : Fichier invalide - **429** : Quota dépassé
203
220
 
204
- :param generate_certificate_request: (required)
205
- :type generate_certificate_request: GenerateCertificateRequest
221
+ :param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
222
+ :type file: bytearray
223
+ :param output: Format de sortie: pdf, xml, both
224
+ :type output: str
225
+ :param callback_url:
226
+ :type callback_url: str
206
227
  :param _request_timeout: timeout setting for this request. If one
207
228
  number provided, it will be total request
208
229
  timeout. It can also be a pair (tuple) of
@@ -225,8 +246,10 @@ class SignatureLectroniqueApi:
225
246
  :return: Returns the result object.
226
247
  """ # noqa: E501
227
248
 
228
- _param = self._generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
229
- generate_certificate_request=generate_certificate_request,
249
+ _param = self._convert_document_api_v1_convert_post_serialize(
250
+ file=file,
251
+ output=output,
252
+ callback_url=callback_url,
230
253
  _request_auth=_request_auth,
231
254
  _content_type=_content_type,
232
255
  _headers=_headers,
@@ -234,10 +257,10 @@ class SignatureLectroniqueApi:
234
257
  )
235
258
 
236
259
  _response_types_map: Dict[str, Optional[str]] = {
237
- '200': "GenerateCertificateResponse",
238
- '400': None,
239
- '500': None,
240
- '422': "HTTPValidationError",
260
+ '200': "ConvertSuccessResponse",
261
+ '202': "ConvertPendingInputResponse",
262
+ '422': "ConvertValidationFailedResponse",
263
+ '400': "ConvertErrorResponse",
241
264
  }
242
265
  response_data = self.api_client.call_api(
243
266
  *_param,
@@ -246,9 +269,11 @@ class SignatureLectroniqueApi:
246
269
  return response_data.response
247
270
 
248
271
 
249
- def _generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
272
+ def _convert_document_api_v1_convert_post_serialize(
250
273
  self,
251
- generate_certificate_request,
274
+ file,
275
+ output,
276
+ callback_url,
252
277
  _request_auth,
253
278
  _content_type,
254
279
  _headers,
@@ -273,9 +298,13 @@ class SignatureLectroniqueApi:
273
298
  # process the query parameters
274
299
  # process the header parameters
275
300
  # process the form parameters
301
+ if file is not None:
302
+ _files['file'] = file
303
+ if output is not None:
304
+ _form_params.append(('output', output))
305
+ if callback_url is not None:
306
+ _form_params.append(('callback_url', callback_url))
276
307
  # process the body parameter
277
- if generate_certificate_request is not None:
278
- _body_params = generate_certificate_request
279
308
 
280
309
 
281
310
  # set the HTTP header `Accept`
@@ -293,7 +322,7 @@ class SignatureLectroniqueApi:
293
322
  _default_content_type = (
294
323
  self.api_client.select_header_content_type(
295
324
  [
296
- 'application/json'
325
+ 'multipart/form-data'
297
326
  ]
298
327
  )
299
328
  )
@@ -307,7 +336,7 @@ class SignatureLectroniqueApi:
307
336
 
308
337
  return self.api_client.param_serialize(
309
338
  method='POST',
310
- resource_path='/api/v1/traitement/generer-certificat-test',
339
+ resource_path='/api/v1/convert',
311
340
  path_params=_path_params,
312
341
  query_params=_query_params,
313
342
  header_params=_header_params,
@@ -324,15 +353,11 @@ class SignatureLectroniqueApi:
324
353
 
325
354
 
326
355
  @validate_call
327
- def signer_pdf_api_v1_traitement_signer_pdf_post(
356
+ def convert_document_async_api_v1_convert_async_post(
328
357
  self,
329
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (sera traité puis retourné signé en base64)")],
330
- raison: Optional[StrictStr] = None,
331
- localisation: Optional[StrictStr] = None,
332
- contact: Optional[StrictStr] = None,
333
- field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
334
- use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
335
- use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
358
+ file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
359
+ output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
360
+ callback_url: Optional[StrictStr] = None,
336
361
  _request_timeout: Union[
337
362
  None,
338
363
  Annotated[StrictFloat, Field(gt=0)],
@@ -346,24 +371,16 @@ class SignatureLectroniqueApi:
346
371
  _headers: Optional[Dict[StrictStr, Any]] = None,
347
372
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348
373
  ) -> object:
349
- """Signer un PDF avec le certificat du client (PAdES-B-LT)
350
-
351
- Signe un PDF uploadé avec le certificat électronique configuré pour le client (via client_uid du JWT). **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO - hors scope). **⚠️ Disclaimer légal** : Les signatures générées sont des cachets électroniques au sens du règlement eIDAS. Le niveau de validité juridique dépend du certificat utilisé (SES/AdES/QES). FactPulse ne fournit pas de certificats qualifiés QES - vous devez obtenir un certificat auprès d'un PSCO (Prestataire de Services de Confiance qualifié) pour une validité juridique maximale.
352
-
353
- :param fichier_pdf: Fichier PDF à signer (sera traité puis retourné signé en base64) (required)
354
- :type fichier_pdf: bytearray
355
- :param raison:
356
- :type raison: str
357
- :param localisation:
358
- :type localisation: str
359
- :param contact:
360
- :type contact: str
361
- :param field_name: Nom du champ de signature PDF
362
- :type field_name: str
363
- :param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
364
- :type use_pades_lt: bool
365
- :param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
366
- :type use_timestamp: bool
374
+ """Convertir un document en Factur-X (mode asynchrone)
375
+
376
+ Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
377
+
378
+ :param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
379
+ :type file: bytearray
380
+ :param output: Format de sortie: pdf, xml, both
381
+ :type output: str
382
+ :param callback_url:
383
+ :type callback_url: str
367
384
  :param _request_timeout: timeout setting for this request. If one
368
385
  number provided, it will be total request
369
386
  timeout. It can also be a pair (tuple) of
@@ -386,14 +403,10 @@ class SignatureLectroniqueApi:
386
403
  :return: Returns the result object.
387
404
  """ # noqa: E501
388
405
 
389
- _param = self._signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
390
- fichier_pdf=fichier_pdf,
391
- raison=raison,
392
- localisation=localisation,
393
- contact=contact,
394
- field_name=field_name,
395
- use_pades_lt=use_pades_lt,
396
- use_timestamp=use_timestamp,
406
+ _param = self._convert_document_async_api_v1_convert_async_post_serialize(
407
+ file=file,
408
+ output=output,
409
+ callback_url=callback_url,
397
410
  _request_auth=_request_auth,
398
411
  _content_type=_content_type,
399
412
  _headers=_headers,
@@ -402,10 +415,8 @@ class SignatureLectroniqueApi:
402
415
 
403
416
  _response_types_map: Dict[str, Optional[str]] = {
404
417
  '200': "object",
418
+ '202': None,
405
419
  '400': None,
406
- '404': None,
407
- '401': None,
408
- '503': None,
409
420
  '422': "HTTPValidationError",
410
421
  }
411
422
  response_data = self.api_client.call_api(
@@ -420,15 +431,11 @@ class SignatureLectroniqueApi:
420
431
 
421
432
 
422
433
  @validate_call
423
- def signer_pdf_api_v1_traitement_signer_pdf_post_with_http_info(
434
+ def convert_document_async_api_v1_convert_async_post_with_http_info(
424
435
  self,
425
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (sera traité puis retourné signé en base64)")],
426
- raison: Optional[StrictStr] = None,
427
- localisation: Optional[StrictStr] = None,
428
- contact: Optional[StrictStr] = None,
429
- field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
430
- use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
431
- use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
436
+ file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
437
+ output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
438
+ callback_url: Optional[StrictStr] = None,
432
439
  _request_timeout: Union[
433
440
  None,
434
441
  Annotated[StrictFloat, Field(gt=0)],
@@ -442,24 +449,16 @@ class SignatureLectroniqueApi:
442
449
  _headers: Optional[Dict[StrictStr, Any]] = None,
443
450
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
444
451
  ) -> ApiResponse[object]:
445
- """Signer un PDF avec le certificat du client (PAdES-B-LT)
446
-
447
- Signe un PDF uploadé avec le certificat électronique configuré pour le client (via client_uid du JWT). **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO - hors scope). **⚠️ Disclaimer légal** : Les signatures générées sont des cachets électroniques au sens du règlement eIDAS. Le niveau de validité juridique dépend du certificat utilisé (SES/AdES/QES). FactPulse ne fournit pas de certificats qualifiés QES - vous devez obtenir un certificat auprès d'un PSCO (Prestataire de Services de Confiance qualifié) pour une validité juridique maximale.
448
-
449
- :param fichier_pdf: Fichier PDF à signer (sera traité puis retourné signé en base64) (required)
450
- :type fichier_pdf: bytearray
451
- :param raison:
452
- :type raison: str
453
- :param localisation:
454
- :type localisation: str
455
- :param contact:
456
- :type contact: str
457
- :param field_name: Nom du champ de signature PDF
458
- :type field_name: str
459
- :param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
460
- :type use_pades_lt: bool
461
- :param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
462
- :type use_timestamp: bool
452
+ """Convertir un document en Factur-X (mode asynchrone)
453
+
454
+ Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
455
+
456
+ :param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
457
+ :type file: bytearray
458
+ :param output: Format de sortie: pdf, xml, both
459
+ :type output: str
460
+ :param callback_url:
461
+ :type callback_url: str
463
462
  :param _request_timeout: timeout setting for this request. If one
464
463
  number provided, it will be total request
465
464
  timeout. It can also be a pair (tuple) of
@@ -482,14 +481,10 @@ class SignatureLectroniqueApi:
482
481
  :return: Returns the result object.
483
482
  """ # noqa: E501
484
483
 
485
- _param = self._signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
486
- fichier_pdf=fichier_pdf,
487
- raison=raison,
488
- localisation=localisation,
489
- contact=contact,
490
- field_name=field_name,
491
- use_pades_lt=use_pades_lt,
492
- use_timestamp=use_timestamp,
484
+ _param = self._convert_document_async_api_v1_convert_async_post_serialize(
485
+ file=file,
486
+ output=output,
487
+ callback_url=callback_url,
493
488
  _request_auth=_request_auth,
494
489
  _content_type=_content_type,
495
490
  _headers=_headers,
@@ -498,10 +493,8 @@ class SignatureLectroniqueApi:
498
493
 
499
494
  _response_types_map: Dict[str, Optional[str]] = {
500
495
  '200': "object",
496
+ '202': None,
501
497
  '400': None,
502
- '404': None,
503
- '401': None,
504
- '503': None,
505
498
  '422': "HTTPValidationError",
506
499
  }
507
500
  response_data = self.api_client.call_api(
@@ -516,15 +509,11 @@ class SignatureLectroniqueApi:
516
509
 
517
510
 
518
511
  @validate_call
519
- def signer_pdf_api_v1_traitement_signer_pdf_post_without_preload_content(
512
+ def convert_document_async_api_v1_convert_async_post_without_preload_content(
520
513
  self,
521
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (sera traité puis retourné signé en base64)")],
522
- raison: Optional[StrictStr] = None,
523
- localisation: Optional[StrictStr] = None,
524
- contact: Optional[StrictStr] = None,
525
- field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
526
- use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
527
- use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
514
+ file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
515
+ output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
516
+ callback_url: Optional[StrictStr] = None,
528
517
  _request_timeout: Union[
529
518
  None,
530
519
  Annotated[StrictFloat, Field(gt=0)],
@@ -538,24 +527,16 @@ class SignatureLectroniqueApi:
538
527
  _headers: Optional[Dict[StrictStr, Any]] = None,
539
528
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
540
529
  ) -> RESTResponseType:
541
- """Signer un PDF avec le certificat du client (PAdES-B-LT)
542
-
543
- Signe un PDF uploadé avec le certificat électronique configuré pour le client (via client_uid du JWT). **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO - hors scope). **⚠️ Disclaimer légal** : Les signatures générées sont des cachets électroniques au sens du règlement eIDAS. Le niveau de validité juridique dépend du certificat utilisé (SES/AdES/QES). FactPulse ne fournit pas de certificats qualifiés QES - vous devez obtenir un certificat auprès d'un PSCO (Prestataire de Services de Confiance qualifié) pour une validité juridique maximale.
544
-
545
- :param fichier_pdf: Fichier PDF à signer (sera traité puis retourné signé en base64) (required)
546
- :type fichier_pdf: bytearray
547
- :param raison:
548
- :type raison: str
549
- :param localisation:
550
- :type localisation: str
551
- :param contact:
552
- :type contact: str
553
- :param field_name: Nom du champ de signature PDF
554
- :type field_name: str
555
- :param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
556
- :type use_pades_lt: bool
557
- :param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
558
- :type use_timestamp: bool
530
+ """Convertir un document en Factur-X (mode asynchrone)
531
+
532
+ Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
533
+
534
+ :param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
535
+ :type file: bytearray
536
+ :param output: Format de sortie: pdf, xml, both
537
+ :type output: str
538
+ :param callback_url:
539
+ :type callback_url: str
559
540
  :param _request_timeout: timeout setting for this request. If one
560
541
  number provided, it will be total request
561
542
  timeout. It can also be a pair (tuple) of
@@ -578,14 +559,10 @@ class SignatureLectroniqueApi:
578
559
  :return: Returns the result object.
579
560
  """ # noqa: E501
580
561
 
581
- _param = self._signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
582
- fichier_pdf=fichier_pdf,
583
- raison=raison,
584
- localisation=localisation,
585
- contact=contact,
586
- field_name=field_name,
587
- use_pades_lt=use_pades_lt,
588
- use_timestamp=use_timestamp,
562
+ _param = self._convert_document_async_api_v1_convert_async_post_serialize(
563
+ file=file,
564
+ output=output,
565
+ callback_url=callback_url,
589
566
  _request_auth=_request_auth,
590
567
  _content_type=_content_type,
591
568
  _headers=_headers,
@@ -594,10 +571,8 @@ class SignatureLectroniqueApi:
594
571
 
595
572
  _response_types_map: Dict[str, Optional[str]] = {
596
573
  '200': "object",
574
+ '202': None,
597
575
  '400': None,
598
- '404': None,
599
- '401': None,
600
- '503': None,
601
576
  '422': "HTTPValidationError",
602
577
  }
603
578
  response_data = self.api_client.call_api(
@@ -607,15 +582,11 @@ class SignatureLectroniqueApi:
607
582
  return response_data.response
608
583
 
609
584
 
610
- def _signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
585
+ def _convert_document_async_api_v1_convert_async_post_serialize(
611
586
  self,
612
- fichier_pdf,
613
- raison,
614
- localisation,
615
- contact,
616
- field_name,
617
- use_pades_lt,
618
- use_timestamp,
587
+ file,
588
+ output,
589
+ callback_url,
619
590
  _request_auth,
620
591
  _content_type,
621
592
  _headers,
@@ -640,20 +611,12 @@ class SignatureLectroniqueApi:
640
611
  # process the query parameters
641
612
  # process the header parameters
642
613
  # process the form parameters
643
- if fichier_pdf is not None:
644
- _files['fichier_pdf'] = fichier_pdf
645
- if raison is not None:
646
- _form_params.append(('raison', raison))
647
- if localisation is not None:
648
- _form_params.append(('localisation', localisation))
649
- if contact is not None:
650
- _form_params.append(('contact', contact))
651
- if field_name is not None:
652
- _form_params.append(('field_name', field_name))
653
- if use_pades_lt is not None:
654
- _form_params.append(('use_pades_lt', use_pades_lt))
655
- if use_timestamp is not None:
656
- _form_params.append(('use_timestamp', use_timestamp))
614
+ if file is not None:
615
+ _files['file'] = file
616
+ if output is not None:
617
+ _form_params.append(('output', output))
618
+ if callback_url is not None:
619
+ _form_params.append(('callback_url', callback_url))
657
620
  # process the body parameter
658
621
 
659
622
 
@@ -686,7 +649,7 @@ class SignatureLectroniqueApi:
686
649
 
687
650
  return self.api_client.param_serialize(
688
651
  method='POST',
689
- resource_path='/api/v1/traitement/signer-pdf',
652
+ resource_path='/api/v1/convert/async',
690
653
  path_params=_path_params,
691
654
  query_params=_query_params,
692
655
  header_params=_header_params,
@@ -703,15 +666,10 @@ class SignatureLectroniqueApi:
703
666
 
704
667
 
705
668
  @validate_call
706
- def signer_pdf_async_api_v1_traitement_signer_pdf_async_post(
669
+ def download_file_api_v1_convert_conversion_id_download_filename_get(
707
670
  self,
708
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (traité de manière asynchrone)")],
709
- raison: Optional[StrictStr] = None,
710
- localisation: Optional[StrictStr] = None,
711
- contact: Optional[StrictStr] = None,
712
- field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
713
- use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
714
- use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
671
+ conversion_id: StrictStr,
672
+ filename: StrictStr,
715
673
  _request_timeout: Union[
716
674
  None,
717
675
  Annotated[StrictFloat, Field(gt=0)],
@@ -725,24 +683,14 @@ class SignatureLectroniqueApi:
725
683
  _headers: Optional[Dict[StrictStr, Any]] = None,
726
684
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
727
685
  ) -> object:
728
- """Signer un PDF de manière asynchrone (Celery)
729
-
730
- Signe un PDF uploadé de manière asynchrone via une tâche Celery. **Différence avec /signer-pdf** : - `/signer-pdf` : Signature synchrone (blocage jusqu'à la fin) - `/signer-pdf-async` : Signature asynchrone (retourne immédiatement un task_id) **Avantages de l'async** : - Pas de timeout pour les gros fichiers - Pas de blocage du worker FastAPI - Possibilité de suivre la progression via le task_id - Idéal pour les traitements par lot **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **⚠️ Disclaimer légal** : Identique à /signer-pdf (voir documentation de cet endpoint).
731
-
732
- :param fichier_pdf: Fichier PDF à signer (traité de manière asynchrone) (required)
733
- :type fichier_pdf: bytearray
734
- :param raison:
735
- :type raison: str
736
- :param localisation:
737
- :type localisation: str
738
- :param contact:
739
- :type contact: str
740
- :param field_name: Nom du champ de signature PDF
741
- :type field_name: str
742
- :param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
743
- :type use_pades_lt: bool
744
- :param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
745
- :type use_timestamp: bool
686
+ """Télécharger un fichier généré
687
+
688
+ Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
689
+
690
+ :param conversion_id: (required)
691
+ :type conversion_id: str
692
+ :param filename: (required)
693
+ :type filename: str
746
694
  :param _request_timeout: timeout setting for this request. If one
747
695
  number provided, it will be total request
748
696
  timeout. It can also be a pair (tuple) of
@@ -765,14 +713,9 @@ class SignatureLectroniqueApi:
765
713
  :return: Returns the result object.
766
714
  """ # noqa: E501
767
715
 
768
- _param = self._signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
769
- fichier_pdf=fichier_pdf,
770
- raison=raison,
771
- localisation=localisation,
772
- contact=contact,
773
- field_name=field_name,
774
- use_pades_lt=use_pades_lt,
775
- use_timestamp=use_timestamp,
716
+ _param = self._download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
717
+ conversion_id=conversion_id,
718
+ filename=filename,
776
719
  _request_auth=_request_auth,
777
720
  _content_type=_content_type,
778
721
  _headers=_headers,
@@ -781,9 +724,7 @@ class SignatureLectroniqueApi:
781
724
 
782
725
  _response_types_map: Dict[str, Optional[str]] = {
783
726
  '200': "object",
784
- '202': None,
785
- '400': None,
786
- '401': None,
727
+ '404': None,
787
728
  '422': "HTTPValidationError",
788
729
  }
789
730
  response_data = self.api_client.call_api(
@@ -798,15 +739,10 @@ class SignatureLectroniqueApi:
798
739
 
799
740
 
800
741
  @validate_call
801
- def signer_pdf_async_api_v1_traitement_signer_pdf_async_post_with_http_info(
742
+ def download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info(
802
743
  self,
803
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (traité de manière asynchrone)")],
804
- raison: Optional[StrictStr] = None,
805
- localisation: Optional[StrictStr] = None,
806
- contact: Optional[StrictStr] = None,
807
- field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
808
- use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
809
- use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
744
+ conversion_id: StrictStr,
745
+ filename: StrictStr,
810
746
  _request_timeout: Union[
811
747
  None,
812
748
  Annotated[StrictFloat, Field(gt=0)],
@@ -820,24 +756,14 @@ class SignatureLectroniqueApi:
820
756
  _headers: Optional[Dict[StrictStr, Any]] = None,
821
757
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
822
758
  ) -> ApiResponse[object]:
823
- """Signer un PDF de manière asynchrone (Celery)
824
-
825
- Signe un PDF uploadé de manière asynchrone via une tâche Celery. **Différence avec /signer-pdf** : - `/signer-pdf` : Signature synchrone (blocage jusqu'à la fin) - `/signer-pdf-async` : Signature asynchrone (retourne immédiatement un task_id) **Avantages de l'async** : - Pas de timeout pour les gros fichiers - Pas de blocage du worker FastAPI - Possibilité de suivre la progression via le task_id - Idéal pour les traitements par lot **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **⚠️ Disclaimer légal** : Identique à /signer-pdf (voir documentation de cet endpoint).
826
-
827
- :param fichier_pdf: Fichier PDF à signer (traité de manière asynchrone) (required)
828
- :type fichier_pdf: bytearray
829
- :param raison:
830
- :type raison: str
831
- :param localisation:
832
- :type localisation: str
833
- :param contact:
834
- :type contact: str
835
- :param field_name: Nom du champ de signature PDF
836
- :type field_name: str
837
- :param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
838
- :type use_pades_lt: bool
839
- :param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
840
- :type use_timestamp: bool
759
+ """Télécharger un fichier généré
760
+
761
+ Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
762
+
763
+ :param conversion_id: (required)
764
+ :type conversion_id: str
765
+ :param filename: (required)
766
+ :type filename: str
841
767
  :param _request_timeout: timeout setting for this request. If one
842
768
  number provided, it will be total request
843
769
  timeout. It can also be a pair (tuple) of
@@ -860,14 +786,9 @@ class SignatureLectroniqueApi:
860
786
  :return: Returns the result object.
861
787
  """ # noqa: E501
862
788
 
863
- _param = self._signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
864
- fichier_pdf=fichier_pdf,
865
- raison=raison,
866
- localisation=localisation,
867
- contact=contact,
868
- field_name=field_name,
869
- use_pades_lt=use_pades_lt,
870
- use_timestamp=use_timestamp,
789
+ _param = self._download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
790
+ conversion_id=conversion_id,
791
+ filename=filename,
871
792
  _request_auth=_request_auth,
872
793
  _content_type=_content_type,
873
794
  _headers=_headers,
@@ -876,9 +797,7 @@ class SignatureLectroniqueApi:
876
797
 
877
798
  _response_types_map: Dict[str, Optional[str]] = {
878
799
  '200': "object",
879
- '202': None,
880
- '400': None,
881
- '401': None,
800
+ '404': None,
882
801
  '422': "HTTPValidationError",
883
802
  }
884
803
  response_data = self.api_client.call_api(
@@ -893,15 +812,10 @@ class SignatureLectroniqueApi:
893
812
 
894
813
 
895
814
  @validate_call
896
- def signer_pdf_async_api_v1_traitement_signer_pdf_async_post_without_preload_content(
815
+ def download_file_api_v1_convert_conversion_id_download_filename_get_without_preload_content(
897
816
  self,
898
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (traité de manière asynchrone)")],
899
- raison: Optional[StrictStr] = None,
900
- localisation: Optional[StrictStr] = None,
901
- contact: Optional[StrictStr] = None,
902
- field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
903
- use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
904
- use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
817
+ conversion_id: StrictStr,
818
+ filename: StrictStr,
905
819
  _request_timeout: Union[
906
820
  None,
907
821
  Annotated[StrictFloat, Field(gt=0)],
@@ -915,24 +829,14 @@ class SignatureLectroniqueApi:
915
829
  _headers: Optional[Dict[StrictStr, Any]] = None,
916
830
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
917
831
  ) -> RESTResponseType:
918
- """Signer un PDF de manière asynchrone (Celery)
919
-
920
- Signe un PDF uploadé de manière asynchrone via une tâche Celery. **Différence avec /signer-pdf** : - `/signer-pdf` : Signature synchrone (blocage jusqu'à la fin) - `/signer-pdf-async` : Signature asynchrone (retourne immédiatement un task_id) **Avantages de l'async** : - Pas de timeout pour les gros fichiers - Pas de blocage du worker FastAPI - Possibilité de suivre la progression via le task_id - Idéal pour les traitements par lot **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **⚠️ Disclaimer légal** : Identique à /signer-pdf (voir documentation de cet endpoint).
921
-
922
- :param fichier_pdf: Fichier PDF à signer (traité de manière asynchrone) (required)
923
- :type fichier_pdf: bytearray
924
- :param raison:
925
- :type raison: str
926
- :param localisation:
927
- :type localisation: str
928
- :param contact:
929
- :type contact: str
930
- :param field_name: Nom du champ de signature PDF
931
- :type field_name: str
932
- :param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
933
- :type use_pades_lt: bool
934
- :param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
935
- :type use_timestamp: bool
832
+ """Télécharger un fichier généré
833
+
834
+ Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
835
+
836
+ :param conversion_id: (required)
837
+ :type conversion_id: str
838
+ :param filename: (required)
839
+ :type filename: str
936
840
  :param _request_timeout: timeout setting for this request. If one
937
841
  number provided, it will be total request
938
842
  timeout. It can also be a pair (tuple) of
@@ -955,14 +859,9 @@ class SignatureLectroniqueApi:
955
859
  :return: Returns the result object.
956
860
  """ # noqa: E501
957
861
 
958
- _param = self._signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
959
- fichier_pdf=fichier_pdf,
960
- raison=raison,
961
- localisation=localisation,
962
- contact=contact,
963
- field_name=field_name,
964
- use_pades_lt=use_pades_lt,
965
- use_timestamp=use_timestamp,
862
+ _param = self._download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
863
+ conversion_id=conversion_id,
864
+ filename=filename,
966
865
  _request_auth=_request_auth,
967
866
  _content_type=_content_type,
968
867
  _headers=_headers,
@@ -971,9 +870,7 @@ class SignatureLectroniqueApi:
971
870
 
972
871
  _response_types_map: Dict[str, Optional[str]] = {
973
872
  '200': "object",
974
- '202': None,
975
- '400': None,
976
- '401': None,
873
+ '404': None,
977
874
  '422': "HTTPValidationError",
978
875
  }
979
876
  response_data = self.api_client.call_api(
@@ -983,15 +880,10 @@ class SignatureLectroniqueApi:
983
880
  return response_data.response
984
881
 
985
882
 
986
- def _signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
883
+ def _download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
987
884
  self,
988
- fichier_pdf,
989
- raison,
990
- localisation,
991
- contact,
992
- field_name,
993
- use_pades_lt,
994
- use_timestamp,
885
+ conversion_id,
886
+ filename,
995
887
  _request_auth,
996
888
  _content_type,
997
889
  _headers,
@@ -1013,23 +905,13 @@ class SignatureLectroniqueApi:
1013
905
  _body_params: Optional[bytes] = None
1014
906
 
1015
907
  # process the path parameters
908
+ if conversion_id is not None:
909
+ _path_params['conversion_id'] = conversion_id
910
+ if filename is not None:
911
+ _path_params['filename'] = filename
1016
912
  # process the query parameters
1017
913
  # process the header parameters
1018
914
  # process the form parameters
1019
- if fichier_pdf is not None:
1020
- _files['fichier_pdf'] = fichier_pdf
1021
- if raison is not None:
1022
- _form_params.append(('raison', raison))
1023
- if localisation is not None:
1024
- _form_params.append(('localisation', localisation))
1025
- if contact is not None:
1026
- _form_params.append(('contact', contact))
1027
- if field_name is not None:
1028
- _form_params.append(('field_name', field_name))
1029
- if use_pades_lt is not None:
1030
- _form_params.append(('use_pades_lt', use_pades_lt))
1031
- if use_timestamp is not None:
1032
- _form_params.append(('use_timestamp', use_timestamp))
1033
915
  # process the body parameter
1034
916
 
1035
917
 
@@ -1041,19 +923,6 @@ class SignatureLectroniqueApi:
1041
923
  ]
1042
924
  )
1043
925
 
1044
- # set the HTTP header `Content-Type`
1045
- if _content_type:
1046
- _header_params['Content-Type'] = _content_type
1047
- else:
1048
- _default_content_type = (
1049
- self.api_client.select_header_content_type(
1050
- [
1051
- 'multipart/form-data'
1052
- ]
1053
- )
1054
- )
1055
- if _default_content_type is not None:
1056
- _header_params['Content-Type'] = _default_content_type
1057
926
 
1058
927
  # authentication setting
1059
928
  _auth_settings: List[str] = [
@@ -1061,8 +930,8 @@ class SignatureLectroniqueApi:
1061
930
  ]
1062
931
 
1063
932
  return self.api_client.param_serialize(
1064
- method='POST',
1065
- resource_path='/api/v1/traitement/signer-pdf-async',
933
+ method='GET',
934
+ resource_path='/api/v1/convert/{conversion_id}/download/{filename}',
1066
935
  path_params=_path_params,
1067
936
  query_params=_query_params,
1068
937
  header_params=_header_params,
@@ -1079,9 +948,9 @@ class SignatureLectroniqueApi:
1079
948
 
1080
949
 
1081
950
  @validate_call
1082
- def valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post(
951
+ def get_conversion_status_api_v1_convert_conversion_id_status_get(
1083
952
  self,
1084
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à valider (sera analysé pour détecter et valider les signatures)")],
953
+ conversion_id: StrictStr,
1085
954
  _request_timeout: Union[
1086
955
  None,
1087
956
  Annotated[StrictFloat, Field(gt=0)],
@@ -1094,13 +963,13 @@ class SignatureLectroniqueApi:
1094
963
  _content_type: Optional[StrictStr] = None,
1095
964
  _headers: Optional[Dict[StrictStr, Any]] = None,
1096
965
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1097
- ) -> object:
1098
- """Valider les signatures électroniques d'un PDF
966
+ ) -> Dict[str, object]:
967
+ """Vérifier le statut d'une conversion
1099
968
 
1100
- Valide les signatures électroniques présentes dans un PDF uploadé. **Vérifications effectuées** : - Présence de signatures - Intégrité du document (non modifié depuis signature) - Validité des certificats - Chaîne de confiance (si disponible) - Présence d'horodatage (PAdES-B-T) - Données de validation (PAdES-B-LT) **Standards supportés** : PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note** : Cette validation est technique (intégrité cryptographique). La validité juridique dépend du niveau eIDAS du certificat (SES/AdES/QES) et du contexte d'utilisation.
969
+ Retourne le statut actuel d'une conversion asynchrone.
1101
970
 
1102
- :param fichier_pdf: Fichier PDF à valider (sera analysé pour détecter et valider les signatures) (required)
1103
- :type fichier_pdf: bytearray
971
+ :param conversion_id: (required)
972
+ :type conversion_id: str
1104
973
  :param _request_timeout: timeout setting for this request. If one
1105
974
  number provided, it will be total request
1106
975
  timeout. It can also be a pair (tuple) of
@@ -1123,8 +992,8 @@ class SignatureLectroniqueApi:
1123
992
  :return: Returns the result object.
1124
993
  """ # noqa: E501
1125
994
 
1126
- _param = self._valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
1127
- fichier_pdf=fichier_pdf,
995
+ _param = self._get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
996
+ conversion_id=conversion_id,
1128
997
  _request_auth=_request_auth,
1129
998
  _content_type=_content_type,
1130
999
  _headers=_headers,
@@ -1132,8 +1001,7 @@ class SignatureLectroniqueApi:
1132
1001
  )
1133
1002
 
1134
1003
  _response_types_map: Dict[str, Optional[str]] = {
1135
- '200': "object",
1136
- '400': None,
1004
+ '200': "Dict[str, object]",
1137
1005
  '422': "HTTPValidationError",
1138
1006
  }
1139
1007
  response_data = self.api_client.call_api(
@@ -1148,9 +1016,9 @@ class SignatureLectroniqueApi:
1148
1016
 
1149
1017
 
1150
1018
  @validate_call
1151
- def valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_with_http_info(
1019
+ def get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info(
1152
1020
  self,
1153
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à valider (sera analysé pour détecter et valider les signatures)")],
1021
+ conversion_id: StrictStr,
1154
1022
  _request_timeout: Union[
1155
1023
  None,
1156
1024
  Annotated[StrictFloat, Field(gt=0)],
@@ -1163,13 +1031,13 @@ class SignatureLectroniqueApi:
1163
1031
  _content_type: Optional[StrictStr] = None,
1164
1032
  _headers: Optional[Dict[StrictStr, Any]] = None,
1165
1033
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1166
- ) -> ApiResponse[object]:
1167
- """Valider les signatures électroniques d'un PDF
1034
+ ) -> ApiResponse[Dict[str, object]]:
1035
+ """Vérifier le statut d'une conversion
1168
1036
 
1169
- Valide les signatures électroniques présentes dans un PDF uploadé. **Vérifications effectuées** : - Présence de signatures - Intégrité du document (non modifié depuis signature) - Validité des certificats - Chaîne de confiance (si disponible) - Présence d'horodatage (PAdES-B-T) - Données de validation (PAdES-B-LT) **Standards supportés** : PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note** : Cette validation est technique (intégrité cryptographique). La validité juridique dépend du niveau eIDAS du certificat (SES/AdES/QES) et du contexte d'utilisation.
1037
+ Retourne le statut actuel d'une conversion asynchrone.
1170
1038
 
1171
- :param fichier_pdf: Fichier PDF à valider (sera analysé pour détecter et valider les signatures) (required)
1172
- :type fichier_pdf: bytearray
1039
+ :param conversion_id: (required)
1040
+ :type conversion_id: str
1173
1041
  :param _request_timeout: timeout setting for this request. If one
1174
1042
  number provided, it will be total request
1175
1043
  timeout. It can also be a pair (tuple) of
@@ -1192,8 +1060,8 @@ class SignatureLectroniqueApi:
1192
1060
  :return: Returns the result object.
1193
1061
  """ # noqa: E501
1194
1062
 
1195
- _param = self._valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
1196
- fichier_pdf=fichier_pdf,
1063
+ _param = self._get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
1064
+ conversion_id=conversion_id,
1197
1065
  _request_auth=_request_auth,
1198
1066
  _content_type=_content_type,
1199
1067
  _headers=_headers,
@@ -1201,8 +1069,7 @@ class SignatureLectroniqueApi:
1201
1069
  )
1202
1070
 
1203
1071
  _response_types_map: Dict[str, Optional[str]] = {
1204
- '200': "object",
1205
- '400': None,
1072
+ '200': "Dict[str, object]",
1206
1073
  '422': "HTTPValidationError",
1207
1074
  }
1208
1075
  response_data = self.api_client.call_api(
@@ -1217,9 +1084,9 @@ class SignatureLectroniqueApi:
1217
1084
 
1218
1085
 
1219
1086
  @validate_call
1220
- def valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_without_preload_content(
1087
+ def get_conversion_status_api_v1_convert_conversion_id_status_get_without_preload_content(
1221
1088
  self,
1222
- fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à valider (sera analysé pour détecter et valider les signatures)")],
1089
+ conversion_id: StrictStr,
1223
1090
  _request_timeout: Union[
1224
1091
  None,
1225
1092
  Annotated[StrictFloat, Field(gt=0)],
@@ -1233,12 +1100,12 @@ class SignatureLectroniqueApi:
1233
1100
  _headers: Optional[Dict[StrictStr, Any]] = None,
1234
1101
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1235
1102
  ) -> RESTResponseType:
1236
- """Valider les signatures électroniques d'un PDF
1103
+ """Vérifier le statut d'une conversion
1237
1104
 
1238
- Valide les signatures électroniques présentes dans un PDF uploadé. **Vérifications effectuées** : - Présence de signatures - Intégrité du document (non modifié depuis signature) - Validité des certificats - Chaîne de confiance (si disponible) - Présence d'horodatage (PAdES-B-T) - Données de validation (PAdES-B-LT) **Standards supportés** : PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note** : Cette validation est technique (intégrité cryptographique). La validité juridique dépend du niveau eIDAS du certificat (SES/AdES/QES) et du contexte d'utilisation.
1105
+ Retourne le statut actuel d'une conversion asynchrone.
1239
1106
 
1240
- :param fichier_pdf: Fichier PDF à valider (sera analysé pour détecter et valider les signatures) (required)
1241
- :type fichier_pdf: bytearray
1107
+ :param conversion_id: (required)
1108
+ :type conversion_id: str
1242
1109
  :param _request_timeout: timeout setting for this request. If one
1243
1110
  number provided, it will be total request
1244
1111
  timeout. It can also be a pair (tuple) of
@@ -1261,8 +1128,8 @@ class SignatureLectroniqueApi:
1261
1128
  :return: Returns the result object.
1262
1129
  """ # noqa: E501
1263
1130
 
1264
- _param = self._valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
1265
- fichier_pdf=fichier_pdf,
1131
+ _param = self._get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
1132
+ conversion_id=conversion_id,
1266
1133
  _request_auth=_request_auth,
1267
1134
  _content_type=_content_type,
1268
1135
  _headers=_headers,
@@ -1270,8 +1137,7 @@ class SignatureLectroniqueApi:
1270
1137
  )
1271
1138
 
1272
1139
  _response_types_map: Dict[str, Optional[str]] = {
1273
- '200': "object",
1274
- '400': None,
1140
+ '200': "Dict[str, object]",
1275
1141
  '422': "HTTPValidationError",
1276
1142
  }
1277
1143
  response_data = self.api_client.call_api(
@@ -1281,9 +1147,289 @@ class SignatureLectroniqueApi:
1281
1147
  return response_data.response
1282
1148
 
1283
1149
 
1284
- def _valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
1150
+ def _get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
1151
+ self,
1152
+ conversion_id,
1153
+ _request_auth,
1154
+ _content_type,
1155
+ _headers,
1156
+ _host_index,
1157
+ ) -> RequestSerialized:
1158
+
1159
+ _host = None
1160
+
1161
+ _collection_formats: Dict[str, str] = {
1162
+ }
1163
+
1164
+ _path_params: Dict[str, str] = {}
1165
+ _query_params: List[Tuple[str, str]] = []
1166
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1167
+ _form_params: List[Tuple[str, str]] = []
1168
+ _files: Dict[
1169
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1170
+ ] = {}
1171
+ _body_params: Optional[bytes] = None
1172
+
1173
+ # process the path parameters
1174
+ if conversion_id is not None:
1175
+ _path_params['conversion_id'] = conversion_id
1176
+ # process the query parameters
1177
+ # process the header parameters
1178
+ # process the form parameters
1179
+ # process the body parameter
1180
+
1181
+
1182
+ # set the HTTP header `Accept`
1183
+ if 'Accept' not in _header_params:
1184
+ _header_params['Accept'] = self.api_client.select_header_accept(
1185
+ [
1186
+ 'application/json'
1187
+ ]
1188
+ )
1189
+
1190
+
1191
+ # authentication setting
1192
+ _auth_settings: List[str] = [
1193
+ 'HTTPBearer'
1194
+ ]
1195
+
1196
+ return self.api_client.param_serialize(
1197
+ method='GET',
1198
+ resource_path='/api/v1/convert/{conversion_id}/status',
1199
+ path_params=_path_params,
1200
+ query_params=_query_params,
1201
+ header_params=_header_params,
1202
+ body=_body_params,
1203
+ post_params=_form_params,
1204
+ files=_files,
1205
+ auth_settings=_auth_settings,
1206
+ collection_formats=_collection_formats,
1207
+ _host=_host,
1208
+ _request_auth=_request_auth
1209
+ )
1210
+
1211
+
1212
+
1213
+
1214
+ @validate_call
1215
+ def resume_conversion_api_v1_convert_conversion_id_resume_post(
1216
+ self,
1217
+ conversion_id: StrictStr,
1218
+ convert_resume_request: ConvertResumeRequest,
1219
+ _request_timeout: Union[
1220
+ None,
1221
+ Annotated[StrictFloat, Field(gt=0)],
1222
+ Tuple[
1223
+ Annotated[StrictFloat, Field(gt=0)],
1224
+ Annotated[StrictFloat, Field(gt=0)]
1225
+ ]
1226
+ ] = None,
1227
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1228
+ _content_type: Optional[StrictStr] = None,
1229
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1230
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1231
+ ) -> ConvertSuccessResponse:
1232
+ """Reprendre une conversion avec corrections
1233
+
1234
+ Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
1235
+
1236
+ :param conversion_id: (required)
1237
+ :type conversion_id: str
1238
+ :param convert_resume_request: (required)
1239
+ :type convert_resume_request: ConvertResumeRequest
1240
+ :param _request_timeout: timeout setting for this request. If one
1241
+ number provided, it will be total request
1242
+ timeout. It can also be a pair (tuple) of
1243
+ (connection, read) timeouts.
1244
+ :type _request_timeout: int, tuple(int, int), optional
1245
+ :param _request_auth: set to override the auth_settings for an a single
1246
+ request; this effectively ignores the
1247
+ authentication in the spec for a single request.
1248
+ :type _request_auth: dict, optional
1249
+ :param _content_type: force content-type for the request.
1250
+ :type _content_type: str, Optional
1251
+ :param _headers: set to override the headers for a single
1252
+ request; this effectively ignores the headers
1253
+ in the spec for a single request.
1254
+ :type _headers: dict, optional
1255
+ :param _host_index: set to override the host_index for a single
1256
+ request; this effectively ignores the host_index
1257
+ in the spec for a single request.
1258
+ :type _host_index: int, optional
1259
+ :return: Returns the result object.
1260
+ """ # noqa: E501
1261
+
1262
+ _param = self._resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
1263
+ conversion_id=conversion_id,
1264
+ convert_resume_request=convert_resume_request,
1265
+ _request_auth=_request_auth,
1266
+ _content_type=_content_type,
1267
+ _headers=_headers,
1268
+ _host_index=_host_index
1269
+ )
1270
+
1271
+ _response_types_map: Dict[str, Optional[str]] = {
1272
+ '200': "ConvertSuccessResponse",
1273
+ '404': None,
1274
+ '422': "ConvertValidationFailedResponse",
1275
+ }
1276
+ response_data = self.api_client.call_api(
1277
+ *_param,
1278
+ _request_timeout=_request_timeout
1279
+ )
1280
+ response_data.read()
1281
+ return self.api_client.response_deserialize(
1282
+ response_data=response_data,
1283
+ response_types_map=_response_types_map,
1284
+ ).data
1285
+
1286
+
1287
+ @validate_call
1288
+ def resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info(
1289
+ self,
1290
+ conversion_id: StrictStr,
1291
+ convert_resume_request: ConvertResumeRequest,
1292
+ _request_timeout: Union[
1293
+ None,
1294
+ Annotated[StrictFloat, Field(gt=0)],
1295
+ Tuple[
1296
+ Annotated[StrictFloat, Field(gt=0)],
1297
+ Annotated[StrictFloat, Field(gt=0)]
1298
+ ]
1299
+ ] = None,
1300
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1301
+ _content_type: Optional[StrictStr] = None,
1302
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1303
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1304
+ ) -> ApiResponse[ConvertSuccessResponse]:
1305
+ """Reprendre une conversion avec corrections
1306
+
1307
+ Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
1308
+
1309
+ :param conversion_id: (required)
1310
+ :type conversion_id: str
1311
+ :param convert_resume_request: (required)
1312
+ :type convert_resume_request: ConvertResumeRequest
1313
+ :param _request_timeout: timeout setting for this request. If one
1314
+ number provided, it will be total request
1315
+ timeout. It can also be a pair (tuple) of
1316
+ (connection, read) timeouts.
1317
+ :type _request_timeout: int, tuple(int, int), optional
1318
+ :param _request_auth: set to override the auth_settings for an a single
1319
+ request; this effectively ignores the
1320
+ authentication in the spec for a single request.
1321
+ :type _request_auth: dict, optional
1322
+ :param _content_type: force content-type for the request.
1323
+ :type _content_type: str, Optional
1324
+ :param _headers: set to override the headers for a single
1325
+ request; this effectively ignores the headers
1326
+ in the spec for a single request.
1327
+ :type _headers: dict, optional
1328
+ :param _host_index: set to override the host_index for a single
1329
+ request; this effectively ignores the host_index
1330
+ in the spec for a single request.
1331
+ :type _host_index: int, optional
1332
+ :return: Returns the result object.
1333
+ """ # noqa: E501
1334
+
1335
+ _param = self._resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
1336
+ conversion_id=conversion_id,
1337
+ convert_resume_request=convert_resume_request,
1338
+ _request_auth=_request_auth,
1339
+ _content_type=_content_type,
1340
+ _headers=_headers,
1341
+ _host_index=_host_index
1342
+ )
1343
+
1344
+ _response_types_map: Dict[str, Optional[str]] = {
1345
+ '200': "ConvertSuccessResponse",
1346
+ '404': None,
1347
+ '422': "ConvertValidationFailedResponse",
1348
+ }
1349
+ response_data = self.api_client.call_api(
1350
+ *_param,
1351
+ _request_timeout=_request_timeout
1352
+ )
1353
+ response_data.read()
1354
+ return self.api_client.response_deserialize(
1355
+ response_data=response_data,
1356
+ response_types_map=_response_types_map,
1357
+ )
1358
+
1359
+
1360
+ @validate_call
1361
+ def resume_conversion_api_v1_convert_conversion_id_resume_post_without_preload_content(
1362
+ self,
1363
+ conversion_id: StrictStr,
1364
+ convert_resume_request: ConvertResumeRequest,
1365
+ _request_timeout: Union[
1366
+ None,
1367
+ Annotated[StrictFloat, Field(gt=0)],
1368
+ Tuple[
1369
+ Annotated[StrictFloat, Field(gt=0)],
1370
+ Annotated[StrictFloat, Field(gt=0)]
1371
+ ]
1372
+ ] = None,
1373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1374
+ _content_type: Optional[StrictStr] = None,
1375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1377
+ ) -> RESTResponseType:
1378
+ """Reprendre une conversion avec corrections
1379
+
1380
+ Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
1381
+
1382
+ :param conversion_id: (required)
1383
+ :type conversion_id: str
1384
+ :param convert_resume_request: (required)
1385
+ :type convert_resume_request: ConvertResumeRequest
1386
+ :param _request_timeout: timeout setting for this request. If one
1387
+ number provided, it will be total request
1388
+ timeout. It can also be a pair (tuple) of
1389
+ (connection, read) timeouts.
1390
+ :type _request_timeout: int, tuple(int, int), optional
1391
+ :param _request_auth: set to override the auth_settings for an a single
1392
+ request; this effectively ignores the
1393
+ authentication in the spec for a single request.
1394
+ :type _request_auth: dict, optional
1395
+ :param _content_type: force content-type for the request.
1396
+ :type _content_type: str, Optional
1397
+ :param _headers: set to override the headers for a single
1398
+ request; this effectively ignores the headers
1399
+ in the spec for a single request.
1400
+ :type _headers: dict, optional
1401
+ :param _host_index: set to override the host_index for a single
1402
+ request; this effectively ignores the host_index
1403
+ in the spec for a single request.
1404
+ :type _host_index: int, optional
1405
+ :return: Returns the result object.
1406
+ """ # noqa: E501
1407
+
1408
+ _param = self._resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
1409
+ conversion_id=conversion_id,
1410
+ convert_resume_request=convert_resume_request,
1411
+ _request_auth=_request_auth,
1412
+ _content_type=_content_type,
1413
+ _headers=_headers,
1414
+ _host_index=_host_index
1415
+ )
1416
+
1417
+ _response_types_map: Dict[str, Optional[str]] = {
1418
+ '200': "ConvertSuccessResponse",
1419
+ '404': None,
1420
+ '422': "ConvertValidationFailedResponse",
1421
+ }
1422
+ response_data = self.api_client.call_api(
1423
+ *_param,
1424
+ _request_timeout=_request_timeout
1425
+ )
1426
+ return response_data.response
1427
+
1428
+
1429
+ def _resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
1285
1430
  self,
1286
- fichier_pdf,
1431
+ conversion_id,
1432
+ convert_resume_request,
1287
1433
  _request_auth,
1288
1434
  _content_type,
1289
1435
  _headers,
@@ -1305,12 +1451,14 @@ class SignatureLectroniqueApi:
1305
1451
  _body_params: Optional[bytes] = None
1306
1452
 
1307
1453
  # process the path parameters
1454
+ if conversion_id is not None:
1455
+ _path_params['conversion_id'] = conversion_id
1308
1456
  # process the query parameters
1309
1457
  # process the header parameters
1310
1458
  # process the form parameters
1311
- if fichier_pdf is not None:
1312
- _files['fichier_pdf'] = fichier_pdf
1313
1459
  # process the body parameter
1460
+ if convert_resume_request is not None:
1461
+ _body_params = convert_resume_request
1314
1462
 
1315
1463
 
1316
1464
  # set the HTTP header `Accept`
@@ -1328,7 +1476,7 @@ class SignatureLectroniqueApi:
1328
1476
  _default_content_type = (
1329
1477
  self.api_client.select_header_content_type(
1330
1478
  [
1331
- 'multipart/form-data'
1479
+ 'application/json'
1332
1480
  ]
1333
1481
  )
1334
1482
  )
@@ -1342,7 +1490,7 @@ class SignatureLectroniqueApi:
1342
1490
 
1343
1491
  return self.api_client.param_serialize(
1344
1492
  method='POST',
1345
- resource_path='/api/v1/traitement/valider-signature-pdf',
1493
+ resource_path='/api/v1/convert/{conversion_id}/resume',
1346
1494
  path_params=_path_params,
1347
1495
  query_params=_query_params,
1348
1496
  header_params=_header_params,