factpulse 2.0.37__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 +542 -197
- factpulse/api/__init__.py +7 -4
- factpulse/api/afnorpdppa_api.py +49 -47
- factpulse/api/afnorpdppa_directory_service_api.py +1225 -310
- factpulse/api/afnorpdppa_flow_service_api.py +212 -81
- factpulse/api/chorus_pro_api.py +271 -218
- factpulse/api/document_conversion_api.py +1222 -0
- factpulse/api/downloads_api.py +1171 -0
- factpulse/api/e_reporting_api.py +3254 -0
- factpulse/api/{sant_api.py → health_api.py} +29 -22
- factpulse/api/invoice_processing_api.py +3634 -0
- factpulse/api/{vrification_pdfxml_api.py → pdfxml_verification_api.py} +331 -252
- factpulse/api/{utilisateur_api.py → user_api.py} +21 -17
- factpulse/api_client.py +4 -3
- factpulse/configuration.py +11 -6
- factpulse/exceptions.py +3 -2
- factpulse/models/__init__.py +265 -95
- factpulse/models/accept_language.py +38 -0
- factpulse/models/acknowledgment_status.py +39 -0
- factpulse/models/additional_document.py +116 -0
- 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 +107 -0
- factpulse/models/afnor_destination.py +127 -0
- 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 +92 -0
- 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 +127 -0
- 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 +150 -0
- factpulse/models/allowance_charge_reason_code.py +74 -0
- factpulse/models/allowance_reason_code.py +43 -0
- factpulse/models/allowance_total_amount.py +146 -0
- factpulse/models/amount.py +140 -0
- factpulse/models/amount1.py +140 -0
- factpulse/models/amount_due.py +140 -0
- factpulse/models/api_error.py +6 -5
- factpulse/models/api_profile.py +41 -0
- factpulse/models/async_task_status.py +98 -0
- factpulse/models/base_amount.py +146 -0
- factpulse/models/bounding_box_schema.py +11 -10
- factpulse/models/buyercountry.py +137 -0
- factpulse/models/celery_status.py +41 -0
- factpulse/models/certificate_info_response.py +25 -24
- factpulse/models/charge_total_amount.py +146 -0
- factpulse/models/chorus_pro_credentials.py +14 -13
- factpulse/models/chorus_pro_destination.py +109 -0
- factpulse/models/chorus_pro_result.py +102 -0
- factpulse/models/contact.py +114 -0
- factpulse/models/convert_resume_request.py +88 -0
- factpulse/models/convert_success_response.py +127 -0
- factpulse/models/convert_validation_failed_response.py +121 -0
- 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 +122 -0
- factpulse/models/destination.py +28 -27
- factpulse/models/directory_line_include.py +40 -0
- factpulse/models/doc_type.py +40 -0
- factpulse/models/document_type_info.py +92 -0
- factpulse/models/e_reporting_flow_type.py +40 -0
- factpulse/models/e_reporting_validation_error.py +97 -0
- factpulse/models/electronic_address.py +91 -0
- factpulse/models/enriched_invoice_info.py +134 -0
- factpulse/models/error_level.py +3 -2
- factpulse/models/error_source.py +3 -2
- factpulse/models/extraction_info.py +94 -0
- factpulse/models/factur_x_invoice.py +321 -0
- factpulse/models/factur_xpdf_info.py +92 -0
- 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 +116 -0
- factpulse/models/field_status.py +41 -0
- factpulse/models/file_info.py +95 -0
- factpulse/models/files_info.py +107 -0
- factpulse/models/flow_direction.py +38 -0
- factpulse/models/flow_profile.py +39 -0
- factpulse/models/flow_summary.py +132 -0
- factpulse/models/flow_syntax.py +41 -0
- factpulse/models/flow_type.py +49 -0
- factpulse/models/generate_aggregated_report_response.py +100 -0
- factpulse/models/generate_certificate_request.py +27 -26
- factpulse/models/generate_certificate_response.py +16 -15
- factpulse/models/generate_e_reporting_response.py +96 -0
- factpulse/models/get_chorus_pro_id_request.py +101 -0
- factpulse/models/get_chorus_pro_id_response.py +99 -0
- factpulse/models/get_invoice_request.py +99 -0
- factpulse/models/get_invoice_response.py +143 -0
- factpulse/models/get_structure_request.py +101 -0
- factpulse/models/get_structure_response.py +143 -0
- factpulse/models/global_allowance_amount.py +140 -0
- factpulse/models/gross_unit_price.py +146 -0
- factpulse/models/http_validation_error.py +3 -2
- factpulse/models/incoming_invoice.py +175 -0
- factpulse/models/incoming_supplier.py +145 -0
- factpulse/models/invoice_format.py +39 -0
- factpulse/models/invoice_input.py +179 -0
- factpulse/models/invoice_line.py +370 -0
- factpulse/models/invoice_line_allowance_amount.py +146 -0
- factpulse/models/invoice_note.py +95 -0
- factpulse/models/invoice_payment_input.py +110 -0
- factpulse/models/invoice_references.py +195 -0
- factpulse/models/invoice_status.py +97 -0
- factpulse/models/invoice_totals.py +178 -0
- factpulse/models/invoice_totals_prepayment.py +146 -0
- factpulse/models/invoice_type_code.py +52 -0
- factpulse/models/invoice_type_code_output.py +52 -0
- factpulse/models/invoicing_framework.py +111 -0
- factpulse/models/invoicing_framework_code.py +40 -0
- factpulse/models/line_net_amount.py +146 -0
- factpulse/models/line_sub_type.py +39 -0
- factpulse/models/line_total_amount.py +146 -0
- factpulse/models/location_inner.py +139 -0
- factpulse/models/mandatory_note_schema.py +125 -0
- factpulse/models/manual_rate.py +140 -0
- factpulse/models/manual_vat_rate.py +140 -0
- factpulse/models/missing_field.py +108 -0
- factpulse/models/operation_nature.py +50 -0
- factpulse/models/output_format.py +38 -0
- factpulse/models/page_dimensions_schema.py +90 -0
- factpulse/models/payee.py +169 -0
- factpulse/models/payment_amount_by_rate.py +98 -0
- factpulse/models/payment_card.py +100 -0
- factpulse/models/payment_means.py +42 -0
- factpulse/models/pdf_validation_result_api.py +170 -0
- factpulse/models/pdp_credentials.py +16 -15
- factpulse/models/percentage.py +146 -0
- factpulse/models/postal_address.py +135 -0
- factpulse/models/price_allowance_amount.py +146 -0
- factpulse/models/price_basis_quantity.py +146 -0
- factpulse/models/processing_options.py +95 -0
- factpulse/models/processing_rule.py +42 -0
- factpulse/models/product_characteristic.py +90 -0
- factpulse/models/product_classification.py +102 -0
- factpulse/models/quantity.py +140 -0
- factpulse/models/rate.py +140 -0
- factpulse/models/rate1.py +140 -0
- factpulse/models/recipient.py +168 -0
- factpulse/models/report_period.py +91 -0
- factpulse/models/report_sender.py +98 -0
- factpulse/models/rounding_amount.py +146 -0
- factpulse/models/routing_code_include.py +38 -0
- factpulse/models/schematron_validation_error.py +128 -0
- factpulse/models/scheme_id.py +18 -4
- factpulse/models/search_flow_request.py +144 -0
- factpulse/models/search_flow_response.py +102 -0
- factpulse/models/search_services_response.py +102 -0
- factpulse/models/search_structure_request.py +120 -0
- factpulse/models/search_structure_response.py +102 -0
- factpulse/models/sellercountry.py +137 -0
- factpulse/models/signature_info.py +7 -6
- factpulse/models/signature_info_api.py +123 -0
- factpulse/models/signature_parameters.py +134 -0
- factpulse/models/simplified_invoice_data.py +151 -0
- factpulse/models/siret_include.py +37 -0
- factpulse/models/structure_info.py +15 -14
- factpulse/models/structure_parameters.py +92 -0
- factpulse/models/structure_service.py +94 -0
- factpulse/models/submission_mode.py +39 -0
- factpulse/models/submit_aggregated_report_request.py +127 -0
- factpulse/models/submit_complete_invoice_request.py +117 -0
- factpulse/models/submit_complete_invoice_response.py +146 -0
- factpulse/models/submit_e_reporting_request.py +127 -0
- factpulse/models/submit_e_reporting_response.py +117 -0
- factpulse/models/submit_flow_request.py +124 -0
- factpulse/models/submit_flow_response.py +110 -0
- factpulse/models/submit_gross_amount.py +140 -0
- factpulse/models/submit_invoice_request.py +177 -0
- factpulse/models/submit_invoice_response.py +104 -0
- factpulse/models/submit_net_amount.py +140 -0
- factpulse/models/submit_vat_amount.py +140 -0
- factpulse/models/supplementary_attachment.py +96 -0
- factpulse/models/supplier.py +226 -0
- factpulse/models/task_response.py +88 -0
- factpulse/models/tax_breakdown_input.py +104 -0
- factpulse/models/tax_due_date_type.py +42 -0
- factpulse/models/tax_representative.py +96 -0
- factpulse/models/taxable_amount.py +140 -0
- 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 +140 -0
- factpulse/models/total_net_amount.py +140 -0
- factpulse/models/total_vat_amount.py +140 -0
- factpulse/models/transaction_category.py +40 -0
- factpulse/models/transmission_type_code.py +38 -0
- factpulse/models/unit_net_price.py +140 -0
- factpulse/models/unit_of_measure.py +42 -0
- factpulse/models/validate_e_reporting_request.py +92 -0
- factpulse/models/validate_e_reporting_response.py +113 -0
- factpulse/models/validation_error.py +6 -5
- factpulse/models/validation_error_detail.py +7 -6
- factpulse/models/validation_error_response.py +88 -0
- factpulse/models/validation_info.py +106 -0
- factpulse/models/validation_success_response.py +88 -0
- factpulse/models/vat_accounting_code.py +40 -0
- factpulse/models/vat_amount.py +140 -0
- factpulse/models/vat_category.py +45 -0
- factpulse/models/vat_line.py +141 -0
- factpulse/models/vat_point_date_code.py +39 -0
- factpulse/models/vat_rate.py +146 -0
- factpulse/models/verification_success_response.py +136 -0
- factpulse/models/verified_field_schema.py +130 -0
- factpulse/rest.py +3 -2
- factpulse-3.0.23.dist-info/METADATA +294 -0
- factpulse-3.0.23.dist-info/RECORD +306 -0
- {factpulse-2.0.37.dist-info → factpulse-3.0.23.dist-info}/licenses/LICENSE +1 -1
- factpulse_helpers/__init__.py +34 -34
- factpulse_helpers/client.py +1020 -795
- factpulse_helpers/exceptions.py +68 -68
- factpulse/api/traitement_facture_api.py +0 -3437
- factpulse/models/adresse_electronique.py +0 -90
- factpulse/models/adresse_postale.py +0 -120
- factpulse/models/cadre_de_facturation.py +0 -110
- factpulse/models/categorie_tva.py +0 -44
- factpulse/models/champ_verifie_schema.py +0 -129
- factpulse/models/code_cadre_facturation.py +0 -39
- factpulse/models/code_raison_reduction.py +0 -42
- factpulse/models/consulter_facture_request.py +0 -98
- factpulse/models/consulter_facture_response.py +0 -142
- factpulse/models/consulter_structure_request.py +0 -100
- factpulse/models/consulter_structure_response.py +0 -142
- factpulse/models/credentials_afnor.py +0 -106
- factpulse/models/credentials_chorus_pro.py +0 -115
- factpulse/models/destinataire.py +0 -130
- factpulse/models/destination_afnor.py +0 -127
- factpulse/models/destination_chorus_pro.py +0 -108
- factpulse/models/dimension_page_schema.py +0 -89
- factpulse/models/direction_flux.py +0 -37
- factpulse/models/donnees_facture_simplifiees.py +0 -124
- factpulse/models/facture_enrichie_info.py +0 -133
- factpulse/models/facture_entrante.py +0 -196
- factpulse/models/facture_factur_x.py +0 -183
- factpulse/models/flux_resume.py +0 -131
- factpulse/models/format_facture.py +0 -38
- factpulse/models/format_sortie.py +0 -37
- factpulse/models/fournisseur.py +0 -153
- factpulse/models/fournisseur_entrant.py +0 -144
- factpulse/models/information_signature_api.py +0 -122
- factpulse/models/ligne_de_poste.py +0 -183
- factpulse/models/ligne_de_poste_montant_remise_ht.py +0 -145
- factpulse/models/ligne_de_poste_taux_tva_manuel.py +0 -145
- factpulse/models/ligne_de_tva.py +0 -132
- factpulse/models/mode_depot.py +0 -38
- factpulse/models/mode_paiement.py +0 -41
- factpulse/models/montant_a_payer.py +0 -139
- factpulse/models/montant_base_ht.py +0 -139
- factpulse/models/montant_ht_total.py +0 -139
- factpulse/models/montant_remise_globale_ttc.py +0 -139
- factpulse/models/montant_total.py +0 -133
- factpulse/models/montant_total_acompte.py +0 -145
- factpulse/models/montant_total_ligne_ht.py +0 -139
- factpulse/models/montant_ttc_total.py +0 -139
- factpulse/models/montant_tva.py +0 -139
- factpulse/models/montant_tva_ligne.py +0 -139
- factpulse/models/montant_tva_total.py +0 -139
- factpulse/models/montant_unitaire_ht.py +0 -139
- factpulse/models/nature_operation.py +0 -49
- factpulse/models/note.py +0 -94
- factpulse/models/note_obligatoire_schema.py +0 -124
- factpulse/models/obtenir_id_chorus_pro_request.py +0 -100
- factpulse/models/obtenir_id_chorus_pro_response.py +0 -98
- factpulse/models/options_processing.py +0 -94
- factpulse/models/parametres_signature.py +0 -133
- factpulse/models/parametres_structure.py +0 -91
- factpulse/models/pdf_factur_x_info.py +0 -91
- factpulse/models/piece_jointe_complementaire.py +0 -95
- factpulse/models/profil_api.py +0 -39
- factpulse/models/profil_flux.py +0 -38
- factpulse/models/quantite.py +0 -139
- factpulse/models/rechercher_services_response.py +0 -101
- factpulse/models/rechercher_structure_request.py +0 -119
- factpulse/models/rechercher_structure_response.py +0 -101
- factpulse/models/references.py +0 -124
- factpulse/models/reponse_healthcheck_afnor.py +0 -91
- factpulse/models/reponse_recherche_flux.py +0 -101
- factpulse/models/reponse_soumission_flux.py +0 -109
- factpulse/models/reponse_tache.py +0 -87
- factpulse/models/reponse_validation_erreur.py +0 -87
- factpulse/models/reponse_validation_succes.py +0 -87
- factpulse/models/reponse_verification_succes.py +0 -135
- factpulse/models/requete_recherche_flux.py +0 -143
- factpulse/models/requete_soumission_flux.py +0 -123
- factpulse/models/resultat_afnor.py +0 -105
- factpulse/models/resultat_chorus_pro.py +0 -101
- factpulse/models/resultat_validation_pdfapi.py +0 -169
- factpulse/models/service_structure.py +0 -93
- factpulse/models/soumettre_facture_complete_request.py +0 -116
- factpulse/models/soumettre_facture_complete_response.py +0 -145
- factpulse/models/soumettre_facture_request.py +0 -176
- factpulse/models/soumettre_facture_response.py +0 -103
- factpulse/models/statut_acquittement.py +0 -38
- factpulse/models/statut_celery.py +0 -40
- factpulse/models/statut_champ_api.py +0 -40
- factpulse/models/statut_facture.py +0 -96
- factpulse/models/statut_tache.py +0 -97
- factpulse/models/syntaxe_flux.py +0 -40
- factpulse/models/tauxmanuel.py +0 -139
- factpulse/models/type_document.py +0 -40
- factpulse/models/type_facture.py +0 -37
- factpulse/models/type_flux.py +0 -40
- factpulse/models/type_tva.py +0 -39
- factpulse/models/unite.py +0 -41
- factpulse/models/validation_error_loc_inner.py +0 -138
- factpulse-2.0.37.dist-info/METADATA +0 -292
- factpulse-2.0.37.dist-info/RECORD +0 -134
- {factpulse-2.0.37.dist-info → factpulse-3.0.23.dist-info}/WHEEL +0 -0
- {factpulse-2.0.37.dist-info → factpulse-3.0.23.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
FactPulse REST API
|
|
5
5
|
|
|
6
|
-
|
|
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.
|
|
@@ -19,16 +20,16 @@ from typing_extensions import Annotated
|
|
|
19
20
|
from pydantic import Field, StrictBool, StrictBytes, StrictStr
|
|
20
21
|
from typing import Optional, Tuple, Union
|
|
21
22
|
from typing_extensions import Annotated
|
|
22
|
-
from factpulse.models.
|
|
23
|
-
from factpulse.models.
|
|
24
|
-
from factpulse.models.
|
|
23
|
+
from factpulse.models.async_task_status import AsyncTaskStatus
|
|
24
|
+
from factpulse.models.task_response import TaskResponse
|
|
25
|
+
from factpulse.models.verification_success_response import VerificationSuccessResponse
|
|
25
26
|
|
|
26
27
|
from factpulse.api_client import ApiClient, RequestSerialized
|
|
27
28
|
from factpulse.api_response import ApiResponse
|
|
28
29
|
from factpulse.rest import RESTResponseType
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
class
|
|
32
|
+
class PDFXMLVerificationApi:
|
|
32
33
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
34
|
Ref: https://openapi-generator.tech
|
|
34
35
|
|
|
@@ -42,9 +43,9 @@ class VrificationPDFXMLApi:
|
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
@validate_call
|
|
45
|
-
def
|
|
46
|
+
def get_verification_status_api_v1_verification_verify_async_task_id_status_get(
|
|
46
47
|
self,
|
|
47
|
-
|
|
48
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
48
49
|
_request_timeout: Union[
|
|
49
50
|
None,
|
|
50
51
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -57,13 +58,13 @@ class VrificationPDFXMLApi:
|
|
|
57
58
|
_content_type: Optional[StrictStr] = None,
|
|
58
59
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
60
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
-
) ->
|
|
61
|
-
"""
|
|
61
|
+
) -> AsyncTaskStatus:
|
|
62
|
+
"""Get status of an asynchronous verification
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
64
65
|
|
|
65
|
-
:param
|
|
66
|
-
:type
|
|
66
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
67
|
+
:type task_id: str
|
|
67
68
|
:param _request_timeout: timeout setting for this request. If one
|
|
68
69
|
number provided, it will be total request
|
|
69
70
|
timeout. It can also be a pair (tuple) of
|
|
@@ -86,8 +87,8 @@ class VrificationPDFXMLApi:
|
|
|
86
87
|
:return: Returns the result object.
|
|
87
88
|
""" # noqa: E501
|
|
88
89
|
|
|
89
|
-
_param = self.
|
|
90
|
-
|
|
90
|
+
_param = self._get_verification_status_api_v1_verification_verify_async_task_id_status_get_serialize(
|
|
91
|
+
task_id=task_id,
|
|
91
92
|
_request_auth=_request_auth,
|
|
92
93
|
_content_type=_content_type,
|
|
93
94
|
_headers=_headers,
|
|
@@ -95,8 +96,9 @@ class VrificationPDFXMLApi:
|
|
|
95
96
|
)
|
|
96
97
|
|
|
97
98
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
|
-
'200': "
|
|
99
|
+
'200': "AsyncTaskStatus",
|
|
99
100
|
'422': "HTTPValidationError",
|
|
101
|
+
'401': "APIError",
|
|
100
102
|
}
|
|
101
103
|
response_data = self.api_client.call_api(
|
|
102
104
|
*_param,
|
|
@@ -110,9 +112,9 @@ class VrificationPDFXMLApi:
|
|
|
110
112
|
|
|
111
113
|
|
|
112
114
|
@validate_call
|
|
113
|
-
def
|
|
115
|
+
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_with_http_info(
|
|
114
116
|
self,
|
|
115
|
-
|
|
117
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
116
118
|
_request_timeout: Union[
|
|
117
119
|
None,
|
|
118
120
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -125,13 +127,13 @@ class VrificationPDFXMLApi:
|
|
|
125
127
|
_content_type: Optional[StrictStr] = None,
|
|
126
128
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
129
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
-
) -> ApiResponse[
|
|
129
|
-
"""
|
|
130
|
+
) -> ApiResponse[AsyncTaskStatus]:
|
|
131
|
+
"""Get status of an asynchronous verification
|
|
130
132
|
|
|
131
|
-
|
|
133
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
132
134
|
|
|
133
|
-
:param
|
|
134
|
-
:type
|
|
135
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
136
|
+
:type task_id: str
|
|
135
137
|
:param _request_timeout: timeout setting for this request. If one
|
|
136
138
|
number provided, it will be total request
|
|
137
139
|
timeout. It can also be a pair (tuple) of
|
|
@@ -154,8 +156,8 @@ class VrificationPDFXMLApi:
|
|
|
154
156
|
:return: Returns the result object.
|
|
155
157
|
""" # noqa: E501
|
|
156
158
|
|
|
157
|
-
_param = self.
|
|
158
|
-
|
|
159
|
+
_param = self._get_verification_status_api_v1_verification_verify_async_task_id_status_get_serialize(
|
|
160
|
+
task_id=task_id,
|
|
159
161
|
_request_auth=_request_auth,
|
|
160
162
|
_content_type=_content_type,
|
|
161
163
|
_headers=_headers,
|
|
@@ -163,8 +165,9 @@ class VrificationPDFXMLApi:
|
|
|
163
165
|
)
|
|
164
166
|
|
|
165
167
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
-
'200': "
|
|
168
|
+
'200': "AsyncTaskStatus",
|
|
167
169
|
'422': "HTTPValidationError",
|
|
170
|
+
'401': "APIError",
|
|
168
171
|
}
|
|
169
172
|
response_data = self.api_client.call_api(
|
|
170
173
|
*_param,
|
|
@@ -178,9 +181,9 @@ class VrificationPDFXMLApi:
|
|
|
178
181
|
|
|
179
182
|
|
|
180
183
|
@validate_call
|
|
181
|
-
def
|
|
184
|
+
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_without_preload_content(
|
|
182
185
|
self,
|
|
183
|
-
|
|
186
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
184
187
|
_request_timeout: Union[
|
|
185
188
|
None,
|
|
186
189
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -194,12 +197,12 @@ class VrificationPDFXMLApi:
|
|
|
194
197
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
198
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
199
|
) -> RESTResponseType:
|
|
197
|
-
"""
|
|
200
|
+
"""Get status of an asynchronous verification
|
|
198
201
|
|
|
199
|
-
|
|
202
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
200
203
|
|
|
201
|
-
:param
|
|
202
|
-
:type
|
|
204
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
205
|
+
:type task_id: str
|
|
203
206
|
:param _request_timeout: timeout setting for this request. If one
|
|
204
207
|
number provided, it will be total request
|
|
205
208
|
timeout. It can also be a pair (tuple) of
|
|
@@ -222,8 +225,8 @@ class VrificationPDFXMLApi:
|
|
|
222
225
|
:return: Returns the result object.
|
|
223
226
|
""" # noqa: E501
|
|
224
227
|
|
|
225
|
-
_param = self.
|
|
226
|
-
|
|
228
|
+
_param = self._get_verification_status_api_v1_verification_verify_async_task_id_status_get_serialize(
|
|
229
|
+
task_id=task_id,
|
|
227
230
|
_request_auth=_request_auth,
|
|
228
231
|
_content_type=_content_type,
|
|
229
232
|
_headers=_headers,
|
|
@@ -231,8 +234,9 @@ class VrificationPDFXMLApi:
|
|
|
231
234
|
)
|
|
232
235
|
|
|
233
236
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
234
|
-
'200': "
|
|
237
|
+
'200': "AsyncTaskStatus",
|
|
235
238
|
'422': "HTTPValidationError",
|
|
239
|
+
'401': "APIError",
|
|
236
240
|
}
|
|
237
241
|
response_data = self.api_client.call_api(
|
|
238
242
|
*_param,
|
|
@@ -241,9 +245,9 @@ class VrificationPDFXMLApi:
|
|
|
241
245
|
return response_data.response
|
|
242
246
|
|
|
243
247
|
|
|
244
|
-
def
|
|
248
|
+
def _get_verification_status_api_v1_verification_verify_async_task_id_status_get_serialize(
|
|
245
249
|
self,
|
|
246
|
-
|
|
250
|
+
task_id,
|
|
247
251
|
_request_auth,
|
|
248
252
|
_content_type,
|
|
249
253
|
_headers,
|
|
@@ -265,8 +269,8 @@ class VrificationPDFXMLApi:
|
|
|
265
269
|
_body_params: Optional[bytes] = None
|
|
266
270
|
|
|
267
271
|
# process the path parameters
|
|
268
|
-
if
|
|
269
|
-
_path_params['
|
|
272
|
+
if task_id is not None:
|
|
273
|
+
_path_params['task_id'] = task_id
|
|
270
274
|
# process the query parameters
|
|
271
275
|
# process the header parameters
|
|
272
276
|
# process the form parameters
|
|
@@ -289,7 +293,7 @@ class VrificationPDFXMLApi:
|
|
|
289
293
|
|
|
290
294
|
return self.api_client.param_serialize(
|
|
291
295
|
method='GET',
|
|
292
|
-
resource_path='/api/v1/verification/
|
|
296
|
+
resource_path='/api/v1/verification/verify-async/{task_id}/status',
|
|
293
297
|
path_params=_path_params,
|
|
294
298
|
query_params=_query_params,
|
|
295
299
|
header_params=_header_params,
|
|
@@ -306,9 +310,9 @@ class VrificationPDFXMLApi:
|
|
|
306
310
|
|
|
307
311
|
|
|
308
312
|
@validate_call
|
|
309
|
-
def
|
|
313
|
+
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_0(
|
|
310
314
|
self,
|
|
311
|
-
|
|
315
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
312
316
|
_request_timeout: Union[
|
|
313
317
|
None,
|
|
314
318
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -321,13 +325,13 @@ class VrificationPDFXMLApi:
|
|
|
321
325
|
_content_type: Optional[StrictStr] = None,
|
|
322
326
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
323
327
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
324
|
-
) ->
|
|
325
|
-
"""
|
|
328
|
+
) -> AsyncTaskStatus:
|
|
329
|
+
"""Get status of an asynchronous verification
|
|
326
330
|
|
|
327
|
-
|
|
331
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
328
332
|
|
|
329
|
-
:param
|
|
330
|
-
:type
|
|
333
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
334
|
+
:type task_id: str
|
|
331
335
|
:param _request_timeout: timeout setting for this request. If one
|
|
332
336
|
number provided, it will be total request
|
|
333
337
|
timeout. It can also be a pair (tuple) of
|
|
@@ -350,8 +354,8 @@ class VrificationPDFXMLApi:
|
|
|
350
354
|
:return: Returns the result object.
|
|
351
355
|
""" # noqa: E501
|
|
352
356
|
|
|
353
|
-
_param = self.
|
|
354
|
-
|
|
357
|
+
_param = self._get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_serialize(
|
|
358
|
+
task_id=task_id,
|
|
355
359
|
_request_auth=_request_auth,
|
|
356
360
|
_content_type=_content_type,
|
|
357
361
|
_headers=_headers,
|
|
@@ -359,8 +363,9 @@ class VrificationPDFXMLApi:
|
|
|
359
363
|
)
|
|
360
364
|
|
|
361
365
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
362
|
-
'200': "
|
|
366
|
+
'200': "AsyncTaskStatus",
|
|
363
367
|
'422': "HTTPValidationError",
|
|
368
|
+
'401': "APIError",
|
|
364
369
|
}
|
|
365
370
|
response_data = self.api_client.call_api(
|
|
366
371
|
*_param,
|
|
@@ -374,9 +379,9 @@ class VrificationPDFXMLApi:
|
|
|
374
379
|
|
|
375
380
|
|
|
376
381
|
@validate_call
|
|
377
|
-
def
|
|
382
|
+
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_with_http_info(
|
|
378
383
|
self,
|
|
379
|
-
|
|
384
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
380
385
|
_request_timeout: Union[
|
|
381
386
|
None,
|
|
382
387
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -389,13 +394,13 @@ class VrificationPDFXMLApi:
|
|
|
389
394
|
_content_type: Optional[StrictStr] = None,
|
|
390
395
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
391
396
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
392
|
-
) -> ApiResponse[
|
|
393
|
-
"""
|
|
397
|
+
) -> ApiResponse[AsyncTaskStatus]:
|
|
398
|
+
"""Get status of an asynchronous verification
|
|
394
399
|
|
|
395
|
-
|
|
400
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
396
401
|
|
|
397
|
-
:param
|
|
398
|
-
:type
|
|
402
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
403
|
+
:type task_id: str
|
|
399
404
|
:param _request_timeout: timeout setting for this request. If one
|
|
400
405
|
number provided, it will be total request
|
|
401
406
|
timeout. It can also be a pair (tuple) of
|
|
@@ -418,8 +423,8 @@ class VrificationPDFXMLApi:
|
|
|
418
423
|
:return: Returns the result object.
|
|
419
424
|
""" # noqa: E501
|
|
420
425
|
|
|
421
|
-
_param = self.
|
|
422
|
-
|
|
426
|
+
_param = self._get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_serialize(
|
|
427
|
+
task_id=task_id,
|
|
423
428
|
_request_auth=_request_auth,
|
|
424
429
|
_content_type=_content_type,
|
|
425
430
|
_headers=_headers,
|
|
@@ -427,8 +432,9 @@ class VrificationPDFXMLApi:
|
|
|
427
432
|
)
|
|
428
433
|
|
|
429
434
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
430
|
-
'200': "
|
|
435
|
+
'200': "AsyncTaskStatus",
|
|
431
436
|
'422': "HTTPValidationError",
|
|
437
|
+
'401': "APIError",
|
|
432
438
|
}
|
|
433
439
|
response_data = self.api_client.call_api(
|
|
434
440
|
*_param,
|
|
@@ -442,9 +448,9 @@ class VrificationPDFXMLApi:
|
|
|
442
448
|
|
|
443
449
|
|
|
444
450
|
@validate_call
|
|
445
|
-
def
|
|
451
|
+
def get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_without_preload_content(
|
|
446
452
|
self,
|
|
447
|
-
|
|
453
|
+
task_id: Annotated[StrictStr, Field(description="Celery task ID returned by /verify-async endpoint")],
|
|
448
454
|
_request_timeout: Union[
|
|
449
455
|
None,
|
|
450
456
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -458,12 +464,12 @@ class VrificationPDFXMLApi:
|
|
|
458
464
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
459
465
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
460
466
|
) -> RESTResponseType:
|
|
461
|
-
"""
|
|
467
|
+
"""Get status of an asynchronous verification
|
|
462
468
|
|
|
463
|
-
|
|
469
|
+
Retrieves the status and result of an asynchronous verification task. **Possible statuses:** - `PENDING`: Task waiting in queue - `STARTED`: Task currently running - `SUCCESS`: Task completed successfully (see `result`) - `FAILURE`: System error (unhandled exception) **Note:** The `result.status` field can be \"SUCCESS\" or \"ERROR\" independently of Celery status (which will always be SUCCESS if the task ran).
|
|
464
470
|
|
|
465
|
-
:param
|
|
466
|
-
:type
|
|
471
|
+
:param task_id: Celery task ID returned by /verify-async endpoint (required)
|
|
472
|
+
:type task_id: str
|
|
467
473
|
:param _request_timeout: timeout setting for this request. If one
|
|
468
474
|
number provided, it will be total request
|
|
469
475
|
timeout. It can also be a pair (tuple) of
|
|
@@ -486,8 +492,8 @@ class VrificationPDFXMLApi:
|
|
|
486
492
|
:return: Returns the result object.
|
|
487
493
|
""" # noqa: E501
|
|
488
494
|
|
|
489
|
-
_param = self.
|
|
490
|
-
|
|
495
|
+
_param = self._get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_serialize(
|
|
496
|
+
task_id=task_id,
|
|
491
497
|
_request_auth=_request_auth,
|
|
492
498
|
_content_type=_content_type,
|
|
493
499
|
_headers=_headers,
|
|
@@ -495,8 +501,9 @@ class VrificationPDFXMLApi:
|
|
|
495
501
|
)
|
|
496
502
|
|
|
497
503
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
498
|
-
'200': "
|
|
504
|
+
'200': "AsyncTaskStatus",
|
|
499
505
|
'422': "HTTPValidationError",
|
|
506
|
+
'401': "APIError",
|
|
500
507
|
}
|
|
501
508
|
response_data = self.api_client.call_api(
|
|
502
509
|
*_param,
|
|
@@ -505,9 +512,9 @@ class VrificationPDFXMLApi:
|
|
|
505
512
|
return response_data.response
|
|
506
513
|
|
|
507
514
|
|
|
508
|
-
def
|
|
515
|
+
def _get_verification_status_api_v1_verification_verify_async_task_id_status_get_0_serialize(
|
|
509
516
|
self,
|
|
510
|
-
|
|
517
|
+
task_id,
|
|
511
518
|
_request_auth,
|
|
512
519
|
_content_type,
|
|
513
520
|
_headers,
|
|
@@ -529,8 +536,8 @@ class VrificationPDFXMLApi:
|
|
|
529
536
|
_body_params: Optional[bytes] = None
|
|
530
537
|
|
|
531
538
|
# process the path parameters
|
|
532
|
-
if
|
|
533
|
-
_path_params['
|
|
539
|
+
if task_id is not None:
|
|
540
|
+
_path_params['task_id'] = task_id
|
|
534
541
|
# process the query parameters
|
|
535
542
|
# process the header parameters
|
|
536
543
|
# process the form parameters
|
|
@@ -553,7 +560,7 @@ class VrificationPDFXMLApi:
|
|
|
553
560
|
|
|
554
561
|
return self.api_client.param_serialize(
|
|
555
562
|
method='GET',
|
|
556
|
-
resource_path='/api/v1/verification/
|
|
563
|
+
resource_path='/api/v1/verification/verify-async/{task_id}/status',
|
|
557
564
|
path_params=_path_params,
|
|
558
565
|
query_params=_query_params,
|
|
559
566
|
header_params=_header_params,
|
|
@@ -570,10 +577,12 @@ class VrificationPDFXMLApi:
|
|
|
570
577
|
|
|
571
578
|
|
|
572
579
|
@validate_call
|
|
573
|
-
def
|
|
580
|
+
def verify_pdf_async_api_v1_verification_verify_async_post(
|
|
574
581
|
self,
|
|
575
|
-
|
|
576
|
-
|
|
582
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
583
|
+
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
584
|
+
callback_url: Optional[StrictStr] = None,
|
|
585
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
577
586
|
_request_timeout: Union[
|
|
578
587
|
None,
|
|
579
588
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -586,15 +595,19 @@ class VrificationPDFXMLApi:
|
|
|
586
595
|
_content_type: Optional[StrictStr] = None,
|
|
587
596
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
588
597
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
589
|
-
) ->
|
|
590
|
-
"""
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
:param
|
|
595
|
-
:type
|
|
596
|
-
:param
|
|
597
|
-
:type
|
|
598
|
+
) -> TaskResponse:
|
|
599
|
+
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
600
|
+
|
|
601
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
602
|
+
|
|
603
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
604
|
+
:type pdf_file: bytearray
|
|
605
|
+
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
606
|
+
:type force_ocr: bool
|
|
607
|
+
:param callback_url:
|
|
608
|
+
:type callback_url: str
|
|
609
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
610
|
+
:type webhook_mode: str
|
|
598
611
|
:param _request_timeout: timeout setting for this request. If one
|
|
599
612
|
number provided, it will be total request
|
|
600
613
|
timeout. It can also be a pair (tuple) of
|
|
@@ -617,9 +630,11 @@ class VrificationPDFXMLApi:
|
|
|
617
630
|
:return: Returns the result object.
|
|
618
631
|
""" # noqa: E501
|
|
619
632
|
|
|
620
|
-
_param = self.
|
|
621
|
-
|
|
622
|
-
|
|
633
|
+
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
634
|
+
pdf_file=pdf_file,
|
|
635
|
+
force_ocr=force_ocr,
|
|
636
|
+
callback_url=callback_url,
|
|
637
|
+
webhook_mode=webhook_mode,
|
|
623
638
|
_request_auth=_request_auth,
|
|
624
639
|
_content_type=_content_type,
|
|
625
640
|
_headers=_headers,
|
|
@@ -627,8 +642,9 @@ class VrificationPDFXMLApi:
|
|
|
627
642
|
)
|
|
628
643
|
|
|
629
644
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
630
|
-
'202': "
|
|
645
|
+
'202': "TaskResponse",
|
|
631
646
|
'422': "HTTPValidationError",
|
|
647
|
+
'401': "APIError",
|
|
632
648
|
}
|
|
633
649
|
response_data = self.api_client.call_api(
|
|
634
650
|
*_param,
|
|
@@ -642,10 +658,12 @@ class VrificationPDFXMLApi:
|
|
|
642
658
|
|
|
643
659
|
|
|
644
660
|
@validate_call
|
|
645
|
-
def
|
|
661
|
+
def verify_pdf_async_api_v1_verification_verify_async_post_with_http_info(
|
|
646
662
|
self,
|
|
647
|
-
|
|
648
|
-
|
|
663
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
664
|
+
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
665
|
+
callback_url: Optional[StrictStr] = None,
|
|
666
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
649
667
|
_request_timeout: Union[
|
|
650
668
|
None,
|
|
651
669
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -658,15 +676,19 @@ class VrificationPDFXMLApi:
|
|
|
658
676
|
_content_type: Optional[StrictStr] = None,
|
|
659
677
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
660
678
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
661
|
-
) -> ApiResponse[
|
|
662
|
-
"""
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
:param
|
|
667
|
-
:type
|
|
668
|
-
:param
|
|
669
|
-
:type
|
|
679
|
+
) -> ApiResponse[TaskResponse]:
|
|
680
|
+
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
681
|
+
|
|
682
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
683
|
+
|
|
684
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
685
|
+
:type pdf_file: bytearray
|
|
686
|
+
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
687
|
+
:type force_ocr: bool
|
|
688
|
+
:param callback_url:
|
|
689
|
+
:type callback_url: str
|
|
690
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
691
|
+
:type webhook_mode: str
|
|
670
692
|
:param _request_timeout: timeout setting for this request. If one
|
|
671
693
|
number provided, it will be total request
|
|
672
694
|
timeout. It can also be a pair (tuple) of
|
|
@@ -689,9 +711,11 @@ class VrificationPDFXMLApi:
|
|
|
689
711
|
:return: Returns the result object.
|
|
690
712
|
""" # noqa: E501
|
|
691
713
|
|
|
692
|
-
_param = self.
|
|
693
|
-
|
|
694
|
-
|
|
714
|
+
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
715
|
+
pdf_file=pdf_file,
|
|
716
|
+
force_ocr=force_ocr,
|
|
717
|
+
callback_url=callback_url,
|
|
718
|
+
webhook_mode=webhook_mode,
|
|
695
719
|
_request_auth=_request_auth,
|
|
696
720
|
_content_type=_content_type,
|
|
697
721
|
_headers=_headers,
|
|
@@ -699,8 +723,9 @@ class VrificationPDFXMLApi:
|
|
|
699
723
|
)
|
|
700
724
|
|
|
701
725
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
702
|
-
'202': "
|
|
726
|
+
'202': "TaskResponse",
|
|
703
727
|
'422': "HTTPValidationError",
|
|
728
|
+
'401': "APIError",
|
|
704
729
|
}
|
|
705
730
|
response_data = self.api_client.call_api(
|
|
706
731
|
*_param,
|
|
@@ -714,10 +739,12 @@ class VrificationPDFXMLApi:
|
|
|
714
739
|
|
|
715
740
|
|
|
716
741
|
@validate_call
|
|
717
|
-
def
|
|
742
|
+
def verify_pdf_async_api_v1_verification_verify_async_post_without_preload_content(
|
|
718
743
|
self,
|
|
719
|
-
|
|
720
|
-
|
|
744
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
745
|
+
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
746
|
+
callback_url: Optional[StrictStr] = None,
|
|
747
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
721
748
|
_request_timeout: Union[
|
|
722
749
|
None,
|
|
723
750
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -731,14 +758,18 @@ class VrificationPDFXMLApi:
|
|
|
731
758
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
732
759
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
733
760
|
) -> RESTResponseType:
|
|
734
|
-
"""
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
:param
|
|
739
|
-
:type
|
|
740
|
-
:param
|
|
741
|
-
:type
|
|
761
|
+
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
762
|
+
|
|
763
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
764
|
+
|
|
765
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
766
|
+
:type pdf_file: bytearray
|
|
767
|
+
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
768
|
+
:type force_ocr: bool
|
|
769
|
+
:param callback_url:
|
|
770
|
+
:type callback_url: str
|
|
771
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
772
|
+
:type webhook_mode: str
|
|
742
773
|
:param _request_timeout: timeout setting for this request. If one
|
|
743
774
|
number provided, it will be total request
|
|
744
775
|
timeout. It can also be a pair (tuple) of
|
|
@@ -761,9 +792,11 @@ class VrificationPDFXMLApi:
|
|
|
761
792
|
:return: Returns the result object.
|
|
762
793
|
""" # noqa: E501
|
|
763
794
|
|
|
764
|
-
_param = self.
|
|
765
|
-
|
|
766
|
-
|
|
795
|
+
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
796
|
+
pdf_file=pdf_file,
|
|
797
|
+
force_ocr=force_ocr,
|
|
798
|
+
callback_url=callback_url,
|
|
799
|
+
webhook_mode=webhook_mode,
|
|
767
800
|
_request_auth=_request_auth,
|
|
768
801
|
_content_type=_content_type,
|
|
769
802
|
_headers=_headers,
|
|
@@ -771,8 +804,9 @@ class VrificationPDFXMLApi:
|
|
|
771
804
|
)
|
|
772
805
|
|
|
773
806
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
774
|
-
'202': "
|
|
807
|
+
'202': "TaskResponse",
|
|
775
808
|
'422': "HTTPValidationError",
|
|
809
|
+
'401': "APIError",
|
|
776
810
|
}
|
|
777
811
|
response_data = self.api_client.call_api(
|
|
778
812
|
*_param,
|
|
@@ -781,10 +815,12 @@ class VrificationPDFXMLApi:
|
|
|
781
815
|
return response_data.response
|
|
782
816
|
|
|
783
817
|
|
|
784
|
-
def
|
|
818
|
+
def _verify_pdf_async_api_v1_verification_verify_async_post_serialize(
|
|
785
819
|
self,
|
|
786
|
-
|
|
787
|
-
|
|
820
|
+
pdf_file,
|
|
821
|
+
force_ocr,
|
|
822
|
+
callback_url,
|
|
823
|
+
webhook_mode,
|
|
788
824
|
_request_auth,
|
|
789
825
|
_content_type,
|
|
790
826
|
_headers,
|
|
@@ -809,10 +845,14 @@ class VrificationPDFXMLApi:
|
|
|
809
845
|
# process the query parameters
|
|
810
846
|
# process the header parameters
|
|
811
847
|
# process the form parameters
|
|
812
|
-
if
|
|
813
|
-
_files['
|
|
814
|
-
if
|
|
815
|
-
_form_params.append(('
|
|
848
|
+
if pdf_file is not None:
|
|
849
|
+
_files['pdf_file'] = pdf_file
|
|
850
|
+
if force_ocr is not None:
|
|
851
|
+
_form_params.append(('force_ocr', force_ocr))
|
|
852
|
+
if callback_url is not None:
|
|
853
|
+
_form_params.append(('callback_url', callback_url))
|
|
854
|
+
if webhook_mode is not None:
|
|
855
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
816
856
|
# process the body parameter
|
|
817
857
|
|
|
818
858
|
|
|
@@ -845,7 +885,7 @@ class VrificationPDFXMLApi:
|
|
|
845
885
|
|
|
846
886
|
return self.api_client.param_serialize(
|
|
847
887
|
method='POST',
|
|
848
|
-
resource_path='/api/v1/verification/
|
|
888
|
+
resource_path='/api/v1/verification/verify-async',
|
|
849
889
|
path_params=_path_params,
|
|
850
890
|
query_params=_query_params,
|
|
851
891
|
header_params=_header_params,
|
|
@@ -862,10 +902,12 @@ class VrificationPDFXMLApi:
|
|
|
862
902
|
|
|
863
903
|
|
|
864
904
|
@validate_call
|
|
865
|
-
def
|
|
905
|
+
def verify_pdf_async_api_v1_verification_verify_async_post_0(
|
|
866
906
|
self,
|
|
867
|
-
|
|
868
|
-
|
|
907
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
908
|
+
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
909
|
+
callback_url: Optional[StrictStr] = None,
|
|
910
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
869
911
|
_request_timeout: Union[
|
|
870
912
|
None,
|
|
871
913
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -878,15 +920,19 @@ class VrificationPDFXMLApi:
|
|
|
878
920
|
_content_type: Optional[StrictStr] = None,
|
|
879
921
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
880
922
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
881
|
-
) ->
|
|
882
|
-
"""
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
:param
|
|
887
|
-
:type
|
|
888
|
-
:param
|
|
889
|
-
:type
|
|
923
|
+
) -> TaskResponse:
|
|
924
|
+
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
925
|
+
|
|
926
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
927
|
+
|
|
928
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
929
|
+
:type pdf_file: bytearray
|
|
930
|
+
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
931
|
+
:type force_ocr: bool
|
|
932
|
+
:param callback_url:
|
|
933
|
+
:type callback_url: str
|
|
934
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
935
|
+
:type webhook_mode: str
|
|
890
936
|
:param _request_timeout: timeout setting for this request. If one
|
|
891
937
|
number provided, it will be total request
|
|
892
938
|
timeout. It can also be a pair (tuple) of
|
|
@@ -909,9 +955,11 @@ class VrificationPDFXMLApi:
|
|
|
909
955
|
:return: Returns the result object.
|
|
910
956
|
""" # noqa: E501
|
|
911
957
|
|
|
912
|
-
_param = self.
|
|
913
|
-
|
|
914
|
-
|
|
958
|
+
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
959
|
+
pdf_file=pdf_file,
|
|
960
|
+
force_ocr=force_ocr,
|
|
961
|
+
callback_url=callback_url,
|
|
962
|
+
webhook_mode=webhook_mode,
|
|
915
963
|
_request_auth=_request_auth,
|
|
916
964
|
_content_type=_content_type,
|
|
917
965
|
_headers=_headers,
|
|
@@ -919,8 +967,9 @@ class VrificationPDFXMLApi:
|
|
|
919
967
|
)
|
|
920
968
|
|
|
921
969
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
922
|
-
'202': "
|
|
970
|
+
'202': "TaskResponse",
|
|
923
971
|
'422': "HTTPValidationError",
|
|
972
|
+
'401': "APIError",
|
|
924
973
|
}
|
|
925
974
|
response_data = self.api_client.call_api(
|
|
926
975
|
*_param,
|
|
@@ -934,10 +983,12 @@ class VrificationPDFXMLApi:
|
|
|
934
983
|
|
|
935
984
|
|
|
936
985
|
@validate_call
|
|
937
|
-
def
|
|
986
|
+
def verify_pdf_async_api_v1_verification_verify_async_post_0_with_http_info(
|
|
938
987
|
self,
|
|
939
|
-
|
|
940
|
-
|
|
988
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
989
|
+
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
990
|
+
callback_url: Optional[StrictStr] = None,
|
|
991
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
941
992
|
_request_timeout: Union[
|
|
942
993
|
None,
|
|
943
994
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -950,15 +1001,19 @@ class VrificationPDFXMLApi:
|
|
|
950
1001
|
_content_type: Optional[StrictStr] = None,
|
|
951
1002
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
952
1003
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
953
|
-
) -> ApiResponse[
|
|
954
|
-
"""
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
:param
|
|
959
|
-
:type
|
|
960
|
-
:param
|
|
961
|
-
:type
|
|
1004
|
+
) -> ApiResponse[TaskResponse]:
|
|
1005
|
+
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
1006
|
+
|
|
1007
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
1008
|
+
|
|
1009
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1010
|
+
:type pdf_file: bytearray
|
|
1011
|
+
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
1012
|
+
:type force_ocr: bool
|
|
1013
|
+
:param callback_url:
|
|
1014
|
+
:type callback_url: str
|
|
1015
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1016
|
+
:type webhook_mode: str
|
|
962
1017
|
:param _request_timeout: timeout setting for this request. If one
|
|
963
1018
|
number provided, it will be total request
|
|
964
1019
|
timeout. It can also be a pair (tuple) of
|
|
@@ -981,9 +1036,11 @@ class VrificationPDFXMLApi:
|
|
|
981
1036
|
:return: Returns the result object.
|
|
982
1037
|
""" # noqa: E501
|
|
983
1038
|
|
|
984
|
-
_param = self.
|
|
985
|
-
|
|
986
|
-
|
|
1039
|
+
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
1040
|
+
pdf_file=pdf_file,
|
|
1041
|
+
force_ocr=force_ocr,
|
|
1042
|
+
callback_url=callback_url,
|
|
1043
|
+
webhook_mode=webhook_mode,
|
|
987
1044
|
_request_auth=_request_auth,
|
|
988
1045
|
_content_type=_content_type,
|
|
989
1046
|
_headers=_headers,
|
|
@@ -991,8 +1048,9 @@ class VrificationPDFXMLApi:
|
|
|
991
1048
|
)
|
|
992
1049
|
|
|
993
1050
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
994
|
-
'202': "
|
|
1051
|
+
'202': "TaskResponse",
|
|
995
1052
|
'422': "HTTPValidationError",
|
|
1053
|
+
'401': "APIError",
|
|
996
1054
|
}
|
|
997
1055
|
response_data = self.api_client.call_api(
|
|
998
1056
|
*_param,
|
|
@@ -1006,10 +1064,12 @@ class VrificationPDFXMLApi:
|
|
|
1006
1064
|
|
|
1007
1065
|
|
|
1008
1066
|
@validate_call
|
|
1009
|
-
def
|
|
1067
|
+
def verify_pdf_async_api_v1_verification_verify_async_post_0_without_preload_content(
|
|
1010
1068
|
self,
|
|
1011
|
-
|
|
1012
|
-
|
|
1069
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1070
|
+
force_ocr: Annotated[Optional[StrictBool], Field(description="Force OCR usage even if PDF contains native text")] = None,
|
|
1071
|
+
callback_url: Optional[StrictStr] = None,
|
|
1072
|
+
webhook_mode: Annotated[Optional[StrictStr], Field(description="Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)")] = None,
|
|
1013
1073
|
_request_timeout: Union[
|
|
1014
1074
|
None,
|
|
1015
1075
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1023,14 +1083,18 @@ class VrificationPDFXMLApi:
|
|
|
1023
1083
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1024
1084
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1025
1085
|
) -> RESTResponseType:
|
|
1026
|
-
"""
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
:param
|
|
1031
|
-
:type
|
|
1032
|
-
:param
|
|
1033
|
-
:type
|
|
1086
|
+
"""Verify PDF/XML Factur-X compliance (asynchronous)
|
|
1087
|
+
|
|
1088
|
+
Verifies PDF/XML Factur-X compliance asynchronously. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will return a `NOT_FACTURX` error in the result. This version uses a Celery task and can call the OCR service if the PDF is an image or if `force_ocr=true`. **Returns immediately** a task ID. Use `/verify-async/{task_id}/status` to retrieve the result. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency **Advantages over synchronous version:** - OCR support for image PDFs (via DocTR service) - Longer timeout for large documents - Doesn't block the server ## Webhook notification (recommended) Instead of polling, you can receive a webhook notification when verification completes: ``` callback_url=https://your-server.com/webhook ``` The webhook will POST a JSON payload with: - `event_type`: `verification.completed` or `verification.failed` - `data.is_compliant`: Whether the PDF/XML are consistent - `data.compliance_score`: Compliance score (0-1) - `X-Webhook-Signature` header for HMAC verification
|
|
1089
|
+
|
|
1090
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1091
|
+
:type pdf_file: bytearray
|
|
1092
|
+
:param force_ocr: Force OCR usage even if PDF contains native text
|
|
1093
|
+
:type force_ocr: bool
|
|
1094
|
+
:param callback_url:
|
|
1095
|
+
:type callback_url: str
|
|
1096
|
+
:param webhook_mode: Webhook content delivery: 'inline' (base64 in payload) or 'download_url' (temporary URL, 1h TTL)
|
|
1097
|
+
:type webhook_mode: str
|
|
1034
1098
|
:param _request_timeout: timeout setting for this request. If one
|
|
1035
1099
|
number provided, it will be total request
|
|
1036
1100
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1053,9 +1117,11 @@ class VrificationPDFXMLApi:
|
|
|
1053
1117
|
:return: Returns the result object.
|
|
1054
1118
|
""" # noqa: E501
|
|
1055
1119
|
|
|
1056
|
-
_param = self.
|
|
1057
|
-
|
|
1058
|
-
|
|
1120
|
+
_param = self._verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
1121
|
+
pdf_file=pdf_file,
|
|
1122
|
+
force_ocr=force_ocr,
|
|
1123
|
+
callback_url=callback_url,
|
|
1124
|
+
webhook_mode=webhook_mode,
|
|
1059
1125
|
_request_auth=_request_auth,
|
|
1060
1126
|
_content_type=_content_type,
|
|
1061
1127
|
_headers=_headers,
|
|
@@ -1063,8 +1129,9 @@ class VrificationPDFXMLApi:
|
|
|
1063
1129
|
)
|
|
1064
1130
|
|
|
1065
1131
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1066
|
-
'202': "
|
|
1132
|
+
'202': "TaskResponse",
|
|
1067
1133
|
'422': "HTTPValidationError",
|
|
1134
|
+
'401': "APIError",
|
|
1068
1135
|
}
|
|
1069
1136
|
response_data = self.api_client.call_api(
|
|
1070
1137
|
*_param,
|
|
@@ -1073,10 +1140,12 @@ class VrificationPDFXMLApi:
|
|
|
1073
1140
|
return response_data.response
|
|
1074
1141
|
|
|
1075
1142
|
|
|
1076
|
-
def
|
|
1143
|
+
def _verify_pdf_async_api_v1_verification_verify_async_post_0_serialize(
|
|
1077
1144
|
self,
|
|
1078
|
-
|
|
1079
|
-
|
|
1145
|
+
pdf_file,
|
|
1146
|
+
force_ocr,
|
|
1147
|
+
callback_url,
|
|
1148
|
+
webhook_mode,
|
|
1080
1149
|
_request_auth,
|
|
1081
1150
|
_content_type,
|
|
1082
1151
|
_headers,
|
|
@@ -1101,10 +1170,14 @@ class VrificationPDFXMLApi:
|
|
|
1101
1170
|
# process the query parameters
|
|
1102
1171
|
# process the header parameters
|
|
1103
1172
|
# process the form parameters
|
|
1104
|
-
if
|
|
1105
|
-
_files['
|
|
1106
|
-
if
|
|
1107
|
-
_form_params.append(('
|
|
1173
|
+
if pdf_file is not None:
|
|
1174
|
+
_files['pdf_file'] = pdf_file
|
|
1175
|
+
if force_ocr is not None:
|
|
1176
|
+
_form_params.append(('force_ocr', force_ocr))
|
|
1177
|
+
if callback_url is not None:
|
|
1178
|
+
_form_params.append(('callback_url', callback_url))
|
|
1179
|
+
if webhook_mode is not None:
|
|
1180
|
+
_form_params.append(('webhook_mode', webhook_mode))
|
|
1108
1181
|
# process the body parameter
|
|
1109
1182
|
|
|
1110
1183
|
|
|
@@ -1137,7 +1210,7 @@ class VrificationPDFXMLApi:
|
|
|
1137
1210
|
|
|
1138
1211
|
return self.api_client.param_serialize(
|
|
1139
1212
|
method='POST',
|
|
1140
|
-
resource_path='/api/v1/verification/
|
|
1213
|
+
resource_path='/api/v1/verification/verify-async',
|
|
1141
1214
|
path_params=_path_params,
|
|
1142
1215
|
query_params=_query_params,
|
|
1143
1216
|
header_params=_header_params,
|
|
@@ -1154,9 +1227,9 @@ class VrificationPDFXMLApi:
|
|
|
1154
1227
|
|
|
1155
1228
|
|
|
1156
1229
|
@validate_call
|
|
1157
|
-
def
|
|
1230
|
+
def verify_pdf_sync_api_v1_verification_verify_post(
|
|
1158
1231
|
self,
|
|
1159
|
-
|
|
1232
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1160
1233
|
_request_timeout: Union[
|
|
1161
1234
|
None,
|
|
1162
1235
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1169,13 +1242,13 @@ class VrificationPDFXMLApi:
|
|
|
1169
1242
|
_content_type: Optional[StrictStr] = None,
|
|
1170
1243
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1171
1244
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1172
|
-
) ->
|
|
1173
|
-
"""
|
|
1245
|
+
) -> VerificationSuccessResponse:
|
|
1246
|
+
"""Verify PDF/XML Factur-X compliance (synchronous)
|
|
1174
1247
|
|
|
1175
|
-
|
|
1248
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
1176
1249
|
|
|
1177
|
-
:param
|
|
1178
|
-
:type
|
|
1250
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1251
|
+
:type pdf_file: bytearray
|
|
1179
1252
|
:param _request_timeout: timeout setting for this request. If one
|
|
1180
1253
|
number provided, it will be total request
|
|
1181
1254
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1198,8 +1271,8 @@ class VrificationPDFXMLApi:
|
|
|
1198
1271
|
:return: Returns the result object.
|
|
1199
1272
|
""" # noqa: E501
|
|
1200
1273
|
|
|
1201
|
-
_param = self.
|
|
1202
|
-
|
|
1274
|
+
_param = self._verify_pdf_sync_api_v1_verification_verify_post_serialize(
|
|
1275
|
+
pdf_file=pdf_file,
|
|
1203
1276
|
_request_auth=_request_auth,
|
|
1204
1277
|
_content_type=_content_type,
|
|
1205
1278
|
_headers=_headers,
|
|
@@ -1207,10 +1280,11 @@ class VrificationPDFXMLApi:
|
|
|
1207
1280
|
)
|
|
1208
1281
|
|
|
1209
1282
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1210
|
-
'200': "
|
|
1283
|
+
'200': "VerificationSuccessResponse",
|
|
1211
1284
|
'400': "APIError",
|
|
1212
1285
|
'413': "APIError",
|
|
1213
1286
|
'422': "HTTPValidationError",
|
|
1287
|
+
'401': "APIError",
|
|
1214
1288
|
}
|
|
1215
1289
|
response_data = self.api_client.call_api(
|
|
1216
1290
|
*_param,
|
|
@@ -1224,9 +1298,9 @@ class VrificationPDFXMLApi:
|
|
|
1224
1298
|
|
|
1225
1299
|
|
|
1226
1300
|
@validate_call
|
|
1227
|
-
def
|
|
1301
|
+
def verify_pdf_sync_api_v1_verification_verify_post_with_http_info(
|
|
1228
1302
|
self,
|
|
1229
|
-
|
|
1303
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1230
1304
|
_request_timeout: Union[
|
|
1231
1305
|
None,
|
|
1232
1306
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1239,13 +1313,13 @@ class VrificationPDFXMLApi:
|
|
|
1239
1313
|
_content_type: Optional[StrictStr] = None,
|
|
1240
1314
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1241
1315
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1242
|
-
) -> ApiResponse[
|
|
1243
|
-
"""
|
|
1316
|
+
) -> ApiResponse[VerificationSuccessResponse]:
|
|
1317
|
+
"""Verify PDF/XML Factur-X compliance (synchronous)
|
|
1244
1318
|
|
|
1245
|
-
|
|
1319
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
1246
1320
|
|
|
1247
|
-
:param
|
|
1248
|
-
:type
|
|
1321
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1322
|
+
:type pdf_file: bytearray
|
|
1249
1323
|
:param _request_timeout: timeout setting for this request. If one
|
|
1250
1324
|
number provided, it will be total request
|
|
1251
1325
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1268,8 +1342,8 @@ class VrificationPDFXMLApi:
|
|
|
1268
1342
|
:return: Returns the result object.
|
|
1269
1343
|
""" # noqa: E501
|
|
1270
1344
|
|
|
1271
|
-
_param = self.
|
|
1272
|
-
|
|
1345
|
+
_param = self._verify_pdf_sync_api_v1_verification_verify_post_serialize(
|
|
1346
|
+
pdf_file=pdf_file,
|
|
1273
1347
|
_request_auth=_request_auth,
|
|
1274
1348
|
_content_type=_content_type,
|
|
1275
1349
|
_headers=_headers,
|
|
@@ -1277,10 +1351,11 @@ class VrificationPDFXMLApi:
|
|
|
1277
1351
|
)
|
|
1278
1352
|
|
|
1279
1353
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1280
|
-
'200': "
|
|
1354
|
+
'200': "VerificationSuccessResponse",
|
|
1281
1355
|
'400': "APIError",
|
|
1282
1356
|
'413': "APIError",
|
|
1283
1357
|
'422': "HTTPValidationError",
|
|
1358
|
+
'401': "APIError",
|
|
1284
1359
|
}
|
|
1285
1360
|
response_data = self.api_client.call_api(
|
|
1286
1361
|
*_param,
|
|
@@ -1294,9 +1369,9 @@ class VrificationPDFXMLApi:
|
|
|
1294
1369
|
|
|
1295
1370
|
|
|
1296
1371
|
@validate_call
|
|
1297
|
-
def
|
|
1372
|
+
def verify_pdf_sync_api_v1_verification_verify_post_without_preload_content(
|
|
1298
1373
|
self,
|
|
1299
|
-
|
|
1374
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1300
1375
|
_request_timeout: Union[
|
|
1301
1376
|
None,
|
|
1302
1377
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1310,12 +1385,12 @@ class VrificationPDFXMLApi:
|
|
|
1310
1385
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1311
1386
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1312
1387
|
) -> RESTResponseType:
|
|
1313
|
-
"""
|
|
1388
|
+
"""Verify PDF/XML Factur-X compliance (synchronous)
|
|
1314
1389
|
|
|
1315
|
-
|
|
1390
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
1316
1391
|
|
|
1317
|
-
:param
|
|
1318
|
-
:type
|
|
1392
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1393
|
+
:type pdf_file: bytearray
|
|
1319
1394
|
:param _request_timeout: timeout setting for this request. If one
|
|
1320
1395
|
number provided, it will be total request
|
|
1321
1396
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1338,8 +1413,8 @@ class VrificationPDFXMLApi:
|
|
|
1338
1413
|
:return: Returns the result object.
|
|
1339
1414
|
""" # noqa: E501
|
|
1340
1415
|
|
|
1341
|
-
_param = self.
|
|
1342
|
-
|
|
1416
|
+
_param = self._verify_pdf_sync_api_v1_verification_verify_post_serialize(
|
|
1417
|
+
pdf_file=pdf_file,
|
|
1343
1418
|
_request_auth=_request_auth,
|
|
1344
1419
|
_content_type=_content_type,
|
|
1345
1420
|
_headers=_headers,
|
|
@@ -1347,10 +1422,11 @@ class VrificationPDFXMLApi:
|
|
|
1347
1422
|
)
|
|
1348
1423
|
|
|
1349
1424
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1350
|
-
'200': "
|
|
1425
|
+
'200': "VerificationSuccessResponse",
|
|
1351
1426
|
'400': "APIError",
|
|
1352
1427
|
'413': "APIError",
|
|
1353
1428
|
'422': "HTTPValidationError",
|
|
1429
|
+
'401': "APIError",
|
|
1354
1430
|
}
|
|
1355
1431
|
response_data = self.api_client.call_api(
|
|
1356
1432
|
*_param,
|
|
@@ -1359,9 +1435,9 @@ class VrificationPDFXMLApi:
|
|
|
1359
1435
|
return response_data.response
|
|
1360
1436
|
|
|
1361
1437
|
|
|
1362
|
-
def
|
|
1438
|
+
def _verify_pdf_sync_api_v1_verification_verify_post_serialize(
|
|
1363
1439
|
self,
|
|
1364
|
-
|
|
1440
|
+
pdf_file,
|
|
1365
1441
|
_request_auth,
|
|
1366
1442
|
_content_type,
|
|
1367
1443
|
_headers,
|
|
@@ -1386,8 +1462,8 @@ class VrificationPDFXMLApi:
|
|
|
1386
1462
|
# process the query parameters
|
|
1387
1463
|
# process the header parameters
|
|
1388
1464
|
# process the form parameters
|
|
1389
|
-
if
|
|
1390
|
-
_files['
|
|
1465
|
+
if pdf_file is not None:
|
|
1466
|
+
_files['pdf_file'] = pdf_file
|
|
1391
1467
|
# process the body parameter
|
|
1392
1468
|
|
|
1393
1469
|
|
|
@@ -1420,7 +1496,7 @@ class VrificationPDFXMLApi:
|
|
|
1420
1496
|
|
|
1421
1497
|
return self.api_client.param_serialize(
|
|
1422
1498
|
method='POST',
|
|
1423
|
-
resource_path='/api/v1/verification/
|
|
1499
|
+
resource_path='/api/v1/verification/verify',
|
|
1424
1500
|
path_params=_path_params,
|
|
1425
1501
|
query_params=_query_params,
|
|
1426
1502
|
header_params=_header_params,
|
|
@@ -1437,9 +1513,9 @@ class VrificationPDFXMLApi:
|
|
|
1437
1513
|
|
|
1438
1514
|
|
|
1439
1515
|
@validate_call
|
|
1440
|
-
def
|
|
1516
|
+
def verify_pdf_sync_api_v1_verification_verify_post_0(
|
|
1441
1517
|
self,
|
|
1442
|
-
|
|
1518
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1443
1519
|
_request_timeout: Union[
|
|
1444
1520
|
None,
|
|
1445
1521
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1452,13 +1528,13 @@ class VrificationPDFXMLApi:
|
|
|
1452
1528
|
_content_type: Optional[StrictStr] = None,
|
|
1453
1529
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1454
1530
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1455
|
-
) ->
|
|
1456
|
-
"""
|
|
1531
|
+
) -> VerificationSuccessResponse:
|
|
1532
|
+
"""Verify PDF/XML Factur-X compliance (synchronous)
|
|
1457
1533
|
|
|
1458
|
-
|
|
1534
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
1459
1535
|
|
|
1460
|
-
:param
|
|
1461
|
-
:type
|
|
1536
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1537
|
+
:type pdf_file: bytearray
|
|
1462
1538
|
:param _request_timeout: timeout setting for this request. If one
|
|
1463
1539
|
number provided, it will be total request
|
|
1464
1540
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1481,8 +1557,8 @@ class VrificationPDFXMLApi:
|
|
|
1481
1557
|
:return: Returns the result object.
|
|
1482
1558
|
""" # noqa: E501
|
|
1483
1559
|
|
|
1484
|
-
_param = self.
|
|
1485
|
-
|
|
1560
|
+
_param = self._verify_pdf_sync_api_v1_verification_verify_post_0_serialize(
|
|
1561
|
+
pdf_file=pdf_file,
|
|
1486
1562
|
_request_auth=_request_auth,
|
|
1487
1563
|
_content_type=_content_type,
|
|
1488
1564
|
_headers=_headers,
|
|
@@ -1490,10 +1566,11 @@ class VrificationPDFXMLApi:
|
|
|
1490
1566
|
)
|
|
1491
1567
|
|
|
1492
1568
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1493
|
-
'200': "
|
|
1569
|
+
'200': "VerificationSuccessResponse",
|
|
1494
1570
|
'400': "APIError",
|
|
1495
1571
|
'413': "APIError",
|
|
1496
1572
|
'422': "HTTPValidationError",
|
|
1573
|
+
'401': "APIError",
|
|
1497
1574
|
}
|
|
1498
1575
|
response_data = self.api_client.call_api(
|
|
1499
1576
|
*_param,
|
|
@@ -1507,9 +1584,9 @@ class VrificationPDFXMLApi:
|
|
|
1507
1584
|
|
|
1508
1585
|
|
|
1509
1586
|
@validate_call
|
|
1510
|
-
def
|
|
1587
|
+
def verify_pdf_sync_api_v1_verification_verify_post_0_with_http_info(
|
|
1511
1588
|
self,
|
|
1512
|
-
|
|
1589
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1513
1590
|
_request_timeout: Union[
|
|
1514
1591
|
None,
|
|
1515
1592
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1522,13 +1599,13 @@ class VrificationPDFXMLApi:
|
|
|
1522
1599
|
_content_type: Optional[StrictStr] = None,
|
|
1523
1600
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1524
1601
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1525
|
-
) -> ApiResponse[
|
|
1526
|
-
"""
|
|
1602
|
+
) -> ApiResponse[VerificationSuccessResponse]:
|
|
1603
|
+
"""Verify PDF/XML Factur-X compliance (synchronous)
|
|
1527
1604
|
|
|
1528
|
-
|
|
1605
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
1529
1606
|
|
|
1530
|
-
:param
|
|
1531
|
-
:type
|
|
1607
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1608
|
+
:type pdf_file: bytearray
|
|
1532
1609
|
:param _request_timeout: timeout setting for this request. If one
|
|
1533
1610
|
number provided, it will be total request
|
|
1534
1611
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1551,8 +1628,8 @@ class VrificationPDFXMLApi:
|
|
|
1551
1628
|
:return: Returns the result object.
|
|
1552
1629
|
""" # noqa: E501
|
|
1553
1630
|
|
|
1554
|
-
_param = self.
|
|
1555
|
-
|
|
1631
|
+
_param = self._verify_pdf_sync_api_v1_verification_verify_post_0_serialize(
|
|
1632
|
+
pdf_file=pdf_file,
|
|
1556
1633
|
_request_auth=_request_auth,
|
|
1557
1634
|
_content_type=_content_type,
|
|
1558
1635
|
_headers=_headers,
|
|
@@ -1560,10 +1637,11 @@ class VrificationPDFXMLApi:
|
|
|
1560
1637
|
)
|
|
1561
1638
|
|
|
1562
1639
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1563
|
-
'200': "
|
|
1640
|
+
'200': "VerificationSuccessResponse",
|
|
1564
1641
|
'400': "APIError",
|
|
1565
1642
|
'413': "APIError",
|
|
1566
1643
|
'422': "HTTPValidationError",
|
|
1644
|
+
'401': "APIError",
|
|
1567
1645
|
}
|
|
1568
1646
|
response_data = self.api_client.call_api(
|
|
1569
1647
|
*_param,
|
|
@@ -1577,9 +1655,9 @@ class VrificationPDFXMLApi:
|
|
|
1577
1655
|
|
|
1578
1656
|
|
|
1579
1657
|
@validate_call
|
|
1580
|
-
def
|
|
1658
|
+
def verify_pdf_sync_api_v1_verification_verify_post_0_without_preload_content(
|
|
1581
1659
|
self,
|
|
1582
|
-
|
|
1660
|
+
pdf_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Factur-X PDF file to verify")],
|
|
1583
1661
|
_request_timeout: Union[
|
|
1584
1662
|
None,
|
|
1585
1663
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1593,12 +1671,12 @@ class VrificationPDFXMLApi:
|
|
|
1593
1671
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1594
1672
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1595
1673
|
) -> RESTResponseType:
|
|
1596
|
-
"""
|
|
1674
|
+
"""Verify PDF/XML Factur-X compliance (synchronous)
|
|
1597
1675
|
|
|
1598
|
-
|
|
1676
|
+
Verifies compliance between the PDF and its embedded Factur-X XML. **IMPORTANT**: Only Factur-X PDFs (with embedded XML) are accepted. PDFs without Factur-X XML will be rejected with a 400 error. This synchronous version uses only native PDF extraction (pdfplumber). For image PDFs requiring OCR, use the `/verify-async` endpoint. **Verification principle (Factur-X 1.08):** - Principle #2: XML can only contain info present in the PDF - Principle #4: All XML info must be present and compliant in the PDF **Verified fields:** - Identification: BT-1 (invoice #), BT-2 (date), BT-3 (type), BT-5 (currency), BT-23 (framework) - Seller: BT-27 (name), BT-29 (SIRET), BT-30 (SIREN), BT-31 (VAT) - Buyer: BT-44 (name), BT-46 (SIRET), BT-47 (SIREN), BT-48 (VAT) - Amounts: BT-109 (excl. tax), BT-110 (VAT), BT-112 (incl. tax), BT-115 (amount due) - VAT breakdown: BT-116, BT-117, BT-118, BT-119 - Invoice lines: BT-153, BT-129, BT-146, BT-131 - Mandatory notes: PMT, PMD, AAB - Rule BR-FR-09: SIRET/SIREN consistency
|
|
1599
1677
|
|
|
1600
|
-
:param
|
|
1601
|
-
:type
|
|
1678
|
+
:param pdf_file: Factur-X PDF file to verify (required)
|
|
1679
|
+
:type pdf_file: bytearray
|
|
1602
1680
|
:param _request_timeout: timeout setting for this request. If one
|
|
1603
1681
|
number provided, it will be total request
|
|
1604
1682
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1621,8 +1699,8 @@ class VrificationPDFXMLApi:
|
|
|
1621
1699
|
:return: Returns the result object.
|
|
1622
1700
|
""" # noqa: E501
|
|
1623
1701
|
|
|
1624
|
-
_param = self.
|
|
1625
|
-
|
|
1702
|
+
_param = self._verify_pdf_sync_api_v1_verification_verify_post_0_serialize(
|
|
1703
|
+
pdf_file=pdf_file,
|
|
1626
1704
|
_request_auth=_request_auth,
|
|
1627
1705
|
_content_type=_content_type,
|
|
1628
1706
|
_headers=_headers,
|
|
@@ -1630,10 +1708,11 @@ class VrificationPDFXMLApi:
|
|
|
1630
1708
|
)
|
|
1631
1709
|
|
|
1632
1710
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1633
|
-
'200': "
|
|
1711
|
+
'200': "VerificationSuccessResponse",
|
|
1634
1712
|
'400': "APIError",
|
|
1635
1713
|
'413': "APIError",
|
|
1636
1714
|
'422': "HTTPValidationError",
|
|
1715
|
+
'401': "APIError",
|
|
1637
1716
|
}
|
|
1638
1717
|
response_data = self.api_client.call_api(
|
|
1639
1718
|
*_param,
|
|
@@ -1642,9 +1721,9 @@ class VrificationPDFXMLApi:
|
|
|
1642
1721
|
return response_data.response
|
|
1643
1722
|
|
|
1644
1723
|
|
|
1645
|
-
def
|
|
1724
|
+
def _verify_pdf_sync_api_v1_verification_verify_post_0_serialize(
|
|
1646
1725
|
self,
|
|
1647
|
-
|
|
1726
|
+
pdf_file,
|
|
1648
1727
|
_request_auth,
|
|
1649
1728
|
_content_type,
|
|
1650
1729
|
_headers,
|
|
@@ -1669,8 +1748,8 @@ class VrificationPDFXMLApi:
|
|
|
1669
1748
|
# process the query parameters
|
|
1670
1749
|
# process the header parameters
|
|
1671
1750
|
# process the form parameters
|
|
1672
|
-
if
|
|
1673
|
-
_files['
|
|
1751
|
+
if pdf_file is not None:
|
|
1752
|
+
_files['pdf_file'] = pdf_file
|
|
1674
1753
|
# process the body parameter
|
|
1675
1754
|
|
|
1676
1755
|
|
|
@@ -1703,7 +1782,7 @@ class VrificationPDFXMLApi:
|
|
|
1703
1782
|
|
|
1704
1783
|
return self.api_client.param_serialize(
|
|
1705
1784
|
method='POST',
|
|
1706
|
-
resource_path='/api/v1/verification/
|
|
1785
|
+
resource_path='/api/v1/verification/verify',
|
|
1707
1786
|
path_params=_path_params,
|
|
1708
1787
|
query_params=_query_params,
|
|
1709
1788
|
header_params=_header_params,
|