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.
|
|
@@ -49,11 +50,14 @@ class InvoiceProcessingApi:
|
|
|
49
50
|
@validate_call
|
|
50
51
|
def generate_invoice_api_v1_processing_generate_invoice_post(
|
|
51
52
|
self,
|
|
52
|
-
invoice_data: Annotated[StrictStr, Field(description="Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete
|
|
53
|
+
invoice_data: Annotated[StrictStr, Field(description="Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! ")],
|
|
53
54
|
profile: Annotated[Optional[Any], Field(description="Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.")] = None,
|
|
54
55
|
output_format: Annotated[Optional[Any], Field(description="Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).")] = None,
|
|
55
56
|
auto_enrich: Annotated[Optional[StrictBool], Field(description="🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)")] = None,
|
|
56
57
|
source_pdf: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
58
|
+
callback_url: Optional[StrictStr] = None,
|
|
59
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
60
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
57
61
|
_request_timeout: Union[
|
|
58
62
|
None,
|
|
59
63
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -69,18 +73,24 @@ class InvoiceProcessingApi:
|
|
|
69
73
|
) -> TaskResponse:
|
|
70
74
|
"""Generate a Factur-X invoice
|
|
71
75
|
|
|
72
|
-
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A
|
|
76
|
+
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A supplier SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"supplier\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `supplier.siret`: Supplier's SIRET (14 digits) - `supplier.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient's SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format='pdf') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when the task completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `generation.completed` or `generation.failed` - `data.task_id`: The Celery task ID - `data.content_b64` or `data.xml_content`: The generated content - `X-Webhook-Signature` header for HMAC verification See `/docs/WEBHOOKS.md` for full documentation. ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
73
77
|
|
|
74
|
-
:param invoice_data: Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete
|
|
78
|
+
:param invoice_data: Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! (required)
|
|
75
79
|
:type invoice_data: str
|
|
76
80
|
:param profile: Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
77
|
-
:type profile:
|
|
81
|
+
:type profile: APIProfile
|
|
78
82
|
:param output_format: Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).
|
|
79
83
|
:type output_format: OutputFormat
|
|
80
84
|
:param auto_enrich: 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
81
85
|
:type auto_enrich: bool
|
|
82
86
|
:param source_pdf:
|
|
83
87
|
:type source_pdf: bytearray
|
|
88
|
+
:param callback_url:
|
|
89
|
+
:type callback_url: str
|
|
90
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
91
|
+
:type webhook_mode: str
|
|
92
|
+
:param skip_br_fr:
|
|
93
|
+
:type skip_br_fr: bool
|
|
84
94
|
:param _request_timeout: timeout setting for this request. If one
|
|
85
95
|
number provided, it will be total request
|
|
86
96
|
timeout. It can also be a pair (tuple) of
|
|
@@ -109,6 +119,9 @@ class InvoiceProcessingApi:
|
|
|
109
119
|
output_format=output_format,
|
|
110
120
|
auto_enrich=auto_enrich,
|
|
111
121
|
source_pdf=source_pdf,
|
|
122
|
+
callback_url=callback_url,
|
|
123
|
+
webhook_mode=webhook_mode,
|
|
124
|
+
skip_br_fr=skip_br_fr,
|
|
112
125
|
_request_auth=_request_auth,
|
|
113
126
|
_content_type=_content_type,
|
|
114
127
|
_headers=_headers,
|
|
@@ -119,6 +132,7 @@ class InvoiceProcessingApi:
|
|
|
119
132
|
'202': "TaskResponse",
|
|
120
133
|
'400': None,
|
|
121
134
|
'422': None,
|
|
135
|
+
'401': "APIError",
|
|
122
136
|
}
|
|
123
137
|
response_data = self.api_client.call_api(
|
|
124
138
|
*_param,
|
|
@@ -134,11 +148,14 @@ class InvoiceProcessingApi:
|
|
|
134
148
|
@validate_call
|
|
135
149
|
def generate_invoice_api_v1_processing_generate_invoice_post_with_http_info(
|
|
136
150
|
self,
|
|
137
|
-
invoice_data: Annotated[StrictStr, Field(description="Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete
|
|
151
|
+
invoice_data: Annotated[StrictStr, Field(description="Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! ")],
|
|
138
152
|
profile: Annotated[Optional[Any], Field(description="Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.")] = None,
|
|
139
153
|
output_format: Annotated[Optional[Any], Field(description="Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).")] = None,
|
|
140
154
|
auto_enrich: Annotated[Optional[StrictBool], Field(description="🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)")] = None,
|
|
141
155
|
source_pdf: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
156
|
+
callback_url: Optional[StrictStr] = None,
|
|
157
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
158
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
142
159
|
_request_timeout: Union[
|
|
143
160
|
None,
|
|
144
161
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -154,18 +171,24 @@ class InvoiceProcessingApi:
|
|
|
154
171
|
) -> ApiResponse[TaskResponse]:
|
|
155
172
|
"""Generate a Factur-X invoice
|
|
156
173
|
|
|
157
|
-
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A
|
|
174
|
+
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A supplier SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"supplier\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `supplier.siret`: Supplier's SIRET (14 digits) - `supplier.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient's SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format='pdf') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when the task completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `generation.completed` or `generation.failed` - `data.task_id`: The Celery task ID - `data.content_b64` or `data.xml_content`: The generated content - `X-Webhook-Signature` header for HMAC verification See `/docs/WEBHOOKS.md` for full documentation. ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
158
175
|
|
|
159
|
-
:param invoice_data: Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete
|
|
176
|
+
:param invoice_data: Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! (required)
|
|
160
177
|
:type invoice_data: str
|
|
161
178
|
:param profile: Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
162
|
-
:type profile:
|
|
179
|
+
:type profile: APIProfile
|
|
163
180
|
:param output_format: Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).
|
|
164
181
|
:type output_format: OutputFormat
|
|
165
182
|
:param auto_enrich: 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
166
183
|
:type auto_enrich: bool
|
|
167
184
|
:param source_pdf:
|
|
168
185
|
:type source_pdf: bytearray
|
|
186
|
+
:param callback_url:
|
|
187
|
+
:type callback_url: str
|
|
188
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
189
|
+
:type webhook_mode: str
|
|
190
|
+
:param skip_br_fr:
|
|
191
|
+
:type skip_br_fr: bool
|
|
169
192
|
:param _request_timeout: timeout setting for this request. If one
|
|
170
193
|
number provided, it will be total request
|
|
171
194
|
timeout. It can also be a pair (tuple) of
|
|
@@ -194,6 +217,9 @@ class InvoiceProcessingApi:
|
|
|
194
217
|
output_format=output_format,
|
|
195
218
|
auto_enrich=auto_enrich,
|
|
196
219
|
source_pdf=source_pdf,
|
|
220
|
+
callback_url=callback_url,
|
|
221
|
+
webhook_mode=webhook_mode,
|
|
222
|
+
skip_br_fr=skip_br_fr,
|
|
197
223
|
_request_auth=_request_auth,
|
|
198
224
|
_content_type=_content_type,
|
|
199
225
|
_headers=_headers,
|
|
@@ -204,6 +230,7 @@ class InvoiceProcessingApi:
|
|
|
204
230
|
'202': "TaskResponse",
|
|
205
231
|
'400': None,
|
|
206
232
|
'422': None,
|
|
233
|
+
'401': "APIError",
|
|
207
234
|
}
|
|
208
235
|
response_data = self.api_client.call_api(
|
|
209
236
|
*_param,
|
|
@@ -219,11 +246,14 @@ class InvoiceProcessingApi:
|
|
|
219
246
|
@validate_call
|
|
220
247
|
def generate_invoice_api_v1_processing_generate_invoice_post_without_preload_content(
|
|
221
248
|
self,
|
|
222
|
-
invoice_data: Annotated[StrictStr, Field(description="Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete
|
|
249
|
+
invoice_data: Annotated[StrictStr, Field(description="Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! ")],
|
|
223
250
|
profile: Annotated[Optional[Any], Field(description="Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.")] = None,
|
|
224
251
|
output_format: Annotated[Optional[Any], Field(description="Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).")] = None,
|
|
225
252
|
auto_enrich: Annotated[Optional[StrictBool], Field(description="🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)")] = None,
|
|
226
253
|
source_pdf: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
254
|
+
callback_url: Optional[StrictStr] = None,
|
|
255
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
256
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
227
257
|
_request_timeout: Union[
|
|
228
258
|
None,
|
|
229
259
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -239,18 +269,24 @@ class InvoiceProcessingApi:
|
|
|
239
269
|
) -> RESTResponseType:
|
|
240
270
|
"""Generate a Factur-X invoice
|
|
241
271
|
|
|
242
|
-
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A
|
|
272
|
+
Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A supplier SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"supplier\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `supplier.siret`: Supplier's SIRET (14 digits) - `supplier.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient's SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format='pdf') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when the task completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `generation.completed` or `generation.failed` - `data.task_id`: The Celery task ID - `data.content_b64` or `data.xml_content`: The generated content - `X-Webhook-Signature` header for HMAC verification See `/docs/WEBHOOKS.md` for full documentation. ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
243
273
|
|
|
244
|
-
:param invoice_data: Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete
|
|
274
|
+
:param invoice_data: Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FacturXInvoice structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically! (required)
|
|
245
275
|
:type invoice_data: str
|
|
246
276
|
:param profile: Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
247
|
-
:type profile:
|
|
277
|
+
:type profile: APIProfile
|
|
248
278
|
:param output_format: Output format: 'xml' (XML only) or 'pdf' (Factur-X PDF with embedded XML).
|
|
249
279
|
:type output_format: OutputFormat
|
|
250
280
|
:param auto_enrich: 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
251
281
|
:type auto_enrich: bool
|
|
252
282
|
:param source_pdf:
|
|
253
283
|
:type source_pdf: bytearray
|
|
284
|
+
:param callback_url:
|
|
285
|
+
:type callback_url: str
|
|
286
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
287
|
+
:type webhook_mode: str
|
|
288
|
+
:param skip_br_fr:
|
|
289
|
+
:type skip_br_fr: bool
|
|
254
290
|
:param _request_timeout: timeout setting for this request. If one
|
|
255
291
|
number provided, it will be total request
|
|
256
292
|
timeout. It can also be a pair (tuple) of
|
|
@@ -279,6 +315,9 @@ class InvoiceProcessingApi:
|
|
|
279
315
|
output_format=output_format,
|
|
280
316
|
auto_enrich=auto_enrich,
|
|
281
317
|
source_pdf=source_pdf,
|
|
318
|
+
callback_url=callback_url,
|
|
319
|
+
webhook_mode=webhook_mode,
|
|
320
|
+
skip_br_fr=skip_br_fr,
|
|
282
321
|
_request_auth=_request_auth,
|
|
283
322
|
_content_type=_content_type,
|
|
284
323
|
_headers=_headers,
|
|
@@ -289,6 +328,7 @@ class InvoiceProcessingApi:
|
|
|
289
328
|
'202': "TaskResponse",
|
|
290
329
|
'400': None,
|
|
291
330
|
'422': None,
|
|
331
|
+
'401': "APIError",
|
|
292
332
|
}
|
|
293
333
|
response_data = self.api_client.call_api(
|
|
294
334
|
*_param,
|
|
@@ -304,6 +344,9 @@ class InvoiceProcessingApi:
|
|
|
304
344
|
output_format,
|
|
305
345
|
auto_enrich,
|
|
306
346
|
source_pdf,
|
|
347
|
+
callback_url,
|
|
348
|
+
webhook_mode,
|
|
349
|
+
skip_br_fr,
|
|
307
350
|
_request_auth,
|
|
308
351
|
_content_type,
|
|
309
352
|
_headers,
|
|
@@ -338,6 +381,12 @@ class InvoiceProcessingApi:
|
|
|
338
381
|
_form_params.append(('auto_enrich', auto_enrich))
|
|
339
382
|
if source_pdf is not None:
|
|
340
383
|
_files['source_pdf'] = source_pdf
|
|
384
|
+
if callback_url is not None:
|
|
385
|
+
_form_params.append(('callback_url', callback_url))
|
|
386
|
+
if webhook_mode is not None:
|
|
387
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
388
|
+
if skip_br_fr is not None:
|
|
389
|
+
_form_params.append(('skip_br_fr', skip_br_fr))
|
|
341
390
|
# process the body parameter
|
|
342
391
|
|
|
343
392
|
|
|
@@ -405,7 +454,7 @@ class InvoiceProcessingApi:
|
|
|
405
454
|
) -> GenerateCertificateResponse:
|
|
406
455
|
"""Generate a self-signed X.509 test certificate
|
|
407
456
|
|
|
408
|
-
Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://
|
|
457
|
+
Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
409
458
|
|
|
410
459
|
:param generate_certificate_request: (required)
|
|
411
460
|
:type generate_certificate_request: GenerateCertificateRequest
|
|
@@ -444,6 +493,7 @@ class InvoiceProcessingApi:
|
|
|
444
493
|
'400': None,
|
|
445
494
|
'500': None,
|
|
446
495
|
'422': "HTTPValidationError",
|
|
496
|
+
'401': "APIError",
|
|
447
497
|
}
|
|
448
498
|
response_data = self.api_client.call_api(
|
|
449
499
|
*_param,
|
|
@@ -475,7 +525,7 @@ class InvoiceProcessingApi:
|
|
|
475
525
|
) -> ApiResponse[GenerateCertificateResponse]:
|
|
476
526
|
"""Generate a self-signed X.509 test certificate
|
|
477
527
|
|
|
478
|
-
Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://
|
|
528
|
+
Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
479
529
|
|
|
480
530
|
:param generate_certificate_request: (required)
|
|
481
531
|
:type generate_certificate_request: GenerateCertificateRequest
|
|
@@ -514,6 +564,7 @@ class InvoiceProcessingApi:
|
|
|
514
564
|
'400': None,
|
|
515
565
|
'500': None,
|
|
516
566
|
'422': "HTTPValidationError",
|
|
567
|
+
'401': "APIError",
|
|
517
568
|
}
|
|
518
569
|
response_data = self.api_client.call_api(
|
|
519
570
|
*_param,
|
|
@@ -545,7 +596,7 @@ class InvoiceProcessingApi:
|
|
|
545
596
|
) -> RESTResponseType:
|
|
546
597
|
"""Generate a self-signed X.509 test certificate
|
|
547
598
|
|
|
548
|
-
Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://
|
|
599
|
+
Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let's Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
549
600
|
|
|
550
601
|
:param generate_certificate_request: (required)
|
|
551
602
|
:type generate_certificate_request: GenerateCertificateRequest
|
|
@@ -584,6 +635,7 @@ class InvoiceProcessingApi:
|
|
|
584
635
|
'400': None,
|
|
585
636
|
'500': None,
|
|
586
637
|
'422': "HTTPValidationError",
|
|
638
|
+
'401': "APIError",
|
|
587
639
|
}
|
|
588
640
|
response_data = self.api_client.call_api(
|
|
589
641
|
*_param,
|
|
@@ -672,7 +724,7 @@ class InvoiceProcessingApi:
|
|
|
672
724
|
@validate_call
|
|
673
725
|
def get_task_status_api_v1_processing_tasks_task_id_status_get(
|
|
674
726
|
self,
|
|
675
|
-
task_id: StrictStr,
|
|
727
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by async endpoints (UUID format)")],
|
|
676
728
|
_request_timeout: Union[
|
|
677
729
|
None,
|
|
678
730
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -690,7 +742,7 @@ class InvoiceProcessingApi:
|
|
|
690
742
|
|
|
691
743
|
Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
692
744
|
|
|
693
|
-
:param task_id: (required)
|
|
745
|
+
:param task_id: Celery task ID returned by async endpoints (UUID format) (required)
|
|
694
746
|
:type task_id: str
|
|
695
747
|
:param _request_timeout: timeout setting for this request. If one
|
|
696
748
|
number provided, it will be total request
|
|
@@ -725,6 +777,7 @@ class InvoiceProcessingApi:
|
|
|
725
777
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
726
778
|
'200': "AsyncTaskStatus",
|
|
727
779
|
'422': "HTTPValidationError",
|
|
780
|
+
'401': "APIError",
|
|
728
781
|
}
|
|
729
782
|
response_data = self.api_client.call_api(
|
|
730
783
|
*_param,
|
|
@@ -740,7 +793,7 @@ class InvoiceProcessingApi:
|
|
|
740
793
|
@validate_call
|
|
741
794
|
def get_task_status_api_v1_processing_tasks_task_id_status_get_with_http_info(
|
|
742
795
|
self,
|
|
743
|
-
task_id: StrictStr,
|
|
796
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by async endpoints (UUID format)")],
|
|
744
797
|
_request_timeout: Union[
|
|
745
798
|
None,
|
|
746
799
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -758,7 +811,7 @@ class InvoiceProcessingApi:
|
|
|
758
811
|
|
|
759
812
|
Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
760
813
|
|
|
761
|
-
:param task_id: (required)
|
|
814
|
+
:param task_id: Celery task ID returned by async endpoints (UUID format) (required)
|
|
762
815
|
:type task_id: str
|
|
763
816
|
:param _request_timeout: timeout setting for this request. If one
|
|
764
817
|
number provided, it will be total request
|
|
@@ -793,6 +846,7 @@ class InvoiceProcessingApi:
|
|
|
793
846
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
794
847
|
'200': "AsyncTaskStatus",
|
|
795
848
|
'422': "HTTPValidationError",
|
|
849
|
+
'401': "APIError",
|
|
796
850
|
}
|
|
797
851
|
response_data = self.api_client.call_api(
|
|
798
852
|
*_param,
|
|
@@ -808,7 +862,7 @@ class InvoiceProcessingApi:
|
|
|
808
862
|
@validate_call
|
|
809
863
|
def get_task_status_api_v1_processing_tasks_task_id_status_get_without_preload_content(
|
|
810
864
|
self,
|
|
811
|
-
task_id: StrictStr,
|
|
865
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by async endpoints (UUID format)")],
|
|
812
866
|
_request_timeout: Union[
|
|
813
867
|
None,
|
|
814
868
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -826,7 +880,7 @@ class InvoiceProcessingApi:
|
|
|
826
880
|
|
|
827
881
|
Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
828
882
|
|
|
829
|
-
:param task_id: (required)
|
|
883
|
+
:param task_id: Celery task ID returned by async endpoints (UUID format) (required)
|
|
830
884
|
:type task_id: str
|
|
831
885
|
:param _request_timeout: timeout setting for this request. If one
|
|
832
886
|
number provided, it will be total request
|
|
@@ -861,6 +915,7 @@ class InvoiceProcessingApi:
|
|
|
861
915
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
862
916
|
'200': "AsyncTaskStatus",
|
|
863
917
|
'422': "HTTPValidationError",
|
|
918
|
+
'401': "APIError",
|
|
864
919
|
}
|
|
865
920
|
response_data = self.api_client.call_api(
|
|
866
921
|
*_param,
|
|
@@ -1316,6 +1371,8 @@ class InvoiceProcessingApi:
|
|
|
1316
1371
|
def sign_pdf_async_api_v1_processing_sign_pdf_async_post(
|
|
1317
1372
|
self,
|
|
1318
1373
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="PDF file to sign (processed asynchronously)")],
|
|
1374
|
+
callback_url: Optional[StrictStr] = None,
|
|
1375
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
1319
1376
|
reason: Optional[StrictStr] = None,
|
|
1320
1377
|
location: Optional[StrictStr] = None,
|
|
1321
1378
|
contact: Optional[StrictStr] = None,
|
|
@@ -1341,6 +1398,10 @@ class InvoiceProcessingApi:
|
|
|
1341
1398
|
|
|
1342
1399
|
:param pdf_file: PDF file to sign (processed asynchronously) (required)
|
|
1343
1400
|
:type pdf_file: bytearray
|
|
1401
|
+
:param callback_url:
|
|
1402
|
+
:type callback_url: str
|
|
1403
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1404
|
+
:type webhook_mode: str
|
|
1344
1405
|
:param reason:
|
|
1345
1406
|
:type reason: str
|
|
1346
1407
|
:param location:
|
|
@@ -1377,6 +1438,8 @@ class InvoiceProcessingApi:
|
|
|
1377
1438
|
|
|
1378
1439
|
_param = self._sign_pdf_async_api_v1_processing_sign_pdf_async_post_serialize(
|
|
1379
1440
|
pdf_file=pdf_file,
|
|
1441
|
+
callback_url=callback_url,
|
|
1442
|
+
webhook_mode=webhook_mode,
|
|
1380
1443
|
reason=reason,
|
|
1381
1444
|
location=location,
|
|
1382
1445
|
contact=contact,
|
|
@@ -1411,6 +1474,8 @@ class InvoiceProcessingApi:
|
|
|
1411
1474
|
def sign_pdf_async_api_v1_processing_sign_pdf_async_post_with_http_info(
|
|
1412
1475
|
self,
|
|
1413
1476
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="PDF file to sign (processed asynchronously)")],
|
|
1477
|
+
callback_url: Optional[StrictStr] = None,
|
|
1478
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
1414
1479
|
reason: Optional[StrictStr] = None,
|
|
1415
1480
|
location: Optional[StrictStr] = None,
|
|
1416
1481
|
contact: Optional[StrictStr] = None,
|
|
@@ -1436,6 +1501,10 @@ class InvoiceProcessingApi:
|
|
|
1436
1501
|
|
|
1437
1502
|
:param pdf_file: PDF file to sign (processed asynchronously) (required)
|
|
1438
1503
|
:type pdf_file: bytearray
|
|
1504
|
+
:param callback_url:
|
|
1505
|
+
:type callback_url: str
|
|
1506
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1507
|
+
:type webhook_mode: str
|
|
1439
1508
|
:param reason:
|
|
1440
1509
|
:type reason: str
|
|
1441
1510
|
:param location:
|
|
@@ -1472,6 +1541,8 @@ class InvoiceProcessingApi:
|
|
|
1472
1541
|
|
|
1473
1542
|
_param = self._sign_pdf_async_api_v1_processing_sign_pdf_async_post_serialize(
|
|
1474
1543
|
pdf_file=pdf_file,
|
|
1544
|
+
callback_url=callback_url,
|
|
1545
|
+
webhook_mode=webhook_mode,
|
|
1475
1546
|
reason=reason,
|
|
1476
1547
|
location=location,
|
|
1477
1548
|
contact=contact,
|
|
@@ -1506,6 +1577,8 @@ class InvoiceProcessingApi:
|
|
|
1506
1577
|
def sign_pdf_async_api_v1_processing_sign_pdf_async_post_without_preload_content(
|
|
1507
1578
|
self,
|
|
1508
1579
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="PDF file to sign (processed asynchronously)")],
|
|
1580
|
+
callback_url: Optional[StrictStr] = None,
|
|
1581
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
1509
1582
|
reason: Optional[StrictStr] = None,
|
|
1510
1583
|
location: Optional[StrictStr] = None,
|
|
1511
1584
|
contact: Optional[StrictStr] = None,
|
|
@@ -1531,6 +1604,10 @@ class InvoiceProcessingApi:
|
|
|
1531
1604
|
|
|
1532
1605
|
:param pdf_file: PDF file to sign (processed asynchronously) (required)
|
|
1533
1606
|
:type pdf_file: bytearray
|
|
1607
|
+
:param callback_url:
|
|
1608
|
+
:type callback_url: str
|
|
1609
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1610
|
+
:type webhook_mode: str
|
|
1534
1611
|
:param reason:
|
|
1535
1612
|
:type reason: str
|
|
1536
1613
|
:param location:
|
|
@@ -1567,6 +1644,8 @@ class InvoiceProcessingApi:
|
|
|
1567
1644
|
|
|
1568
1645
|
_param = self._sign_pdf_async_api_v1_processing_sign_pdf_async_post_serialize(
|
|
1569
1646
|
pdf_file=pdf_file,
|
|
1647
|
+
callback_url=callback_url,
|
|
1648
|
+
webhook_mode=webhook_mode,
|
|
1570
1649
|
reason=reason,
|
|
1571
1650
|
location=location,
|
|
1572
1651
|
contact=contact,
|
|
@@ -1596,6 +1675,8 @@ class InvoiceProcessingApi:
|
|
|
1596
1675
|
def _sign_pdf_async_api_v1_processing_sign_pdf_async_post_serialize(
|
|
1597
1676
|
self,
|
|
1598
1677
|
pdf_file,
|
|
1678
|
+
callback_url,
|
|
1679
|
+
webhook_mode,
|
|
1599
1680
|
reason,
|
|
1600
1681
|
location,
|
|
1601
1682
|
contact,
|
|
@@ -1628,6 +1709,10 @@ class InvoiceProcessingApi:
|
|
|
1628
1709
|
# process the form parameters
|
|
1629
1710
|
if pdf_file is not None:
|
|
1630
1711
|
_files['pdf_file'] = pdf_file
|
|
1712
|
+
if callback_url is not None:
|
|
1713
|
+
_form_params.append(('callback_url', callback_url))
|
|
1714
|
+
if webhook_mode is not None:
|
|
1715
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
1631
1716
|
if reason is not None:
|
|
1632
1717
|
_form_params.append(('reason', reason))
|
|
1633
1718
|
if location is not None:
|
|
@@ -1744,6 +1829,7 @@ class InvoiceProcessingApi:
|
|
|
1744
1829
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1745
1830
|
'200': "SubmitCompleteInvoiceResponse",
|
|
1746
1831
|
'422': "HTTPValidationError",
|
|
1832
|
+
'401': "APIError",
|
|
1747
1833
|
}
|
|
1748
1834
|
response_data = self.api_client.call_api(
|
|
1749
1835
|
*_param,
|
|
@@ -1812,6 +1898,7 @@ class InvoiceProcessingApi:
|
|
|
1812
1898
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1813
1899
|
'200': "SubmitCompleteInvoiceResponse",
|
|
1814
1900
|
'422': "HTTPValidationError",
|
|
1901
|
+
'401': "APIError",
|
|
1815
1902
|
}
|
|
1816
1903
|
response_data = self.api_client.call_api(
|
|
1817
1904
|
*_param,
|
|
@@ -1880,6 +1967,7 @@ class InvoiceProcessingApi:
|
|
|
1880
1967
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1881
1968
|
'200': "SubmitCompleteInvoiceResponse",
|
|
1882
1969
|
'422': "HTTPValidationError",
|
|
1970
|
+
'401': "APIError",
|
|
1883
1971
|
}
|
|
1884
1972
|
response_data = self.api_client.call_api(
|
|
1885
1973
|
*_param,
|
|
@@ -1969,6 +2057,8 @@ class InvoiceProcessingApi:
|
|
|
1969
2057
|
def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post(
|
|
1970
2058
|
self,
|
|
1971
2059
|
submit_complete_invoice_request: SubmitCompleteInvoiceRequest,
|
|
2060
|
+
callback_url: Annotated[Optional[StrictStr], Field(description="Webhook URL for async notification when submission completes.")] = None,
|
|
2061
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
1972
2062
|
_request_timeout: Union[
|
|
1973
2063
|
None,
|
|
1974
2064
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1984,10 +2074,14 @@ class InvoiceProcessingApi:
|
|
|
1984
2074
|
) -> TaskResponse:
|
|
1985
2075
|
"""Submit a complete invoice (asynchronous with Celery)
|
|
1986
2076
|
|
|
1987
|
-
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
2077
|
+
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Webhook notification (recommended):** Instead of polling, add `?callback_url=https://your-server.com/webhook` to receive automatic notification: - `event_type`: `submission.completed`, `submission.failed`, or `submission.partial` - `data.submission_result`: Complete submission result - `X-Webhook-Signature` header for HMAC verification **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
1988
2078
|
|
|
1989
2079
|
:param submit_complete_invoice_request: (required)
|
|
1990
2080
|
:type submit_complete_invoice_request: SubmitCompleteInvoiceRequest
|
|
2081
|
+
:param callback_url: Webhook URL for async notification when submission completes.
|
|
2082
|
+
:type callback_url: str
|
|
2083
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
2084
|
+
:type webhook_mode: str
|
|
1991
2085
|
:param _request_timeout: timeout setting for this request. If one
|
|
1992
2086
|
number provided, it will be total request
|
|
1993
2087
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2012,6 +2106,8 @@ class InvoiceProcessingApi:
|
|
|
2012
2106
|
|
|
2013
2107
|
_param = self._submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_serialize(
|
|
2014
2108
|
submit_complete_invoice_request=submit_complete_invoice_request,
|
|
2109
|
+
callback_url=callback_url,
|
|
2110
|
+
webhook_mode=webhook_mode,
|
|
2015
2111
|
_request_auth=_request_auth,
|
|
2016
2112
|
_content_type=_content_type,
|
|
2017
2113
|
_headers=_headers,
|
|
@@ -2021,6 +2117,7 @@ class InvoiceProcessingApi:
|
|
|
2021
2117
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2022
2118
|
'202': "TaskResponse",
|
|
2023
2119
|
'422': "HTTPValidationError",
|
|
2120
|
+
'401': "APIError",
|
|
2024
2121
|
}
|
|
2025
2122
|
response_data = self.api_client.call_api(
|
|
2026
2123
|
*_param,
|
|
@@ -2037,6 +2134,8 @@ class InvoiceProcessingApi:
|
|
|
2037
2134
|
def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_with_http_info(
|
|
2038
2135
|
self,
|
|
2039
2136
|
submit_complete_invoice_request: SubmitCompleteInvoiceRequest,
|
|
2137
|
+
callback_url: Annotated[Optional[StrictStr], Field(description="Webhook URL for async notification when submission completes.")] = None,
|
|
2138
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
2040
2139
|
_request_timeout: Union[
|
|
2041
2140
|
None,
|
|
2042
2141
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2052,10 +2151,14 @@ class InvoiceProcessingApi:
|
|
|
2052
2151
|
) -> ApiResponse[TaskResponse]:
|
|
2053
2152
|
"""Submit a complete invoice (asynchronous with Celery)
|
|
2054
2153
|
|
|
2055
|
-
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
2154
|
+
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Webhook notification (recommended):** Instead of polling, add `?callback_url=https://your-server.com/webhook` to receive automatic notification: - `event_type`: `submission.completed`, `submission.failed`, or `submission.partial` - `data.submission_result`: Complete submission result - `X-Webhook-Signature` header for HMAC verification **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
2056
2155
|
|
|
2057
2156
|
:param submit_complete_invoice_request: (required)
|
|
2058
2157
|
:type submit_complete_invoice_request: SubmitCompleteInvoiceRequest
|
|
2158
|
+
:param callback_url: Webhook URL for async notification when submission completes.
|
|
2159
|
+
:type callback_url: str
|
|
2160
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
2161
|
+
:type webhook_mode: str
|
|
2059
2162
|
:param _request_timeout: timeout setting for this request. If one
|
|
2060
2163
|
number provided, it will be total request
|
|
2061
2164
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2080,6 +2183,8 @@ class InvoiceProcessingApi:
|
|
|
2080
2183
|
|
|
2081
2184
|
_param = self._submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_serialize(
|
|
2082
2185
|
submit_complete_invoice_request=submit_complete_invoice_request,
|
|
2186
|
+
callback_url=callback_url,
|
|
2187
|
+
webhook_mode=webhook_mode,
|
|
2083
2188
|
_request_auth=_request_auth,
|
|
2084
2189
|
_content_type=_content_type,
|
|
2085
2190
|
_headers=_headers,
|
|
@@ -2089,6 +2194,7 @@ class InvoiceProcessingApi:
|
|
|
2089
2194
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2090
2195
|
'202': "TaskResponse",
|
|
2091
2196
|
'422': "HTTPValidationError",
|
|
2197
|
+
'401': "APIError",
|
|
2092
2198
|
}
|
|
2093
2199
|
response_data = self.api_client.call_api(
|
|
2094
2200
|
*_param,
|
|
@@ -2105,6 +2211,8 @@ class InvoiceProcessingApi:
|
|
|
2105
2211
|
def submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_without_preload_content(
|
|
2106
2212
|
self,
|
|
2107
2213
|
submit_complete_invoice_request: SubmitCompleteInvoiceRequest,
|
|
2214
|
+
callback_url: Annotated[Optional[StrictStr], Field(description="Webhook URL for async notification when submission completes.")] = None,
|
|
2215
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
2108
2216
|
_request_timeout: Union[
|
|
2109
2217
|
None,
|
|
2110
2218
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2120,10 +2228,14 @@ class InvoiceProcessingApi:
|
|
|
2120
2228
|
) -> RESTResponseType:
|
|
2121
2229
|
"""Submit a complete invoice (asynchronous with Celery)
|
|
2122
2230
|
|
|
2123
|
-
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
2231
|
+
Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Webhook notification (recommended):** Instead of polling, add `?callback_url=https://your-server.com/webhook` to receive automatic notification: - `event_type`: `submission.completed`, `submission.failed`, or `submission.partial` - `data.submission_result`: Complete submission result - `X-Webhook-Signature` header for HMAC verification **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
2124
2232
|
|
|
2125
2233
|
:param submit_complete_invoice_request: (required)
|
|
2126
2234
|
:type submit_complete_invoice_request: SubmitCompleteInvoiceRequest
|
|
2235
|
+
:param callback_url: Webhook URL for async notification when submission completes.
|
|
2236
|
+
:type callback_url: str
|
|
2237
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
2238
|
+
:type webhook_mode: str
|
|
2127
2239
|
:param _request_timeout: timeout setting for this request. If one
|
|
2128
2240
|
number provided, it will be total request
|
|
2129
2241
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2148,6 +2260,8 @@ class InvoiceProcessingApi:
|
|
|
2148
2260
|
|
|
2149
2261
|
_param = self._submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_serialize(
|
|
2150
2262
|
submit_complete_invoice_request=submit_complete_invoice_request,
|
|
2263
|
+
callback_url=callback_url,
|
|
2264
|
+
webhook_mode=webhook_mode,
|
|
2151
2265
|
_request_auth=_request_auth,
|
|
2152
2266
|
_content_type=_content_type,
|
|
2153
2267
|
_headers=_headers,
|
|
@@ -2157,6 +2271,7 @@ class InvoiceProcessingApi:
|
|
|
2157
2271
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
2158
2272
|
'202': "TaskResponse",
|
|
2159
2273
|
'422': "HTTPValidationError",
|
|
2274
|
+
'401': "APIError",
|
|
2160
2275
|
}
|
|
2161
2276
|
response_data = self.api_client.call_api(
|
|
2162
2277
|
*_param,
|
|
@@ -2168,6 +2283,8 @@ class InvoiceProcessingApi:
|
|
|
2168
2283
|
def _submit_complete_invoice_async_api_v1_processing_invoices_submit_complete_async_post_serialize(
|
|
2169
2284
|
self,
|
|
2170
2285
|
submit_complete_invoice_request,
|
|
2286
|
+
callback_url,
|
|
2287
|
+
webhook_mode,
|
|
2171
2288
|
_request_auth,
|
|
2172
2289
|
_content_type,
|
|
2173
2290
|
_headers,
|
|
@@ -2190,6 +2307,14 @@ class InvoiceProcessingApi:
|
|
|
2190
2307
|
|
|
2191
2308
|
# process the path parameters
|
|
2192
2309
|
# process the query parameters
|
|
2310
|
+
if callback_url is not None:
|
|
2311
|
+
|
|
2312
|
+
_query_params.append(('callback_url', callback_url))
|
|
2313
|
+
|
|
2314
|
+
if webhook_mode is not None:
|
|
2315
|
+
|
|
2316
|
+
_query_params.append(('webhook_mode', webhook_mode))
|
|
2317
|
+
|
|
2193
2318
|
# process the header parameters
|
|
2194
2319
|
# process the form parameters
|
|
2195
2320
|
# process the body parameter
|
|
@@ -2248,6 +2373,7 @@ class InvoiceProcessingApi:
|
|
|
2248
2373
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to validate (.pdf format).")],
|
|
2249
2374
|
profile: Optional[Any] = None,
|
|
2250
2375
|
use_verapdf: Annotated[Optional[StrictBool], Field(description="Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.")] = None,
|
|
2376
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
2251
2377
|
_request_timeout: Union[
|
|
2252
2378
|
None,
|
|
2253
2379
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2268,9 +2394,11 @@ class InvoiceProcessingApi:
|
|
|
2268
2394
|
:param pdf_file: Factur-X PDF file to validate (.pdf format). (required)
|
|
2269
2395
|
:type pdf_file: bytearray
|
|
2270
2396
|
:param profile:
|
|
2271
|
-
:type profile:
|
|
2397
|
+
:type profile: APIProfile
|
|
2272
2398
|
:param use_verapdf: Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
2273
2399
|
:type use_verapdf: bool
|
|
2400
|
+
:param skip_br_fr:
|
|
2401
|
+
:type skip_br_fr: bool
|
|
2274
2402
|
:param _request_timeout: timeout setting for this request. If one
|
|
2275
2403
|
number provided, it will be total request
|
|
2276
2404
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2297,6 +2425,7 @@ class InvoiceProcessingApi:
|
|
|
2297
2425
|
pdf_file=pdf_file,
|
|
2298
2426
|
profile=profile,
|
|
2299
2427
|
use_verapdf=use_verapdf,
|
|
2428
|
+
skip_br_fr=skip_br_fr,
|
|
2300
2429
|
_request_auth=_request_auth,
|
|
2301
2430
|
_content_type=_content_type,
|
|
2302
2431
|
_headers=_headers,
|
|
@@ -2307,6 +2436,7 @@ class InvoiceProcessingApi:
|
|
|
2307
2436
|
'200': "PDFValidationResultAPI",
|
|
2308
2437
|
'400': None,
|
|
2309
2438
|
'422': "HTTPValidationError",
|
|
2439
|
+
'401': "APIError",
|
|
2310
2440
|
}
|
|
2311
2441
|
response_data = self.api_client.call_api(
|
|
2312
2442
|
*_param,
|
|
@@ -2325,6 +2455,7 @@ class InvoiceProcessingApi:
|
|
|
2325
2455
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to validate (.pdf format).")],
|
|
2326
2456
|
profile: Optional[Any] = None,
|
|
2327
2457
|
use_verapdf: Annotated[Optional[StrictBool], Field(description="Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.")] = None,
|
|
2458
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
2328
2459
|
_request_timeout: Union[
|
|
2329
2460
|
None,
|
|
2330
2461
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2345,9 +2476,11 @@ class InvoiceProcessingApi:
|
|
|
2345
2476
|
:param pdf_file: Factur-X PDF file to validate (.pdf format). (required)
|
|
2346
2477
|
:type pdf_file: bytearray
|
|
2347
2478
|
:param profile:
|
|
2348
|
-
:type profile:
|
|
2479
|
+
:type profile: APIProfile
|
|
2349
2480
|
:param use_verapdf: Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
2350
2481
|
:type use_verapdf: bool
|
|
2482
|
+
:param skip_br_fr:
|
|
2483
|
+
:type skip_br_fr: bool
|
|
2351
2484
|
:param _request_timeout: timeout setting for this request. If one
|
|
2352
2485
|
number provided, it will be total request
|
|
2353
2486
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2374,6 +2507,7 @@ class InvoiceProcessingApi:
|
|
|
2374
2507
|
pdf_file=pdf_file,
|
|
2375
2508
|
profile=profile,
|
|
2376
2509
|
use_verapdf=use_verapdf,
|
|
2510
|
+
skip_br_fr=skip_br_fr,
|
|
2377
2511
|
_request_auth=_request_auth,
|
|
2378
2512
|
_content_type=_content_type,
|
|
2379
2513
|
_headers=_headers,
|
|
@@ -2384,6 +2518,7 @@ class InvoiceProcessingApi:
|
|
|
2384
2518
|
'200': "PDFValidationResultAPI",
|
|
2385
2519
|
'400': None,
|
|
2386
2520
|
'422': "HTTPValidationError",
|
|
2521
|
+
'401': "APIError",
|
|
2387
2522
|
}
|
|
2388
2523
|
response_data = self.api_client.call_api(
|
|
2389
2524
|
*_param,
|
|
@@ -2402,6 +2537,7 @@ class InvoiceProcessingApi:
|
|
|
2402
2537
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to validate (.pdf format).")],
|
|
2403
2538
|
profile: Optional[Any] = None,
|
|
2404
2539
|
use_verapdf: Annotated[Optional[StrictBool], Field(description="Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.")] = None,
|
|
2540
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
2405
2541
|
_request_timeout: Union[
|
|
2406
2542
|
None,
|
|
2407
2543
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2422,9 +2558,11 @@ class InvoiceProcessingApi:
|
|
|
2422
2558
|
:param pdf_file: Factur-X PDF file to validate (.pdf format). (required)
|
|
2423
2559
|
:type pdf_file: bytearray
|
|
2424
2560
|
:param profile:
|
|
2425
|
-
:type profile:
|
|
2561
|
+
:type profile: APIProfile
|
|
2426
2562
|
:param use_verapdf: Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
2427
2563
|
:type use_verapdf: bool
|
|
2564
|
+
:param skip_br_fr:
|
|
2565
|
+
:type skip_br_fr: bool
|
|
2428
2566
|
:param _request_timeout: timeout setting for this request. If one
|
|
2429
2567
|
number provided, it will be total request
|
|
2430
2568
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2451,6 +2589,7 @@ class InvoiceProcessingApi:
|
|
|
2451
2589
|
pdf_file=pdf_file,
|
|
2452
2590
|
profile=profile,
|
|
2453
2591
|
use_verapdf=use_verapdf,
|
|
2592
|
+
skip_br_fr=skip_br_fr,
|
|
2454
2593
|
_request_auth=_request_auth,
|
|
2455
2594
|
_content_type=_content_type,
|
|
2456
2595
|
_headers=_headers,
|
|
@@ -2461,6 +2600,7 @@ class InvoiceProcessingApi:
|
|
|
2461
2600
|
'200': "PDFValidationResultAPI",
|
|
2462
2601
|
'400': None,
|
|
2463
2602
|
'422': "HTTPValidationError",
|
|
2603
|
+
'401': "APIError",
|
|
2464
2604
|
}
|
|
2465
2605
|
response_data = self.api_client.call_api(
|
|
2466
2606
|
*_param,
|
|
@@ -2474,6 +2614,7 @@ class InvoiceProcessingApi:
|
|
|
2474
2614
|
pdf_file,
|
|
2475
2615
|
profile,
|
|
2476
2616
|
use_verapdf,
|
|
2617
|
+
skip_br_fr,
|
|
2477
2618
|
_request_auth,
|
|
2478
2619
|
_content_type,
|
|
2479
2620
|
_headers,
|
|
@@ -2504,6 +2645,8 @@ class InvoiceProcessingApi:
|
|
|
2504
2645
|
_form_params.append(('profile', profile))
|
|
2505
2646
|
if use_verapdf is not None:
|
|
2506
2647
|
_form_params.append(('use_verapdf', use_verapdf))
|
|
2648
|
+
if skip_br_fr is not None:
|
|
2649
|
+
_form_params.append(('skip_br_fr', skip_br_fr))
|
|
2507
2650
|
# process the body parameter
|
|
2508
2651
|
|
|
2509
2652
|
|
|
@@ -2558,6 +2701,8 @@ class InvoiceProcessingApi:
|
|
|
2558
2701
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to validate (.pdf format).")],
|
|
2559
2702
|
profile: Optional[Any] = None,
|
|
2560
2703
|
use_verapdf: Annotated[Optional[StrictBool], Field(description="Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.")] = None,
|
|
2704
|
+
callback_url: Optional[StrictStr] = None,
|
|
2705
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
2561
2706
|
_request_timeout: Union[
|
|
2562
2707
|
None,
|
|
2563
2708
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2573,14 +2718,18 @@ class InvoiceProcessingApi:
|
|
|
2573
2718
|
) -> TaskResponse:
|
|
2574
2719
|
"""Validate a Factur-X PDF (asynchronous with polling)
|
|
2575
2720
|
|
|
2576
|
-
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
2721
|
+
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when validation completes: ``` callback_url=https://your-server.com/webhook webhook_mode=download_url # Optional: get download URL instead of base64 ``` The webhook will POST a JSON payload with: - `event_type`: `validation.completed` or `validation.failed` - `data.is_compliant`: Whether the PDF is Factur-X compliant - `data.detected_profile`: The detected Factur-X profile - `X-Webhook-Signature` header for HMAC verification ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
2577
2722
|
|
|
2578
2723
|
:param pdf_file: Factur-X PDF file to validate (.pdf format). (required)
|
|
2579
2724
|
:type pdf_file: bytearray
|
|
2580
2725
|
:param profile:
|
|
2581
|
-
:type profile:
|
|
2726
|
+
:type profile: APIProfile
|
|
2582
2727
|
:param use_verapdf: Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
2583
2728
|
:type use_verapdf: bool
|
|
2729
|
+
:param callback_url:
|
|
2730
|
+
:type callback_url: str
|
|
2731
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
2732
|
+
:type webhook_mode: str
|
|
2584
2733
|
:param _request_timeout: timeout setting for this request. If one
|
|
2585
2734
|
number provided, it will be total request
|
|
2586
2735
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2607,6 +2756,8 @@ class InvoiceProcessingApi:
|
|
|
2607
2756
|
pdf_file=pdf_file,
|
|
2608
2757
|
profile=profile,
|
|
2609
2758
|
use_verapdf=use_verapdf,
|
|
2759
|
+
callback_url=callback_url,
|
|
2760
|
+
webhook_mode=webhook_mode,
|
|
2610
2761
|
_request_auth=_request_auth,
|
|
2611
2762
|
_content_type=_content_type,
|
|
2612
2763
|
_headers=_headers,
|
|
@@ -2617,6 +2768,7 @@ class InvoiceProcessingApi:
|
|
|
2617
2768
|
'202': "TaskResponse",
|
|
2618
2769
|
'400': None,
|
|
2619
2770
|
'422': "HTTPValidationError",
|
|
2771
|
+
'401': "APIError",
|
|
2620
2772
|
}
|
|
2621
2773
|
response_data = self.api_client.call_api(
|
|
2622
2774
|
*_param,
|
|
@@ -2635,6 +2787,8 @@ class InvoiceProcessingApi:
|
|
|
2635
2787
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to validate (.pdf format).")],
|
|
2636
2788
|
profile: Optional[Any] = None,
|
|
2637
2789
|
use_verapdf: Annotated[Optional[StrictBool], Field(description="Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.")] = None,
|
|
2790
|
+
callback_url: Optional[StrictStr] = None,
|
|
2791
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
2638
2792
|
_request_timeout: Union[
|
|
2639
2793
|
None,
|
|
2640
2794
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2650,14 +2804,18 @@ class InvoiceProcessingApi:
|
|
|
2650
2804
|
) -> ApiResponse[TaskResponse]:
|
|
2651
2805
|
"""Validate a Factur-X PDF (asynchronous with polling)
|
|
2652
2806
|
|
|
2653
|
-
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
2807
|
+
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when validation completes: ``` callback_url=https://your-server.com/webhook webhook_mode=download_url # Optional: get download URL instead of base64 ``` The webhook will POST a JSON payload with: - `event_type`: `validation.completed` or `validation.failed` - `data.is_compliant`: Whether the PDF is Factur-X compliant - `data.detected_profile`: The detected Factur-X profile - `X-Webhook-Signature` header for HMAC verification ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
2654
2808
|
|
|
2655
2809
|
:param pdf_file: Factur-X PDF file to validate (.pdf format). (required)
|
|
2656
2810
|
:type pdf_file: bytearray
|
|
2657
2811
|
:param profile:
|
|
2658
|
-
:type profile:
|
|
2812
|
+
:type profile: APIProfile
|
|
2659
2813
|
:param use_verapdf: Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
2660
2814
|
:type use_verapdf: bool
|
|
2815
|
+
:param callback_url:
|
|
2816
|
+
:type callback_url: str
|
|
2817
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
2818
|
+
:type webhook_mode: str
|
|
2661
2819
|
:param _request_timeout: timeout setting for this request. If one
|
|
2662
2820
|
number provided, it will be total request
|
|
2663
2821
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2684,6 +2842,8 @@ class InvoiceProcessingApi:
|
|
|
2684
2842
|
pdf_file=pdf_file,
|
|
2685
2843
|
profile=profile,
|
|
2686
2844
|
use_verapdf=use_verapdf,
|
|
2845
|
+
callback_url=callback_url,
|
|
2846
|
+
webhook_mode=webhook_mode,
|
|
2687
2847
|
_request_auth=_request_auth,
|
|
2688
2848
|
_content_type=_content_type,
|
|
2689
2849
|
_headers=_headers,
|
|
@@ -2694,6 +2854,7 @@ class InvoiceProcessingApi:
|
|
|
2694
2854
|
'202': "TaskResponse",
|
|
2695
2855
|
'400': None,
|
|
2696
2856
|
'422': "HTTPValidationError",
|
|
2857
|
+
'401': "APIError",
|
|
2697
2858
|
}
|
|
2698
2859
|
response_data = self.api_client.call_api(
|
|
2699
2860
|
*_param,
|
|
@@ -2712,6 +2873,8 @@ class InvoiceProcessingApi:
|
|
|
2712
2873
|
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to validate (.pdf format).")],
|
|
2713
2874
|
profile: Optional[Any] = None,
|
|
2714
2875
|
use_verapdf: Annotated[Optional[StrictBool], Field(description="Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.")] = None,
|
|
2876
|
+
callback_url: Optional[StrictStr] = None,
|
|
2877
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
2715
2878
|
_request_timeout: Union[
|
|
2716
2879
|
None,
|
|
2717
2880
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -2727,14 +2890,18 @@ class InvoiceProcessingApi:
|
|
|
2727
2890
|
) -> RESTResponseType:
|
|
2728
2891
|
"""Validate a Factur-X PDF (asynchronous with polling)
|
|
2729
2892
|
|
|
2730
|
-
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
2893
|
+
Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn't wait during validation ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when validation completes: ``` callback_url=https://your-server.com/webhook webhook_mode=download_url # Optional: get download URL instead of base64 ``` The webhook will POST a JSON payload with: - `event_type`: `validation.completed` or `validation.failed` - `data.is_compliant`: Whether the PDF is Factur-X compliant - `data.detected_profile`: The detected Factur-X profile - `X-Webhook-Signature` header for HMAC verification ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile's Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result['is_compliant']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status['result']['errorMessage']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
2731
2894
|
|
|
2732
2895
|
:param pdf_file: Factur-X PDF file to validate (.pdf format). (required)
|
|
2733
2896
|
:type pdf_file: bytearray
|
|
2734
2897
|
:param profile:
|
|
2735
|
-
:type profile:
|
|
2898
|
+
:type profile: APIProfile
|
|
2736
2899
|
:param use_verapdf: Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
2737
2900
|
:type use_verapdf: bool
|
|
2901
|
+
:param callback_url:
|
|
2902
|
+
:type callback_url: str
|
|
2903
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
2904
|
+
:type webhook_mode: str
|
|
2738
2905
|
:param _request_timeout: timeout setting for this request. If one
|
|
2739
2906
|
number provided, it will be total request
|
|
2740
2907
|
timeout. It can also be a pair (tuple) of
|
|
@@ -2761,6 +2928,8 @@ class InvoiceProcessingApi:
|
|
|
2761
2928
|
pdf_file=pdf_file,
|
|
2762
2929
|
profile=profile,
|
|
2763
2930
|
use_verapdf=use_verapdf,
|
|
2931
|
+
callback_url=callback_url,
|
|
2932
|
+
webhook_mode=webhook_mode,
|
|
2764
2933
|
_request_auth=_request_auth,
|
|
2765
2934
|
_content_type=_content_type,
|
|
2766
2935
|
_headers=_headers,
|
|
@@ -2771,6 +2940,7 @@ class InvoiceProcessingApi:
|
|
|
2771
2940
|
'202': "TaskResponse",
|
|
2772
2941
|
'400': None,
|
|
2773
2942
|
'422': "HTTPValidationError",
|
|
2943
|
+
'401': "APIError",
|
|
2774
2944
|
}
|
|
2775
2945
|
response_data = self.api_client.call_api(
|
|
2776
2946
|
*_param,
|
|
@@ -2784,6 +2954,8 @@ class InvoiceProcessingApi:
|
|
|
2784
2954
|
pdf_file,
|
|
2785
2955
|
profile,
|
|
2786
2956
|
use_verapdf,
|
|
2957
|
+
callback_url,
|
|
2958
|
+
webhook_mode,
|
|
2787
2959
|
_request_auth,
|
|
2788
2960
|
_content_type,
|
|
2789
2961
|
_headers,
|
|
@@ -2814,6 +2986,10 @@ class InvoiceProcessingApi:
|
|
|
2814
2986
|
_form_params.append(('profile', profile))
|
|
2815
2987
|
if use_verapdf is not None:
|
|
2816
2988
|
_form_params.append(('use_verapdf', use_verapdf))
|
|
2989
|
+
if callback_url is not None:
|
|
2990
|
+
_form_params.append(('callback_url', callback_url))
|
|
2991
|
+
if webhook_mode is not None:
|
|
2992
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
2817
2993
|
# process the body parameter
|
|
2818
2994
|
|
|
2819
2995
|
|
|
@@ -2919,6 +3095,7 @@ class InvoiceProcessingApi:
|
|
|
2919
3095
|
'200': "object",
|
|
2920
3096
|
'400': None,
|
|
2921
3097
|
'422': "HTTPValidationError",
|
|
3098
|
+
'401': "APIError",
|
|
2922
3099
|
}
|
|
2923
3100
|
response_data = self.api_client.call_api(
|
|
2924
3101
|
*_param,
|
|
@@ -2988,6 +3165,7 @@ class InvoiceProcessingApi:
|
|
|
2988
3165
|
'200': "object",
|
|
2989
3166
|
'400': None,
|
|
2990
3167
|
'422': "HTTPValidationError",
|
|
3168
|
+
'401': "APIError",
|
|
2991
3169
|
}
|
|
2992
3170
|
response_data = self.api_client.call_api(
|
|
2993
3171
|
*_param,
|
|
@@ -3057,6 +3235,7 @@ class InvoiceProcessingApi:
|
|
|
3057
3235
|
'200': "object",
|
|
3058
3236
|
'400': None,
|
|
3059
3237
|
'422': "HTTPValidationError",
|
|
3238
|
+
'401': "APIError",
|
|
3060
3239
|
}
|
|
3061
3240
|
response_data = self.api_client.call_api(
|
|
3062
3241
|
*_param,
|
|
@@ -3147,6 +3326,7 @@ class InvoiceProcessingApi:
|
|
|
3147
3326
|
self,
|
|
3148
3327
|
xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X XML file to validate (.xml format).")],
|
|
3149
3328
|
profile: Annotated[Optional[Any], Field(description="Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).")] = None,
|
|
3329
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
3150
3330
|
_request_timeout: Union[
|
|
3151
3331
|
None,
|
|
3152
3332
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3167,7 +3347,9 @@ class InvoiceProcessingApi:
|
|
|
3167
3347
|
:param xml_file: Factur-X XML file to validate (.xml format). (required)
|
|
3168
3348
|
:type xml_file: bytearray
|
|
3169
3349
|
:param profile: Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
3170
|
-
:type profile:
|
|
3350
|
+
:type profile: APIProfile
|
|
3351
|
+
:param skip_br_fr:
|
|
3352
|
+
:type skip_br_fr: bool
|
|
3171
3353
|
:param _request_timeout: timeout setting for this request. If one
|
|
3172
3354
|
number provided, it will be total request
|
|
3173
3355
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3193,6 +3375,7 @@ class InvoiceProcessingApi:
|
|
|
3193
3375
|
_param = self._validate_xml_api_v1_processing_validate_xml_post_serialize(
|
|
3194
3376
|
xml_file=xml_file,
|
|
3195
3377
|
profile=profile,
|
|
3378
|
+
skip_br_fr=skip_br_fr,
|
|
3196
3379
|
_request_auth=_request_auth,
|
|
3197
3380
|
_content_type=_content_type,
|
|
3198
3381
|
_headers=_headers,
|
|
@@ -3203,6 +3386,7 @@ class InvoiceProcessingApi:
|
|
|
3203
3386
|
'200': "ValidationSuccessResponse",
|
|
3204
3387
|
'400': "ValidationErrorResponse",
|
|
3205
3388
|
'422': "HTTPValidationError",
|
|
3389
|
+
'401': "APIError",
|
|
3206
3390
|
}
|
|
3207
3391
|
response_data = self.api_client.call_api(
|
|
3208
3392
|
*_param,
|
|
@@ -3220,6 +3404,7 @@ class InvoiceProcessingApi:
|
|
|
3220
3404
|
self,
|
|
3221
3405
|
xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X XML file to validate (.xml format).")],
|
|
3222
3406
|
profile: Annotated[Optional[Any], Field(description="Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).")] = None,
|
|
3407
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
3223
3408
|
_request_timeout: Union[
|
|
3224
3409
|
None,
|
|
3225
3410
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3240,7 +3425,9 @@ class InvoiceProcessingApi:
|
|
|
3240
3425
|
:param xml_file: Factur-X XML file to validate (.xml format). (required)
|
|
3241
3426
|
:type xml_file: bytearray
|
|
3242
3427
|
:param profile: Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
3243
|
-
:type profile:
|
|
3428
|
+
:type profile: APIProfile
|
|
3429
|
+
:param skip_br_fr:
|
|
3430
|
+
:type skip_br_fr: bool
|
|
3244
3431
|
:param _request_timeout: timeout setting for this request. If one
|
|
3245
3432
|
number provided, it will be total request
|
|
3246
3433
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3266,6 +3453,7 @@ class InvoiceProcessingApi:
|
|
|
3266
3453
|
_param = self._validate_xml_api_v1_processing_validate_xml_post_serialize(
|
|
3267
3454
|
xml_file=xml_file,
|
|
3268
3455
|
profile=profile,
|
|
3456
|
+
skip_br_fr=skip_br_fr,
|
|
3269
3457
|
_request_auth=_request_auth,
|
|
3270
3458
|
_content_type=_content_type,
|
|
3271
3459
|
_headers=_headers,
|
|
@@ -3276,6 +3464,7 @@ class InvoiceProcessingApi:
|
|
|
3276
3464
|
'200': "ValidationSuccessResponse",
|
|
3277
3465
|
'400': "ValidationErrorResponse",
|
|
3278
3466
|
'422': "HTTPValidationError",
|
|
3467
|
+
'401': "APIError",
|
|
3279
3468
|
}
|
|
3280
3469
|
response_data = self.api_client.call_api(
|
|
3281
3470
|
*_param,
|
|
@@ -3293,6 +3482,7 @@ class InvoiceProcessingApi:
|
|
|
3293
3482
|
self,
|
|
3294
3483
|
xml_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X XML file to validate (.xml format).")],
|
|
3295
3484
|
profile: Annotated[Optional[Any], Field(description="Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).")] = None,
|
|
3485
|
+
skip_br_fr: Optional[StrictBool] = None,
|
|
3296
3486
|
_request_timeout: Union[
|
|
3297
3487
|
None,
|
|
3298
3488
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3313,7 +3503,9 @@ class InvoiceProcessingApi:
|
|
|
3313
3503
|
:param xml_file: Factur-X XML file to validate (.xml format). (required)
|
|
3314
3504
|
:type xml_file: bytearray
|
|
3315
3505
|
:param profile: Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
3316
|
-
:type profile:
|
|
3506
|
+
:type profile: APIProfile
|
|
3507
|
+
:param skip_br_fr:
|
|
3508
|
+
:type skip_br_fr: bool
|
|
3317
3509
|
:param _request_timeout: timeout setting for this request. If one
|
|
3318
3510
|
number provided, it will be total request
|
|
3319
3511
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3339,6 +3531,7 @@ class InvoiceProcessingApi:
|
|
|
3339
3531
|
_param = self._validate_xml_api_v1_processing_validate_xml_post_serialize(
|
|
3340
3532
|
xml_file=xml_file,
|
|
3341
3533
|
profile=profile,
|
|
3534
|
+
skip_br_fr=skip_br_fr,
|
|
3342
3535
|
_request_auth=_request_auth,
|
|
3343
3536
|
_content_type=_content_type,
|
|
3344
3537
|
_headers=_headers,
|
|
@@ -3349,6 +3542,7 @@ class InvoiceProcessingApi:
|
|
|
3349
3542
|
'200': "ValidationSuccessResponse",
|
|
3350
3543
|
'400': "ValidationErrorResponse",
|
|
3351
3544
|
'422': "HTTPValidationError",
|
|
3545
|
+
'401': "APIError",
|
|
3352
3546
|
}
|
|
3353
3547
|
response_data = self.api_client.call_api(
|
|
3354
3548
|
*_param,
|
|
@@ -3361,6 +3555,7 @@ class InvoiceProcessingApi:
|
|
|
3361
3555
|
self,
|
|
3362
3556
|
xml_file,
|
|
3363
3557
|
profile,
|
|
3558
|
+
skip_br_fr,
|
|
3364
3559
|
_request_auth,
|
|
3365
3560
|
_content_type,
|
|
3366
3561
|
_headers,
|
|
@@ -3389,6 +3584,8 @@ class InvoiceProcessingApi:
|
|
|
3389
3584
|
_files['xml_file'] = xml_file
|
|
3390
3585
|
if profile is not None:
|
|
3391
3586
|
_form_params.append(('profile', profile))
|
|
3587
|
+
if skip_br_fr is not None:
|
|
3588
|
+
_form_params.append(('skip_br_fr', skip_br_fr))
|
|
3392
3589
|
# process the body parameter
|
|
3393
3590
|
|
|
3394
3591
|
|