factpulse 3.0.7__py3-none-any.whl → 3.0.23__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.
- factpulse/__init__.py +289 -12
- factpulse/api/__init__.py +2 -0
- factpulse/api/afnorpdppa_api.py +16 -14
- factpulse/api/afnorpdppa_directory_service_api.py +1224 -309
- factpulse/api/afnorpdppa_flow_service_api.py +199 -68
- factpulse/api/chorus_pro_api.py +61 -8
- factpulse/api/document_conversion_api.py +54 -338
- factpulse/api/downloads_api.py +1171 -0
- factpulse/api/e_reporting_api.py +3254 -0
- factpulse/api/health_api.py +8 -1
- factpulse/api/invoice_processing_api.py +234 -37
- factpulse/api/pdfxml_verification_api.py +98 -19
- factpulse/api/user_api.py +5 -1
- factpulse/api_client.py +3 -2
- factpulse/configuration.py +10 -5
- factpulse/exceptions.py +2 -1
- factpulse/models/__init__.py +143 -6
- factpulse/models/accept_language.py +38 -0
- factpulse/models/acknowledgment_status.py +2 -1
- factpulse/models/additional_document.py +2 -1
- factpulse/models/afnor_acknowledgement.py +100 -0
- factpulse/models/afnor_acknowledgement_detail.py +105 -0
- factpulse/models/afnor_address_edit.py +111 -0
- factpulse/models/afnor_address_patch.py +141 -0
- factpulse/models/afnor_address_put.py +129 -0
- factpulse/models/afnor_address_read.py +113 -0
- factpulse/models/afnor_algorithm.py +41 -0
- factpulse/models/afnor_contains_operator.py +37 -0
- factpulse/models/afnor_create_directory_line_body.py +98 -0
- factpulse/models/afnor_create_directory_line_body_addressing_information.py +122 -0
- factpulse/models/afnor_create_directory_line_body_period.py +91 -0
- factpulse/models/afnor_create_routing_code_body.py +153 -0
- factpulse/models/afnor_credentials.py +2 -1
- factpulse/models/afnor_destination.py +15 -15
- factpulse/models/afnor_diffusion_status.py +38 -0
- factpulse/models/afnor_directory_line_field.py +42 -0
- factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code.py +139 -0
- factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_platform.py +92 -0
- factpulse/models/afnor_directory_line_payload_history_legal_unit_facility_routing_code_routing_code.py +134 -0
- factpulse/models/afnor_directory_line_post201_response.py +94 -0
- factpulse/models/afnor_directory_line_search_post200_response.py +104 -0
- factpulse/models/afnor_entity_type.py +38 -0
- factpulse/models/afnor_error.py +97 -0
- factpulse/models/afnor_facility_administrative_status.py +38 -0
- factpulse/models/afnor_facility_nature.py +38 -0
- factpulse/models/afnor_facility_payload_history.py +140 -0
- factpulse/models/afnor_facility_payload_history_ule_b2g_additional_data.py +98 -0
- factpulse/models/afnor_facility_payload_included.py +134 -0
- factpulse/models/afnor_facility_type.py +38 -0
- factpulse/models/afnor_flow.py +129 -0
- factpulse/models/afnor_flow_ack_status.py +39 -0
- factpulse/models/afnor_flow_direction.py +38 -0
- factpulse/models/afnor_flow_info.py +112 -0
- factpulse/models/afnor_flow_profile.py +39 -0
- factpulse/models/afnor_flow_syntax.py +41 -0
- factpulse/models/afnor_flow_type.py +49 -0
- factpulse/models/afnor_full_flow_info.py +117 -0
- factpulse/models/afnor_health_check_response.py +2 -1
- factpulse/models/afnor_legal_unit_administrative_status.py +38 -0
- factpulse/models/afnor_legal_unit_payload_history.py +107 -0
- factpulse/models/afnor_legal_unit_payload_included.py +107 -0
- factpulse/models/afnor_legal_unit_payload_included_no_siren.py +95 -0
- factpulse/models/afnor_platform_status.py +38 -0
- factpulse/models/afnor_processing_rule.py +42 -0
- factpulse/models/afnor_reason_code.py +141 -0
- factpulse/models/afnor_reason_code_enum.py +51 -0
- factpulse/models/afnor_recipient_platform_type.py +38 -0
- factpulse/models/afnor_result.py +25 -3
- factpulse/models/afnor_routing_code_administrative_status.py +38 -0
- factpulse/models/afnor_routing_code_field.py +44 -0
- factpulse/models/afnor_routing_code_payload_history_legal_unit_facility.py +158 -0
- factpulse/models/afnor_routing_code_post201_response.py +113 -0
- factpulse/models/afnor_routing_code_search.py +122 -0
- factpulse/models/afnor_routing_code_search_filters.py +128 -0
- factpulse/models/afnor_routing_code_search_filters_administrative_status.py +92 -0
- factpulse/models/afnor_routing_code_search_filters_routing_code_name.py +102 -0
- factpulse/models/afnor_routing_code_search_filters_routing_identifier.py +102 -0
- factpulse/models/afnor_routing_code_search_post200_response.py +104 -0
- factpulse/models/afnor_routing_code_search_sorting_inner.py +92 -0
- factpulse/models/afnor_search_directory_line.py +109 -0
- factpulse/models/afnor_search_directory_line_filters.py +116 -0
- factpulse/models/afnor_search_directory_line_filters_addressing_identifier.py +92 -0
- factpulse/models/afnor_search_directory_line_filters_addressing_suffix.py +92 -0
- factpulse/models/afnor_search_directory_line_sorting_inner.py +92 -0
- factpulse/models/afnor_search_flow_content.py +104 -0
- factpulse/models/afnor_search_flow_filters.py +106 -0
- factpulse/models/afnor_search_flow_params.py +95 -0
- factpulse/models/afnor_search_siren.py +109 -0
- factpulse/models/afnor_search_siren_filters.py +110 -0
- factpulse/models/afnor_search_siren_filters_administrative_status.py +92 -0
- factpulse/models/afnor_search_siren_filters_business_name.py +92 -0
- factpulse/models/afnor_search_siren_filters_entity_type.py +92 -0
- factpulse/models/afnor_search_siren_filters_siren.py +102 -0
- factpulse/models/afnor_search_siren_sorting_inner.py +92 -0
- factpulse/models/afnor_search_siret.py +122 -0
- factpulse/models/afnor_search_siret_filters.py +140 -0
- factpulse/models/afnor_search_siret_filters_address_lines.py +92 -0
- factpulse/models/afnor_search_siret_filters_administrative_status.py +92 -0
- factpulse/models/afnor_search_siret_filters_country_subdivision.py +92 -0
- factpulse/models/afnor_search_siret_filters_facility_type.py +92 -0
- factpulse/models/afnor_search_siret_filters_locality.py +92 -0
- factpulse/models/afnor_search_siret_filters_name.py +92 -0
- factpulse/models/afnor_search_siret_filters_postal_code.py +102 -0
- factpulse/models/afnor_search_siret_filters_siret.py +102 -0
- factpulse/models/afnor_search_siret_sorting_inner.py +92 -0
- factpulse/models/afnor_siren_field.py +41 -0
- factpulse/models/afnor_siren_search_post200_response.py +104 -0
- factpulse/models/afnor_siret_field.py +50 -0
- factpulse/models/afnor_siret_search_post200_response.py +104 -0
- factpulse/models/afnor_sorting_order.py +38 -0
- factpulse/models/afnor_strict_operator.py +37 -0
- factpulse/models/afnor_update_patch_directory_line_body.py +89 -0
- factpulse/models/afnor_update_patch_routing_code_body.py +120 -0
- factpulse/models/afnor_update_put_routing_code_body.py +114 -0
- factpulse/models/afnor_webhook_callback_content.py +92 -0
- factpulse/models/aggregated_payment_input.py +106 -0
- factpulse/models/aggregated_transaction_input.py +136 -0
- factpulse/models/allowance_charge.py +9 -6
- factpulse/models/allowance_charge_reason_code.py +74 -0
- factpulse/models/allowance_reason_code.py +2 -1
- factpulse/models/allowance_total_amount.py +2 -1
- factpulse/models/amount.py +3 -2
- factpulse/models/amount1.py +140 -0
- factpulse/models/amount_due.py +2 -1
- factpulse/models/api_error.py +2 -1
- factpulse/models/api_profile.py +41 -0
- factpulse/models/async_task_status.py +2 -1
- factpulse/models/base_amount.py +2 -1
- factpulse/models/bounding_box_schema.py +2 -1
- factpulse/models/buyercountry.py +137 -0
- factpulse/models/celery_status.py +2 -1
- factpulse/models/certificate_info_response.py +2 -1
- factpulse/models/charge_total_amount.py +2 -1
- factpulse/models/{facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py → chorus_pro_credentials.py} +5 -4
- factpulse/models/chorus_pro_destination.py +2 -1
- factpulse/models/chorus_pro_result.py +2 -1
- factpulse/models/contact.py +2 -1
- factpulse/models/convert_resume_request.py +2 -1
- factpulse/models/convert_success_response.py +2 -1
- factpulse/models/convert_validation_failed_response.py +7 -6
- factpulse/models/country_code.py +206 -0
- factpulse/models/create_aggregated_report_request.py +170 -0
- factpulse/models/create_e_reporting_request.py +173 -0
- factpulse/models/currency.py +137 -0
- factpulse/models/currency_code.py +89 -0
- factpulse/models/delivery_party.py +2 -1
- factpulse/models/destination.py +2 -1
- factpulse/models/directory_line_include.py +40 -0
- factpulse/models/doc_type.py +40 -0
- factpulse/models/document_type_info.py +2 -1
- factpulse/models/e_reporting_flow_type.py +40 -0
- factpulse/models/{convert_error_response.py → e_reporting_validation_error.py} +15 -23
- factpulse/models/electronic_address.py +4 -3
- factpulse/models/enriched_invoice_info.py +8 -7
- factpulse/models/error_level.py +2 -1
- factpulse/models/error_source.py +2 -1
- factpulse/models/extraction_info.py +2 -1
- factpulse/models/factur_x_invoice.py +2 -1
- factpulse/models/factur_xpdf_info.py +2 -1
- factpulse/models/facture_electronique_rest_api_schemas_ereporting_invoice_type_code.py +41 -0
- factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +2 -1
- factpulse/models/field_status.py +2 -1
- factpulse/models/file_info.py +2 -1
- factpulse/models/files_info.py +2 -1
- factpulse/models/flow_direction.py +2 -1
- factpulse/models/flow_profile.py +2 -1
- factpulse/models/flow_summary.py +5 -4
- factpulse/models/flow_syntax.py +2 -1
- factpulse/models/flow_type.py +12 -3
- factpulse/models/generate_aggregated_report_response.py +100 -0
- factpulse/models/generate_certificate_request.py +2 -1
- factpulse/models/generate_certificate_response.py +2 -1
- factpulse/models/generate_e_reporting_response.py +96 -0
- factpulse/models/get_chorus_pro_id_request.py +5 -4
- factpulse/models/get_chorus_pro_id_response.py +2 -1
- factpulse/models/get_invoice_request.py +5 -4
- factpulse/models/get_invoice_response.py +4 -3
- factpulse/models/get_structure_request.py +5 -4
- factpulse/models/get_structure_response.py +4 -3
- factpulse/models/global_allowance_amount.py +2 -1
- factpulse/models/gross_unit_price.py +2 -1
- factpulse/models/http_validation_error.py +2 -1
- factpulse/models/incoming_invoice.py +8 -29
- factpulse/models/incoming_supplier.py +2 -1
- factpulse/models/invoice_format.py +2 -1
- factpulse/models/invoice_input.py +179 -0
- factpulse/models/invoice_line.py +18 -2
- factpulse/models/invoice_line_allowance_amount.py +2 -1
- factpulse/models/invoice_note.py +4 -3
- factpulse/models/invoice_payment_input.py +110 -0
- factpulse/models/invoice_references.py +2 -1
- factpulse/models/invoice_status.py +2 -1
- factpulse/models/invoice_totals.py +2 -1
- factpulse/models/invoice_totals_prepayment.py +2 -1
- factpulse/models/invoice_type_code.py +2 -1
- factpulse/models/invoice_type_code_output.py +52 -0
- factpulse/models/invoicing_framework.py +4 -3
- factpulse/models/invoicing_framework_code.py +2 -1
- factpulse/models/line_net_amount.py +2 -1
- factpulse/models/line_sub_type.py +39 -0
- factpulse/models/line_total_amount.py +2 -1
- factpulse/models/{validation_error_loc_inner.py → location_inner.py} +8 -7
- factpulse/models/mandatory_note_schema.py +2 -1
- factpulse/models/manual_rate.py +2 -1
- factpulse/models/manual_vat_rate.py +2 -1
- factpulse/models/missing_field.py +2 -1
- factpulse/models/operation_nature.py +2 -1
- factpulse/models/output_format.py +2 -1
- factpulse/models/page_dimensions_schema.py +2 -1
- factpulse/models/payee.py +2 -1
- factpulse/models/payment_amount_by_rate.py +98 -0
- factpulse/models/payment_card.py +2 -1
- factpulse/models/payment_means.py +2 -1
- factpulse/models/pdf_validation_result_api.py +2 -1
- factpulse/models/pdp_credentials.py +2 -1
- factpulse/models/percentage.py +2 -1
- factpulse/models/postal_address.py +2 -1
- factpulse/models/price_allowance_amount.py +2 -1
- factpulse/models/price_basis_quantity.py +2 -1
- factpulse/models/processing_options.py +4 -3
- factpulse/models/processing_rule.py +42 -0
- factpulse/models/product_characteristic.py +2 -1
- factpulse/models/product_classification.py +2 -1
- factpulse/models/quantity.py +2 -1
- factpulse/models/rate.py +140 -0
- factpulse/models/rate1.py +140 -0
- factpulse/models/recipient.py +2 -1
- factpulse/models/report_period.py +91 -0
- factpulse/models/report_sender.py +98 -0
- factpulse/models/rounding_amount.py +2 -1
- factpulse/models/routing_code_include.py +38 -0
- factpulse/models/schematron_validation_error.py +128 -0
- factpulse/models/scheme_id.py +9 -1
- factpulse/models/search_flow_request.py +2 -1
- factpulse/models/search_flow_response.py +2 -1
- factpulse/models/search_services_response.py +5 -4
- factpulse/models/search_structure_request.py +5 -4
- factpulse/models/search_structure_response.py +2 -1
- factpulse/models/sellercountry.py +137 -0
- factpulse/models/signature_info.py +2 -1
- factpulse/models/signature_info_api.py +2 -1
- factpulse/models/signature_parameters.py +2 -1
- factpulse/models/simplified_invoice_data.py +30 -3
- factpulse/models/siret_include.py +37 -0
- factpulse/models/structure_info.py +2 -1
- factpulse/models/structure_parameters.py +2 -1
- factpulse/models/structure_service.py +2 -1
- factpulse/models/submission_mode.py +2 -1
- factpulse/models/submit_aggregated_report_request.py +127 -0
- factpulse/models/submit_complete_invoice_request.py +2 -1
- factpulse/models/submit_complete_invoice_response.py +2 -1
- factpulse/models/submit_e_reporting_request.py +127 -0
- factpulse/models/submit_e_reporting_response.py +117 -0
- factpulse/models/submit_flow_request.py +2 -1
- factpulse/models/submit_flow_response.py +2 -1
- factpulse/models/submit_gross_amount.py +2 -1
- factpulse/models/submit_invoice_request.py +5 -4
- factpulse/models/submit_invoice_response.py +2 -1
- factpulse/models/submit_net_amount.py +2 -1
- factpulse/models/submit_vat_amount.py +2 -1
- factpulse/models/supplementary_attachment.py +7 -6
- factpulse/models/supplier.py +2 -1
- factpulse/models/task_response.py +2 -1
- factpulse/models/tax_breakdown_input.py +104 -0
- factpulse/models/tax_due_date_type.py +42 -0
- factpulse/models/tax_representative.py +2 -1
- factpulse/models/taxable_amount.py +2 -1
- factpulse/models/taxableamount.py +140 -0
- factpulse/models/taxamount.py +140 -0
- factpulse/models/taxamount1.py +140 -0
- factpulse/models/taxamount2.py +140 -0
- factpulse/models/taxexclusiveamount.py +140 -0
- factpulse/models/taxexclusiveamount1.py +140 -0
- factpulse/models/total_gross_amount.py +2 -1
- factpulse/models/total_net_amount.py +2 -1
- factpulse/models/total_vat_amount.py +2 -1
- factpulse/models/transaction_category.py +40 -0
- factpulse/models/transmission_type_code.py +38 -0
- factpulse/models/unit_net_price.py +2 -1
- factpulse/models/unit_of_measure.py +2 -1
- factpulse/models/validate_e_reporting_request.py +92 -0
- factpulse/models/validate_e_reporting_response.py +113 -0
- factpulse/models/validation_error.py +5 -4
- factpulse/models/validation_error_detail.py +2 -1
- factpulse/models/validation_error_response.py +2 -1
- factpulse/models/validation_info.py +5 -4
- factpulse/models/validation_success_response.py +2 -1
- factpulse/models/vat_accounting_code.py +2 -1
- factpulse/models/vat_amount.py +2 -1
- factpulse/models/vat_category.py +2 -1
- factpulse/models/vat_line.py +2 -1
- factpulse/models/vat_point_date_code.py +2 -1
- factpulse/models/vat_rate.py +2 -1
- factpulse/models/verification_success_response.py +2 -1
- factpulse/models/verified_field_schema.py +2 -1
- factpulse/rest.py +2 -1
- {factpulse-3.0.7.dist-info → factpulse-3.0.23.dist-info}/METADATA +42 -40
- factpulse-3.0.23.dist-info/RECORD +306 -0
- {factpulse-3.0.7.dist-info → factpulse-3.0.23.dist-info}/licenses/LICENSE +1 -1
- factpulse_helpers/client.py +2 -1
- factpulse/models/convert_pending_input_response.py +0 -114
- factpulse/models/factur_x_profile.py +0 -39
- factpulse-3.0.7.dist-info/RECORD +0 -168
- {factpulse-3.0.7.dist-info → factpulse-3.0.23.dist-info}/WHEEL +0 -0
- {factpulse-3.0.7.dist-info → factpulse-3.0.23.dist-info}/top_level.txt +0 -0
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
"""
|
|
4
4
|
FactPulse REST API
|
|
5
5
|
|
|
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://
|
|
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://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://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://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://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://factpulse.fr/api/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://factpulse.fr/documentation-api/
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: contact@factpulse.fr
|
|
9
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
11
|
|
|
11
12
|
Do not edit the class manually.
|
|
@@ -44,7 +45,7 @@ class PDFXMLVerificationApi:
|
|
|
44
45
|
@validate_call
|
|
45
46
|
def get_verification_status_api_v1_verification_verify_async_task_id_status_get(
|
|
46
47
|
self,
|
|
47
|
-
task_id: StrictStr,
|
|
48
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
48
49
|
_request_timeout: Union[
|
|
49
50
|
None,
|
|
50
51
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -62,7 +63,7 @@ class PDFXMLVerificationApi:
|
|
|
62
63
|
|
|
63
64
|
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
64
65
|
|
|
65
|
-
:param task_id: (required)
|
|
66
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
66
67
|
:type task_id: str
|
|
67
68
|
:param _request_timeout: timeout setting for this request. If one
|
|
68
69
|
number provided, it will be total request
|
|
@@ -97,6 +98,7 @@ class PDFXMLVerificationApi:
|
|
|
97
98
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
99
|
'200': "AsyncTaskStatus",
|
|
99
100
|
'422': "HTTPValidationError",
|
|
101
|
+
'401': "APIError",
|
|
100
102
|
}
|
|
101
103
|
response_data = self.api_client.call_api(
|
|
102
104
|
*_param,
|
|
@@ -112,7 +114,7 @@ class PDFXMLVerificationApi:
|
|
|
112
114
|
@validate_call
|
|
113
115
|
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_with_http_info(
|
|
114
116
|
self,
|
|
115
|
-
task_id: StrictStr,
|
|
117
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
116
118
|
_request_timeout: Union[
|
|
117
119
|
None,
|
|
118
120
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -130,7 +132,7 @@ class PDFXMLVerificationApi:
|
|
|
130
132
|
|
|
131
133
|
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
132
134
|
|
|
133
|
-
:param task_id: (required)
|
|
135
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
134
136
|
:type task_id: str
|
|
135
137
|
:param _request_timeout: timeout setting for this request. If one
|
|
136
138
|
number provided, it will be total request
|
|
@@ -165,6 +167,7 @@ class PDFXMLVerificationApi:
|
|
|
165
167
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
168
|
'200': "AsyncTaskStatus",
|
|
167
169
|
'422': "HTTPValidationError",
|
|
170
|
+
'401': "APIError",
|
|
168
171
|
}
|
|
169
172
|
response_data = self.api_client.call_api(
|
|
170
173
|
*_param,
|
|
@@ -180,7 +183,7 @@ class PDFXMLVerificationApi:
|
|
|
180
183
|
@validate_call
|
|
181
184
|
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_without_preload_content(
|
|
182
185
|
self,
|
|
183
|
-
task_id: StrictStr,
|
|
186
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
184
187
|
_request_timeout: Union[
|
|
185
188
|
None,
|
|
186
189
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -198,7 +201,7 @@ class PDFXMLVerificationApi:
|
|
|
198
201
|
|
|
199
202
|
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
200
203
|
|
|
201
|
-
:param task_id: (required)
|
|
204
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
202
205
|
:type task_id: str
|
|
203
206
|
:param _request_timeout: timeout setting for this request. If one
|
|
204
207
|
number provided, it will be total request
|
|
@@ -233,6 +236,7 @@ class PDFXMLVerificationApi:
|
|
|
233
236
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
237
|
'200': "AsyncTaskStatus",
|
|
235
238
|
'422': "HTTPValidationError",
|
|
239
|
+
'401': "APIError",
|
|
236
240
|
}
|
|
237
241
|
response_data = self.api_client.call_api(
|
|
238
242
|
*_param,
|
|
@@ -308,7 +312,7 @@ class PDFXMLVerificationApi:
|
|
|
308
312
|
@validate_call
|
|
309
313
|
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_0(
|
|
310
314
|
self,
|
|
311
|
-
task_id: StrictStr,
|
|
315
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
312
316
|
_request_timeout: Union[
|
|
313
317
|
None,
|
|
314
318
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -326,7 +330,7 @@ class PDFXMLVerificationApi:
|
|
|
326
330
|
|
|
327
331
|
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
328
332
|
|
|
329
|
-
:param task_id: (required)
|
|
333
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
330
334
|
:type task_id: str
|
|
331
335
|
:param _request_timeout: timeout setting for this request. If one
|
|
332
336
|
number provided, it will be total request
|
|
@@ -361,6 +365,7 @@ class PDFXMLVerificationApi:
|
|
|
361
365
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
362
366
|
'200': "AsyncTaskStatus",
|
|
363
367
|
'422': "HTTPValidationError",
|
|
368
|
+
'401': "APIError",
|
|
364
369
|
}
|
|
365
370
|
response_data = self.api_client.call_api(
|
|
366
371
|
*_param,
|
|
@@ -376,7 +381,7 @@ class PDFXMLVerificationApi:
|
|
|
376
381
|
@validate_call
|
|
377
382
|
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_with_http_info(
|
|
378
383
|
self,
|
|
379
|
-
task_id: StrictStr,
|
|
384
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
380
385
|
_request_timeout: Union[
|
|
381
386
|
None,
|
|
382
387
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -394,7 +399,7 @@ class PDFXMLVerificationApi:
|
|
|
394
399
|
|
|
395
400
|
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
396
401
|
|
|
397
|
-
:param task_id: (required)
|
|
402
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
398
403
|
:type task_id: str
|
|
399
404
|
:param _request_timeout: timeout setting for this request. If one
|
|
400
405
|
number provided, it will be total request
|
|
@@ -429,6 +434,7 @@ class PDFXMLVerificationApi:
|
|
|
429
434
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
430
435
|
'200': "AsyncTaskStatus",
|
|
431
436
|
'422': "HTTPValidationError",
|
|
437
|
+
'401': "APIError",
|
|
432
438
|
}
|
|
433
439
|
response_data = self.api_client.call_api(
|
|
434
440
|
*_param,
|
|
@@ -444,7 +450,7 @@ class PDFXMLVerificationApi:
|
|
|
444
450
|
@validate_call
|
|
445
451
|
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_without_preload_content(
|
|
446
452
|
self,
|
|
447
|
-
task_id: StrictStr,
|
|
453
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
448
454
|
_request_timeout: Union[
|
|
449
455
|
None,
|
|
450
456
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -462,7 +468,7 @@ class PDFXMLVerificationApi:
|
|
|
462
468
|
|
|
463
469
|
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
464
470
|
|
|
465
|
-
:param task_id: (required)
|
|
471
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
466
472
|
:type task_id: str
|
|
467
473
|
:param _request_timeout: timeout setting for this request. If one
|
|
468
474
|
number provided, it will be total request
|
|
@@ -497,6 +503,7 @@ class PDFXMLVerificationApi:
|
|
|
497
503
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
498
504
|
'200': "AsyncTaskStatus",
|
|
499
505
|
'422': "HTTPValidationError",
|
|
506
|
+
'401': "APIError",
|
|
500
507
|
}
|
|
501
508
|
response_data = self.api_client.call_api(
|
|
502
509
|
*_param,
|
|
@@ -574,6 +581,8 @@ class PDFXMLVerificationApi:
|
|
|
574
581
|
self,
|
|
575
582
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
576
583
|
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
584
|
+
callback_url: Optional[StrictStr] = None,
|
|
585
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
577
586
|
_request_timeout: Union[
|
|
578
587
|
None,
|
|
579
588
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -589,12 +598,16 @@ class PDFXMLVerificationApi:
|
|
|
589
598
|
) -> TaskResponse:
|
|
590
599
|
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
591
600
|
|
|
592
|
-
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server
|
|
601
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
593
602
|
|
|
594
603
|
:param pdf_file: Factur-X PDF file to verify (required)
|
|
595
604
|
:type pdf_file: bytearray
|
|
596
605
|
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
597
606
|
:type force_ocr: bool
|
|
607
|
+
:param callback_url:
|
|
608
|
+
:type callback_url: str
|
|
609
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
610
|
+
:type webhook_mode: str
|
|
598
611
|
:param _request_timeout: timeout setting for this request. If one
|
|
599
612
|
number provided, it will be total request
|
|
600
613
|
timeout. It can also be a pair (tuple) of
|
|
@@ -620,6 +633,8 @@ class PDFXMLVerificationApi:
|
|
|
620
633
|
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
621
634
|
pdf_file=pdf_file,
|
|
622
635
|
force_ocr=force_ocr,
|
|
636
|
+
callback_url=callback_url,
|
|
637
|
+
webhook_mode=webhook_mode,
|
|
623
638
|
_request_auth=_request_auth,
|
|
624
639
|
_content_type=_content_type,
|
|
625
640
|
_headers=_headers,
|
|
@@ -629,6 +644,7 @@ class PDFXMLVerificationApi:
|
|
|
629
644
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
630
645
|
'202': "TaskResponse",
|
|
631
646
|
'422': "HTTPValidationError",
|
|
647
|
+
'401': "APIError",
|
|
632
648
|
}
|
|
633
649
|
response_data = self.api_client.call_api(
|
|
634
650
|
*_param,
|
|
@@ -646,6 +662,8 @@ class PDFXMLVerificationApi:
|
|
|
646
662
|
self,
|
|
647
663
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
648
664
|
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
665
|
+
callback_url: Optional[StrictStr] = None,
|
|
666
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
649
667
|
_request_timeout: Union[
|
|
650
668
|
None,
|
|
651
669
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -661,12 +679,16 @@ class PDFXMLVerificationApi:
|
|
|
661
679
|
) -> ApiResponse[TaskResponse]:
|
|
662
680
|
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
663
681
|
|
|
664
|
-
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server
|
|
682
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
665
683
|
|
|
666
684
|
:param pdf_file: Factur-X PDF file to verify (required)
|
|
667
685
|
:type pdf_file: bytearray
|
|
668
686
|
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
669
687
|
:type force_ocr: bool
|
|
688
|
+
:param callback_url:
|
|
689
|
+
:type callback_url: str
|
|
690
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
691
|
+
:type webhook_mode: str
|
|
670
692
|
:param _request_timeout: timeout setting for this request. If one
|
|
671
693
|
number provided, it will be total request
|
|
672
694
|
timeout. It can also be a pair (tuple) of
|
|
@@ -692,6 +714,8 @@ class PDFXMLVerificationApi:
|
|
|
692
714
|
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
693
715
|
pdf_file=pdf_file,
|
|
694
716
|
force_ocr=force_ocr,
|
|
717
|
+
callback_url=callback_url,
|
|
718
|
+
webhook_mode=webhook_mode,
|
|
695
719
|
_request_auth=_request_auth,
|
|
696
720
|
_content_type=_content_type,
|
|
697
721
|
_headers=_headers,
|
|
@@ -701,6 +725,7 @@ class PDFXMLVerificationApi:
|
|
|
701
725
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
702
726
|
'202': "TaskResponse",
|
|
703
727
|
'422': "HTTPValidationError",
|
|
728
|
+
'401': "APIError",
|
|
704
729
|
}
|
|
705
730
|
response_data = self.api_client.call_api(
|
|
706
731
|
*_param,
|
|
@@ -718,6 +743,8 @@ class PDFXMLVerificationApi:
|
|
|
718
743
|
self,
|
|
719
744
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
720
745
|
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
746
|
+
callback_url: Optional[StrictStr] = None,
|
|
747
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
721
748
|
_request_timeout: Union[
|
|
722
749
|
None,
|
|
723
750
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -733,12 +760,16 @@ class PDFXMLVerificationApi:
|
|
|
733
760
|
) -> RESTResponseType:
|
|
734
761
|
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
735
762
|
|
|
736
|
-
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server
|
|
763
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
737
764
|
|
|
738
765
|
:param pdf_file: Factur-X PDF file to verify (required)
|
|
739
766
|
:type pdf_file: bytearray
|
|
740
767
|
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
741
768
|
:type force_ocr: bool
|
|
769
|
+
:param callback_url:
|
|
770
|
+
:type callback_url: str
|
|
771
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
772
|
+
:type webhook_mode: str
|
|
742
773
|
:param _request_timeout: timeout setting for this request. If one
|
|
743
774
|
number provided, it will be total request
|
|
744
775
|
timeout. It can also be a pair (tuple) of
|
|
@@ -764,6 +795,8 @@ class PDFXMLVerificationApi:
|
|
|
764
795
|
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
765
796
|
pdf_file=pdf_file,
|
|
766
797
|
force_ocr=force_ocr,
|
|
798
|
+
callback_url=callback_url,
|
|
799
|
+
webhook_mode=webhook_mode,
|
|
767
800
|
_request_auth=_request_auth,
|
|
768
801
|
_content_type=_content_type,
|
|
769
802
|
_headers=_headers,
|
|
@@ -773,6 +806,7 @@ class PDFXMLVerificationApi:
|
|
|
773
806
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
774
807
|
'202': "TaskResponse",
|
|
775
808
|
'422': "HTTPValidationError",
|
|
809
|
+
'401': "APIError",
|
|
776
810
|
}
|
|
777
811
|
response_data = self.api_client.call_api(
|
|
778
812
|
*_param,
|
|
@@ -785,6 +819,8 @@ class PDFXMLVerificationApi:
|
|
|
785
819
|
self,
|
|
786
820
|
pdf_file,
|
|
787
821
|
force_ocr,
|
|
822
|
+
callback_url,
|
|
823
|
+
webhook_mode,
|
|
788
824
|
_request_auth,
|
|
789
825
|
_content_type,
|
|
790
826
|
_headers,
|
|
@@ -813,6 +849,10 @@ class PDFXMLVerificationApi:
|
|
|
813
849
|
_files['pdf_file'] = pdf_file
|
|
814
850
|
if force_ocr is not None:
|
|
815
851
|
_form_params.append(('force_ocr', force_ocr))
|
|
852
|
+
if callback_url is not None:
|
|
853
|
+
_form_params.append(('callback_url', callback_url))
|
|
854
|
+
if webhook_mode is not None:
|
|
855
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
816
856
|
# process the body parameter
|
|
817
857
|
|
|
818
858
|
|
|
@@ -866,6 +906,8 @@ class PDFXMLVerificationApi:
|
|
|
866
906
|
self,
|
|
867
907
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
868
908
|
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
909
|
+
callback_url: Optional[StrictStr] = None,
|
|
910
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
869
911
|
_request_timeout: Union[
|
|
870
912
|
None,
|
|
871
913
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -881,12 +923,16 @@ class PDFXMLVerificationApi:
|
|
|
881
923
|
) -> TaskResponse:
|
|
882
924
|
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
883
925
|
|
|
884
|
-
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server
|
|
926
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
885
927
|
|
|
886
928
|
:param pdf_file: Factur-X PDF file to verify (required)
|
|
887
929
|
:type pdf_file: bytearray
|
|
888
930
|
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
889
931
|
:type force_ocr: bool
|
|
932
|
+
:param callback_url:
|
|
933
|
+
:type callback_url: str
|
|
934
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
935
|
+
:type webhook_mode: str
|
|
890
936
|
:param _request_timeout: timeout setting for this request. If one
|
|
891
937
|
number provided, it will be total request
|
|
892
938
|
timeout. It can also be a pair (tuple) of
|
|
@@ -912,6 +958,8 @@ class PDFXMLVerificationApi:
|
|
|
912
958
|
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
913
959
|
pdf_file=pdf_file,
|
|
914
960
|
force_ocr=force_ocr,
|
|
961
|
+
callback_url=callback_url,
|
|
962
|
+
webhook_mode=webhook_mode,
|
|
915
963
|
_request_auth=_request_auth,
|
|
916
964
|
_content_type=_content_type,
|
|
917
965
|
_headers=_headers,
|
|
@@ -921,6 +969,7 @@ class PDFXMLVerificationApi:
|
|
|
921
969
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
922
970
|
'202': "TaskResponse",
|
|
923
971
|
'422': "HTTPValidationError",
|
|
972
|
+
'401': "APIError",
|
|
924
973
|
}
|
|
925
974
|
response_data = self.api_client.call_api(
|
|
926
975
|
*_param,
|
|
@@ -938,6 +987,8 @@ class PDFXMLVerificationApi:
|
|
|
938
987
|
self,
|
|
939
988
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
940
989
|
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
990
|
+
callback_url: Optional[StrictStr] = None,
|
|
991
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
941
992
|
_request_timeout: Union[
|
|
942
993
|
None,
|
|
943
994
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -953,12 +1004,16 @@ class PDFXMLVerificationApi:
|
|
|
953
1004
|
) -> ApiResponse[TaskResponse]:
|
|
954
1005
|
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
955
1006
|
|
|
956
|
-
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server
|
|
1007
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
957
1008
|
|
|
958
1009
|
:param pdf_file: Factur-X PDF file to verify (required)
|
|
959
1010
|
:type pdf_file: bytearray
|
|
960
1011
|
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
961
1012
|
:type force_ocr: bool
|
|
1013
|
+
:param callback_url:
|
|
1014
|
+
:type callback_url: str
|
|
1015
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1016
|
+
:type webhook_mode: str
|
|
962
1017
|
:param _request_timeout: timeout setting for this request. If one
|
|
963
1018
|
number provided, it will be total request
|
|
964
1019
|
timeout. It can also be a pair (tuple) of
|
|
@@ -984,6 +1039,8 @@ class PDFXMLVerificationApi:
|
|
|
984
1039
|
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
985
1040
|
pdf_file=pdf_file,
|
|
986
1041
|
force_ocr=force_ocr,
|
|
1042
|
+
callback_url=callback_url,
|
|
1043
|
+
webhook_mode=webhook_mode,
|
|
987
1044
|
_request_auth=_request_auth,
|
|
988
1045
|
_content_type=_content_type,
|
|
989
1046
|
_headers=_headers,
|
|
@@ -993,6 +1050,7 @@ class PDFXMLVerificationApi:
|
|
|
993
1050
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
994
1051
|
'202': "TaskResponse",
|
|
995
1052
|
'422': "HTTPValidationError",
|
|
1053
|
+
'401': "APIError",
|
|
996
1054
|
}
|
|
997
1055
|
response_data = self.api_client.call_api(
|
|
998
1056
|
*_param,
|
|
@@ -1010,6 +1068,8 @@ class PDFXMLVerificationApi:
|
|
|
1010
1068
|
self,
|
|
1011
1069
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1012
1070
|
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
1071
|
+
callback_url: Optional[StrictStr] = None,
|
|
1072
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
1013
1073
|
_request_timeout: Union[
|
|
1014
1074
|
None,
|
|
1015
1075
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1025,12 +1085,16 @@ class PDFXMLVerificationApi:
|
|
|
1025
1085
|
) -> RESTResponseType:
|
|
1026
1086
|
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
1027
1087
|
|
|
1028
|
-
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server
|
|
1088
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
1029
1089
|
|
|
1030
1090
|
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1031
1091
|
:type pdf_file: bytearray
|
|
1032
1092
|
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
1033
1093
|
:type force_ocr: bool
|
|
1094
|
+
:param callback_url:
|
|
1095
|
+
:type callback_url: str
|
|
1096
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1097
|
+
:type webhook_mode: str
|
|
1034
1098
|
:param _request_timeout: timeout setting for this request. If one
|
|
1035
1099
|
number provided, it will be total request
|
|
1036
1100
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1056,6 +1120,8 @@ class PDFXMLVerificationApi:
|
|
|
1056
1120
|
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
1057
1121
|
pdf_file=pdf_file,
|
|
1058
1122
|
force_ocr=force_ocr,
|
|
1123
|
+
callback_url=callback_url,
|
|
1124
|
+
webhook_mode=webhook_mode,
|
|
1059
1125
|
_request_auth=_request_auth,
|
|
1060
1126
|
_content_type=_content_type,
|
|
1061
1127
|
_headers=_headers,
|
|
@@ -1065,6 +1131,7 @@ class PDFXMLVerificationApi:
|
|
|
1065
1131
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1066
1132
|
'202': "TaskResponse",
|
|
1067
1133
|
'422': "HTTPValidationError",
|
|
1134
|
+
'401': "APIError",
|
|
1068
1135
|
}
|
|
1069
1136
|
response_data = self.api_client.call_api(
|
|
1070
1137
|
*_param,
|
|
@@ -1077,6 +1144,8 @@ class PDFXMLVerificationApi:
|
|
|
1077
1144
|
self,
|
|
1078
1145
|
pdf_file,
|
|
1079
1146
|
force_ocr,
|
|
1147
|
+
callback_url,
|
|
1148
|
+
webhook_mode,
|
|
1080
1149
|
_request_auth,
|
|
1081
1150
|
_content_type,
|
|
1082
1151
|
_headers,
|
|
@@ -1105,6 +1174,10 @@ class PDFXMLVerificationApi:
|
|
|
1105
1174
|
_files['pdf_file'] = pdf_file
|
|
1106
1175
|
if force_ocr is not None:
|
|
1107
1176
|
_form_params.append(('force_ocr', force_ocr))
|
|
1177
|
+
if callback_url is not None:
|
|
1178
|
+
_form_params.append(('callback_url', callback_url))
|
|
1179
|
+
if webhook_mode is not None:
|
|
1180
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
1108
1181
|
# process the body parameter
|
|
1109
1182
|
|
|
1110
1183
|
|
|
@@ -1211,6 +1284,7 @@ class PDFXMLVerificationApi:
|
|
|
1211
1284
|
'400': "APIError",
|
|
1212
1285
|
'413': "APIError",
|
|
1213
1286
|
'422': "HTTPValidationError",
|
|
1287
|
+
'401': "APIError",
|
|
1214
1288
|
}
|
|
1215
1289
|
response_data = self.api_client.call_api(
|
|
1216
1290
|
*_param,
|
|
@@ -1281,6 +1355,7 @@ class PDFXMLVerificationApi:
|
|
|
1281
1355
|
'400': "APIError",
|
|
1282
1356
|
'413': "APIError",
|
|
1283
1357
|
'422': "HTTPValidationError",
|
|
1358
|
+
'401': "APIError",
|
|
1284
1359
|
}
|
|
1285
1360
|
response_data = self.api_client.call_api(
|
|
1286
1361
|
*_param,
|
|
@@ -1351,6 +1426,7 @@ class PDFXMLVerificationApi:
|
|
|
1351
1426
|
'400': "APIError",
|
|
1352
1427
|
'413': "APIError",
|
|
1353
1428
|
'422': "HTTPValidationError",
|
|
1429
|
+
'401': "APIError",
|
|
1354
1430
|
}
|
|
1355
1431
|
response_data = self.api_client.call_api(
|
|
1356
1432
|
*_param,
|
|
@@ -1494,6 +1570,7 @@ class PDFXMLVerificationApi:
|
|
|
1494
1570
|
'400': "APIError",
|
|
1495
1571
|
'413': "APIError",
|
|
1496
1572
|
'422': "HTTPValidationError",
|
|
1573
|
+
'401': "APIError",
|
|
1497
1574
|
}
|
|
1498
1575
|
response_data = self.api_client.call_api(
|
|
1499
1576
|
*_param,
|
|
@@ -1564,6 +1641,7 @@ class PDFXMLVerificationApi:
|
|
|
1564
1641
|
'400': "APIError",
|
|
1565
1642
|
'413': "APIError",
|
|
1566
1643
|
'422': "HTTPValidationError",
|
|
1644
|
+
'401': "APIError",
|
|
1567
1645
|
}
|
|
1568
1646
|
response_data = self.api_client.call_api(
|
|
1569
1647
|
*_param,
|
|
@@ -1634,6 +1712,7 @@ class PDFXMLVerificationApi:
|
|
|
1634
1712
|
'400': "APIError",
|
|
1635
1713
|
'413': "APIError",
|
|
1636
1714
|
'422': "HTTPValidationError",
|
|
1715
|
+
'401': "APIError",
|
|
1637
1716
|
}
|
|
1638
1717
|
response_data = self.api_client.call_api(
|
|
1639
1718
|
*_param,
|
factpulse/api/user_api.py
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
"""
|
|
4
4
|
FactPulse REST API
|
|
5
5
|
|
|
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://
|
|
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://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://factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://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://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://factpulse.fr/api/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://factpulse.fr/documentation-api/
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: contact@factpulse.fr
|
|
9
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
11
|
|
|
11
12
|
Do not edit the class manually.
|
|
@@ -87,6 +88,7 @@ class UserApi:
|
|
|
87
88
|
|
|
88
89
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
89
90
|
'200': "object",
|
|
91
|
+
'401': None,
|
|
90
92
|
}
|
|
91
93
|
response_data = self.api_client.call_api(
|
|
92
94
|
*_param,
|
|
@@ -150,6 +152,7 @@ class UserApi:
|
|
|
150
152
|
|
|
151
153
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
152
154
|
'200': "object",
|
|
155
|
+
'401': None,
|
|
153
156
|
}
|
|
154
157
|
response_data = self.api_client.call_api(
|
|
155
158
|
*_param,
|
|
@@ -213,6 +216,7 @@ class UserApi:
|
|
|
213
216
|
|
|
214
217
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
215
218
|
'200': "object",
|
|
219
|
+
'401': None,
|
|
216
220
|
}
|
|
217
221
|
response_data = self.api_client.call_api(
|
|
218
222
|
*_param,
|