Class: FactPulse::ChorusProApi
- Inherits:
-
Object
- Object
- FactPulse::ChorusProApi
- Defined in:
- lib/factpulse/api/chorus_pro_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(request_body, opts = {}) ⇒ Object
Add an attachment Add an attachment to the current user account.
-
#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Add an attachment Add an attachment to the current user account.
-
#completer_facture_api_v1_chorus_pro_factures_completer_post(request_body, opts = {}) ⇒ Object
Complete a suspended invoice (Supplier) Complete a SUSPENDUE status invoice by adding attachments or a comment.
-
#completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Complete a suspended invoice (Supplier) Complete a SUSPENDUE status invoice by adding attachments or a comment.
-
#consulter_facture_api_v1_chorus_pro_factures_consulter_post(get_invoice_request, opts = {}) ⇒ GetInvoiceResponse
Consult invoice status Retrieves the information and current status of an invoice submitted to Chorus Pro.
-
#consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(get_invoice_request, opts = {}) ⇒ Array<(GetInvoiceResponse, Integer, Hash)>
Consult invoice status Retrieves the information and current status of an invoice submitted to Chorus Pro.
-
#consulter_structure_api_v1_chorus_pro_structures_consulter_post(get_structure_request, opts = {}) ⇒ GetStructureResponse
Consult structure details Retrieves detailed information about a Chorus Pro structure.
-
#consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(get_structure_request, opts = {}) ⇒ Array<(GetStructureResponse, Integer, Hash)>
Consult structure details Retrieves detailed information about a Chorus Pro structure.
-
#initialize(api_client = ApiClient.default) ⇒ ChorusProApi
constructor
A new instance of ChorusProApi.
-
#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(id_structure_cpp, opts = {}) ⇒ SearchServicesResponse
List structure services Retrieves the list of active services for a public structure.
-
#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts = {}) ⇒ Array<(SearchServicesResponse, Integer, Hash)>
List structure services Retrieves the list of active services for a public structure.
-
#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(get_chorus_pro_id_request, opts = {}) ⇒ GetChorusProIdResponse
Utility: Get Chorus Pro ID from SIRET **Convenient utility** to get a structure’s Chorus Pro ID from its SIRET.
-
#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(get_chorus_pro_id_request, opts = {}) ⇒ Array<(GetChorusProIdResponse, Integer, Hash)>
Utility: Get Chorus Pro ID from SIRET **Convenient utility** to get a structure's Chorus Pro ID from its SIRET.
-
#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(request_body, opts = {}) ⇒ Object
Search received invoices (Recipient) Search invoices received by the connected recipient.
-
#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search received invoices (Recipient) Search invoices received by the connected recipient.
-
#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(request_body, opts = {}) ⇒ Object
Search issued invoices (Supplier) Search invoices issued by the connected supplier.
-
#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search issued invoices (Supplier) Search invoices issued by the connected supplier.
-
#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(search_structure_request, opts = {}) ⇒ SearchStructureResponse
Search Chorus Pro structures Search for structures (companies, administrations) registered on Chorus Pro.
-
#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(search_structure_request, opts = {}) ⇒ Array<(SearchStructureResponse, Integer, Hash)>
Search Chorus Pro structures Search for structures (companies, administrations) registered on Chorus Pro.
-
#recycler_facture_api_v1_chorus_pro_factures_recycler_post(request_body, opts = {}) ⇒ Object
Recycle an invoice (Supplier) Recycle an invoice with A_RECYCLER status by modifying routing data.
-
#recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Recycle an invoice (Supplier) Recycle an invoice with A_RECYCLER status by modifying routing data.
-
#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(submit_invoice_request, opts = {}) ⇒ SubmitInvoiceResponse
Submit an invoice to Chorus Pro Submits an electronic invoice to a public structure via Chorus Pro.
-
#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(submit_invoice_request, opts = {}) ⇒ Array<(SubmitInvoiceResponse, Integer, Hash)>
Submit an invoice to Chorus Pro Submits an electronic invoice to a public structure via Chorus Pro.
-
#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(request_body, opts = {}) ⇒ Object
Download a group of invoices Download one or more invoices (max 10 recommended) with their attachments.
-
#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Download a group of invoices Download one or more invoices (max 10 recommended) with their attachments.
-
#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(request_body, opts = {}) ⇒ Object
Process a received invoice (Recipient) Change the status of a received invoice.
-
#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Process a received invoice (Recipient) Change the status of a received invoice.
-
#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(request_body, opts = {}) ⇒ Object
Consult an invoice (Validator).
-
#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Consult an invoice (Validator).
-
#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(request_body, opts = {}) ⇒ Object
Search invoices to validate (Validator) Search invoices pending validation by the connected validator.
-
#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search invoices to validate (Validator) Search invoices pending validation by the connected validator.
-
#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(request_body, opts = {}) ⇒ Object
Validate or reject an invoice (Validator) Validate or reject an invoice pending validation.
-
#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Validate or reject an invoice (Validator) Validate or reject an invoice pending validation.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ChorusProApi
Returns a new instance of ChorusProApi.
19 20 21 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(request_body, opts = {}) ⇒ Object
Add an attachment Add an attachment to the current user account. **Max size**: 10 MB per file **Example payload**: “‘json { "pieceJointeFichier": "JVBERi0xLjQKJeLjz9MKNSAwIG9iago8P…", "pieceJointeNom": "purchase_order.pdf", "pieceJointeTypeMime": "application/pdf", "pieceJointeExtension": "PDF" } “` Returns: The attachment ID (`pieceJointeIdFichier`) to use in `/factures/completer`. **Accepted extensions**: PDF, JPG, PNG, ZIP, XML, etc.
27 28 29 30 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 27 def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post(request_body, opts = {}) data, _status_code, _headers = ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts) data end |
#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Add an attachment Add an attachment to the current user account. **Max size**: 10 MB per file **Example payload**: ```json { "pieceJointeFichier": "JVBERi0xLjQKJeLjz9MKNSAwIG9iago8P…", "pieceJointeNom": "purchase_order.pdf", "pieceJointeTypeMime": "application/pdf", "pieceJointeExtension": "PDF" } ``` Returns: The attachment ID (`pieceJointeIdFichier`) to use in `/factures/completer`. **Accepted extensions**: PDF, JPG, PNG, ZIP, XML, etc.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 37 def ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post" end # resource path local_var_path = '/api/v1/chorus-pro/transverses/ajouter-fichier' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#completer_facture_api_v1_chorus_pro_factures_completer_post(request_body, opts = {}) ⇒ Object
Complete a suspended invoice (Supplier) Complete a SUSPENDUE status invoice by adding attachments or a comment. **Required status**: SUSPENDUE **Possible actions**: - Add attachments (supporting documents, purchase orders, etc.) - Modify comment **Example payload**: “‘json { "identifiantFactureCPP": 12345, "commentaire": "Here are the requested documents", "listePiecesJointes": [ { "pieceJointeIdFichier": 98765, "pieceJointeNom": "purchase_order.pdf" } ] } “` Note: Attachments must first be uploaded via `/transverses/ajouter-fichier`. **After completion**: The invoice returns to MISE_A_DISPOSITION status.
95 96 97 98 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 95 def completer_facture_api_v1_chorus_pro_factures_completer_post(request_body, opts = {}) data, _status_code, _headers = completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts) data end |
#completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Complete a suspended invoice (Supplier) Complete a SUSPENDUE status invoice by adding attachments or a comment. **Required status**: SUSPENDUE **Possible actions**: - Add attachments (supporting documents, purchase orders, etc.) - Modify comment **Example payload**: ```json { "identifiantFactureCPP": 12345, "commentaire": "Here are the requested documents", "listePiecesJointes": [ { "pieceJointeIdFichier": 98765, "pieceJointeNom": "purchase_order.pdf" } ] } ``` Note: Attachments must first be uploaded via `/transverses/ajouter-fichier`. **After completion**: The invoice returns to MISE_A_DISPOSITION status.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 105 def completer_facture_api_v1_chorus_pro_factures_completer_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/completer' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.completer_facture_api_v1_chorus_pro_factures_completer_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#completer_facture_api_v1_chorus_pro_factures_completer_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#consulter_facture_api_v1_chorus_pro_factures_consulter_post(get_invoice_request, opts = {}) ⇒ GetInvoiceResponse
Consult invoice status Retrieves the information and current status of an invoice submitted to Chorus Pro. Returns: - Invoice number and date - Total gross amount - **Current status**: SOUMISE, VALIDEE, REJETEE, SUSPENDUE, MANDATEE, MISE_EN_PAIEMENT, etc. - Recipient structure **Use cases**: - Track the processing progress of an invoice - Check if an invoice has been validated or rejected - Get the payment date Polling: Call this endpoint regularly to track status changes.
163 164 165 166 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 163 def consulter_facture_api_v1_chorus_pro_factures_consulter_post(get_invoice_request, opts = {}) data, _status_code, _headers = consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(get_invoice_request, opts) data end |
#consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(get_invoice_request, opts = {}) ⇒ Array<(GetInvoiceResponse, Integer, Hash)>
Consult invoice status Retrieves the information and current status of an invoice submitted to Chorus Pro. Returns: - Invoice number and date - Total gross amount - **Current status**: SOUMISE, VALIDEE, REJETEE, SUSPENDUE, MANDATEE, MISE_EN_PAIEMENT, etc. - Recipient structure **Use cases**: - Track the processing progress of an invoice - Check if an invoice has been validated or rejected - Get the payment date Polling: Call this endpoint regularly to track status changes.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 173 def consulter_facture_api_v1_chorus_pro_factures_consulter_post_with_http_info(get_invoice_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post ...' end # verify the required parameter 'get_invoice_request' is set if @api_client.config.client_side_validation && get_invoice_request.nil? fail ArgumentError, "Missing the required parameter 'get_invoice_request' when calling ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/consulter' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_invoice_request) # return_type return_type = opts[:debug_return_type] || 'GetInvoiceResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.consulter_facture_api_v1_chorus_pro_factures_consulter_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#consulter_facture_api_v1_chorus_pro_factures_consulter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#consulter_structure_api_v1_chorus_pro_structures_consulter_post(get_structure_request, opts = {}) ⇒ GetStructureResponse
Consult structure details Retrieves detailed information about a Chorus Pro structure. Returns: - Company name - Intra-EU VAT number - Contact email - **Required parameters**: Indicates if service code and/or engagement number are required to submit an invoice **Typical step**: Called after ‘search-structures` to know which fields are mandatory before submitting an invoice.
231 232 233 234 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 231 def consulter_structure_api_v1_chorus_pro_structures_consulter_post(get_structure_request, opts = {}) data, _status_code, _headers = consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(get_structure_request, opts) data end |
#consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(get_structure_request, opts = {}) ⇒ Array<(GetStructureResponse, Integer, Hash)>
Consult structure details Retrieves detailed information about a Chorus Pro structure. Returns: - Company name - Intra-EU VAT number - Contact email - **Required parameters**: Indicates if service code and/or engagement number are required to submit an invoice **Typical step**: Called after `search-structures` to know which fields are mandatory before submitting an invoice.
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 241 def consulter_structure_api_v1_chorus_pro_structures_consulter_post_with_http_info(get_structure_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post ...' end # verify the required parameter 'get_structure_request' is set if @api_client.config.client_side_validation && get_structure_request.nil? fail ArgumentError, "Missing the required parameter 'get_structure_request' when calling ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post" end # resource path local_var_path = '/api/v1/chorus-pro/structures/consulter' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_structure_request) # return_type return_type = opts[:debug_return_type] || 'GetStructureResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.consulter_structure_api_v1_chorus_pro_structures_consulter_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#consulter_structure_api_v1_chorus_pro_structures_consulter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(id_structure_cpp, opts = {}) ⇒ SearchServicesResponse
List structure services Retrieves the list of active services for a public structure. **Use cases**: - List available services for an administration - Verify that a service code exists before submitting an invoice Returns: - List of services with their code, label, and status (active/inactive)
299 300 301 302 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 299 def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get(id_structure_cpp, opts = {}) data, _status_code, _headers = lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts) data end |
#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts = {}) ⇒ Array<(SearchServicesResponse, Integer, Hash)>
List structure services Retrieves the list of active services for a public structure. **Use cases**: - List available services for an administration - Verify that a service code exists before submitting an invoice Returns: - List of services with their code, label, and status (active/inactive)
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 309 def lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get_with_http_info(id_structure_cpp, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get ...' end # verify the required parameter 'id_structure_cpp' is set if @api_client.config.client_side_validation && id_structure_cpp.nil? fail ArgumentError, "Missing the required parameter 'id_structure_cpp' when calling ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get" end # resource path local_var_path = '/api/v1/chorus-pro/structures/{id_structure_cpp}/services'.sub('{' + 'id_structure_cpp' + '}', CGI.escape(id_structure_cpp.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SearchServicesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(get_chorus_pro_id_request, opts = {}) ⇒ GetChorusProIdResponse
Utility: Get Chorus Pro ID from SIRET **Convenient utility** to get a structure’s Chorus Pro ID from its SIRET. This wrapper function combines: 1. Searching for the structure by SIRET 2. Extracting the ‘id_structure_cpp` if a single structure is found Returns: - `id_structure_cpp`: Chorus Pro ID (0 if not found or multiple results) - `designation_structure`: Structure name (if found) - `message`: Explanatory message **Use cases**: - Shortcut to directly get the Chorus Pro ID before submitting an invoice - Simplified alternative to `search-structures` + manual ID extraction Note: If multiple structures match the SIRET (rare), returns 0 and an error message.
362 363 364 365 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 362 def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post(get_chorus_pro_id_request, opts = {}) data, _status_code, _headers = obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(get_chorus_pro_id_request, opts) data end |
#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(get_chorus_pro_id_request, opts = {}) ⇒ Array<(GetChorusProIdResponse, Integer, Hash)>
Utility: Get Chorus Pro ID from SIRET **Convenient utility** to get a structure's Chorus Pro ID from its SIRET. This wrapper function combines: 1. Searching for the structure by SIRET 2. Extracting the `id_structure_cpp` if a single structure is found Returns: - `id_structure_cpp`: Chorus Pro ID (0 if not found or multiple results) - `designation_structure`: Structure name (if found) - `message`: Explanatory message **Use cases**: - Shortcut to directly get the Chorus Pro ID before submitting an invoice - Simplified alternative to `search-structures` + manual ID extraction Note: If multiple structures match the SIRET (rare), returns 0 and an error message.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 372 def obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post_with_http_info(get_chorus_pro_id_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post ...' end # verify the required parameter 'get_chorus_pro_id_request' is set if @api_client.config.client_side_validation && get_chorus_pro_id_request.nil? fail ArgumentError, "Missing the required parameter 'get_chorus_pro_id_request' when calling ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post" end # resource path local_var_path = '/api/v1/chorus-pro/structures/obtenir-id-depuis-siret' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_chorus_pro_id_request) # return_type return_type = opts[:debug_return_type] || 'GetChorusProIdResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#obtenir_id_chorus_pro_depuis_siret_api_v1_chorus_pro_structures_obtenir_id_depuis_siret_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(request_body, opts = {}) ⇒ Object
Search received invoices (Recipient) Search invoices received by the connected recipient. Filters: - Downloaded / not downloaded - Reception dates - Status (MISE_A_DISPOSITION, SUSPENDUE, etc.) - Supplier **Useful indicator**: ‘factureTelechargeeParDestinataire` indicates whether the invoice has already been downloaded.
430 431 432 433 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 430 def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post(request_body, opts = {}) data, _status_code, _headers = rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts) data end |
#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search received invoices (Recipient) Search invoices received by the connected recipient. Filters: - Downloaded / not downloaded - Reception dates - Status (MISE_A_DISPOSITION, SUSPENDUE, etc.) - Supplier **Useful indicator**: `factureTelechargeeParDestinataire` indicates whether the invoice has already been downloaded.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 440 def rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/rechercher-destinataire' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(request_body, opts = {}) ⇒ Object
Search issued invoices (Supplier) Search invoices issued by the connected supplier. **Available filters**: - Invoice number - Dates (start/end) - Status - Recipient structure - Amount **Use cases**: - Track issued invoices - Verify statuses - Export for accounting
498 499 500 501 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 498 def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post(request_body, opts = {}) data, _status_code, _headers = rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts) data end |
#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search issued invoices (Supplier) Search invoices issued by the connected supplier. **Available filters**: - Invoice number - Dates (start/end) - Status - Recipient structure - Amount **Use cases**: - Track issued invoices - Verify statuses - Export for accounting
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 508 def rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/rechercher-fournisseur' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(search_structure_request, opts = {}) ⇒ SearchStructureResponse
Search Chorus Pro structures Search for structures (companies, administrations) registered on Chorus Pro. **Use cases**: - Find the Chorus Pro ID of a structure from its SIRET - Check if a structure is registered on Chorus Pro - List structures matching criteria **Available filters**: - Identifier (SIRET, SIREN, etc.) - Company name - Identifier type - Private structures only **Typical step**: Called before ‘submit-invoice` to get the recipient’s ‘id_structure_cpp`.
566 567 568 569 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 566 def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post(search_structure_request, opts = {}) data, _status_code, _headers = rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(search_structure_request, opts) data end |
#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(search_structure_request, opts = {}) ⇒ Array<(SearchStructureResponse, Integer, Hash)>
Search Chorus Pro structures Search for structures (companies, administrations) registered on Chorus Pro. **Use cases**: - Find the Chorus Pro ID of a structure from its SIRET - Check if a structure is registered on Chorus Pro - List structures matching criteria **Available filters**: - Identifier (SIRET, SIREN, etc.) - Company name - Identifier type - Private structures only **Typical step**: Called before `submit-invoice` to get the recipient's `id_structure_cpp`.
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 576 def rechercher_structures_api_v1_chorus_pro_structures_rechercher_post_with_http_info(search_structure_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post ...' end # verify the required parameter 'search_structure_request' is set if @api_client.config.client_side_validation && search_structure_request.nil? fail ArgumentError, "Missing the required parameter 'search_structure_request' when calling ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post" end # resource path local_var_path = '/api/v1/chorus-pro/structures/rechercher' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(search_structure_request) # return_type return_type = opts[:debug_return_type] || 'SearchStructureResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.rechercher_structures_api_v1_chorus_pro_structures_rechercher_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#rechercher_structures_api_v1_chorus_pro_structures_rechercher_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#recycler_facture_api_v1_chorus_pro_factures_recycler_post(request_body, opts = {}) ⇒ Object
Recycle an invoice (Supplier) Recycle an invoice with A_RECYCLER status by modifying routing data. **Required status**: A_RECYCLER **Modifiable fields**: - Recipient (‘idStructureCPP`) - Service code - Engagement number **Use cases**: - Wrong recipient - Change of billing service - Update engagement number **Example payload**: “`json { "identifiantFactureCPP": 12345, "idStructureCPP": 67890, "codeService": "SERVICE_01", "numeroEngagement": "ENG2024001" } “` Note: The invoice keeps its number and amounts, only routing fields change.
634 635 636 637 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 634 def recycler_facture_api_v1_chorus_pro_factures_recycler_post(request_body, opts = {}) data, _status_code, _headers = recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts) data end |
#recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Recycle an invoice (Supplier) Recycle an invoice with A_RECYCLER status by modifying routing data. **Required status**: A_RECYCLER **Modifiable fields**: - Recipient (`idStructureCPP`) - Service code - Engagement number **Use cases**: - Wrong recipient - Change of billing service - Update engagement number **Example payload**: ```json { "identifiantFactureCPP": 12345, "idStructureCPP": 67890, "codeService": "SERVICE_01", "numeroEngagement": "ENG2024001" } ``` Note: The invoice keeps its number and amounts, only routing fields change.
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 644 def recycler_facture_api_v1_chorus_pro_factures_recycler_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/recycler' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.recycler_facture_api_v1_chorus_pro_factures_recycler_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#recycler_facture_api_v1_chorus_pro_factures_recycler_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(submit_invoice_request, opts = {}) ⇒ SubmitInvoiceResponse
Submit an invoice to Chorus Pro Submits an electronic invoice to a public structure via Chorus Pro. **Complete workflow**: 1. **Upload the Factur-X PDF** via ‘/transverses/ajouter-fichier` → retrieve `pieceJointeId` 2. **Get the structure ID** via `/structures/rechercher` or `/structures/obtenir-id-depuis-siret` 3. **Check mandatory parameters** via `/structures/consulter` 4. **Submit the invoice** with the `piece_jointe_principale_id` obtained in step 1 Prerequisites: 1. Have the recipient’s ‘id_structure_cpp` (via `/structures/rechercher`) 2. Know the mandatory parameters (via `/structures/consulter`): - Service code if `code_service_doit_etre_renseigne=true` - Engagement number if `numero_ej_doit_etre_renseigne=true` 3. Have uploaded the Factur-X PDF (via `/transverses/ajouter-fichier`) **Expected format**: - `piece_jointe_principale_id`: ID returned by `/transverses/ajouter-fichier` - Amounts: Strings with 2 decimals (e.g., "1250.50") - Dates: ISO 8601 format (YYYY-MM-DD) Returns: - `identifiant_facture_cpp`: Chorus Pro ID of the created invoice - `numero_flux_depot`: Deposit tracking number **Possible statuses after submission**: - SOUMISE: Pending validation - VALIDEE: Validated by recipient - REJETEE: Rejected (data error or business refusal) - SUSPENDUE: Pending additional information Note: Use `/factures/consulter` to track status changes.
702 703 704 705 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 702 def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post(submit_invoice_request, opts = {}) data, _status_code, _headers = soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(submit_invoice_request, opts) data end |
#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(submit_invoice_request, opts = {}) ⇒ Array<(SubmitInvoiceResponse, Integer, Hash)>
Submit an invoice to Chorus Pro Submits an electronic invoice to a public structure via Chorus Pro. **Complete workflow**: 1. **Upload the Factur-X PDF** via `/transverses/ajouter-fichier` → retrieve `pieceJointeId` 2. **Get the structure ID** via `/structures/rechercher` or `/structures/obtenir-id-depuis-siret` 3. **Check mandatory parameters** via `/structures/consulter` 4. **Submit the invoice** with the `piece_jointe_principale_id` obtained in step 1 Prerequisites: 1. Have the recipient's `id_structure_cpp` (via `/structures/rechercher`) 2. Know the mandatory parameters (via `/structures/consulter`): - Service code if `code_service_doit_etre_renseigne=true` - Engagement number if `numero_ej_doit_etre_renseigne=true` 3. Have uploaded the Factur-X PDF (via `/transverses/ajouter-fichier`) **Expected format**: - `piece_jointe_principale_id`: ID returned by `/transverses/ajouter-fichier` - Amounts: Strings with 2 decimals (e.g., "1250.50") - Dates: ISO 8601 format (YYYY-MM-DD) Returns: - `identifiant_facture_cpp`: Chorus Pro ID of the created invoice - `numero_flux_depot`: Deposit tracking number **Possible statuses after submission**: - SOUMISE: Pending validation - VALIDEE: Validated by recipient - REJETEE: Rejected (data error or business refusal) - SUSPENDUE: Pending additional information Note: Use `/factures/consulter` to track status changes.
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 712 def soumettre_facture_api_v1_chorus_pro_factures_soumettre_post_with_http_info(submit_invoice_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post ...' end # verify the required parameter 'submit_invoice_request' is set if @api_client.config.client_side_validation && submit_invoice_request.nil? fail ArgumentError, "Missing the required parameter 'submit_invoice_request' when calling ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/soumettre' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(submit_invoice_request) # return_type return_type = opts[:debug_return_type] || 'SubmitInvoiceResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.soumettre_facture_api_v1_chorus_pro_factures_soumettre_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#soumettre_facture_api_v1_chorus_pro_factures_soumettre_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(request_body, opts = {}) ⇒ Object
Download a group of invoices Download one or more invoices (max 10 recommended) with their attachments. **Available formats**: - PDF: PDF file only - XML: XML file only - ZIP: Archive containing PDF + XML + attachments **Maximum size**: 120 MB per download **Example payload**: “‘json { "listeIdentifiantsFactureCPP": [12345, 12346], "inclurePiecesJointes": true, "formatFichier": "ZIP" } “` Returns: The file is base64-encoded in the `fichierBase64` field. Note: The `factureTelechargeeParDestinataire` flag is automatically updated.
770 771 772 773 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 770 def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post(request_body, opts = {}) data, _status_code, _headers = telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts) data end |
#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Download a group of invoices Download one or more invoices (max 10 recommended) with their attachments. **Available formats**: - PDF: PDF file only - XML: XML file only - ZIP: Archive containing PDF + XML + attachments **Maximum size**: 120 MB per download **Example payload**: ```json { "listeIdentifiantsFactureCPP": [12345, 12346], "inclurePiecesJointes": true, "formatFichier": "ZIP" } ``` Returns: The file is base64-encoded in the `fichierBase64` field. Note: The `factureTelechargeeParDestinataire` flag is automatically updated.
780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 780 def telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/telecharger-groupe' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(request_body, opts = {}) ⇒ Object
Process a received invoice (Recipient) Change the status of a received invoice. **Possible statuses**: - MISE_A_DISPOSITION: Invoice accepted - SUSPENDUE: Pending additional information (reason required) - REJETEE: Invoice refused (reason required) - MANDATEE: Invoice mandated - MISE_EN_PAIEMENT: Invoice being paid - COMPTABILISEE: Invoice accounted - MISE_A_DISPOSITION_COMPTABLE: Made available to accounting - A_RECYCLER: To be recycled - COMPLETEE: Completed - SERVICE-FAIT: Service rendered - PRISE_EN_COMPTE_DESTINATAIRE: Acknowledged - TRANSMISE_MOA: Transmitted to MOA **Example payload**: “‘json { "identifiantFactureCPP": 12345, "nouveauStatut": "REJETEE", "motifRejet": "Duplicate invoice", "commentaire": "Invoice already received under reference ABC123" } “` Rules: - A reason is required for SUSPENDUE and REJETEE - Only certain statuses are allowed depending on the invoice’s current status
838 839 840 841 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 838 def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post(request_body, opts = {}) data, _status_code, _headers = traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts) data end |
#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Process a received invoice (Recipient) Change the status of a received invoice. **Possible statuses**: - MISE_A_DISPOSITION: Invoice accepted - SUSPENDUE: Pending additional information (reason required) - REJETEE: Invoice refused (reason required) - MANDATEE: Invoice mandated - MISE_EN_PAIEMENT: Invoice being paid - COMPTABILISEE: Invoice accounted - MISE_A_DISPOSITION_COMPTABLE: Made available to accounting - A_RECYCLER: To be recycled - COMPLETEE: Completed - SERVICE-FAIT: Service rendered - PRISE_EN_COMPTE_DESTINATAIRE: Acknowledged - TRANSMISE_MOA: Transmitted to MOA **Example payload**: ```json { "identifiantFactureCPP": 12345, "nouveauStatut": "REJETEE", "motifRejet": "Duplicate invoice", "commentaire": "Invoice already received under reference ABC123" } ``` Rules: - A reason is required for SUSPENDUE and REJETEE - Only certain statuses are allowed depending on the invoice's current status
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 848 def traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/traiter-facture-recue' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(request_body, opts = {}) ⇒ Object
Consult an invoice (Validator)
905 906 907 908 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 905 def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post(request_body, opts = {}) data, _status_code, _headers = valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts) data end |
#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Consult an invoice (Validator)
914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 914 def valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/valideur/consulter' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(request_body, opts = {}) ⇒ Object
Search invoices to validate (Validator) Search invoices pending validation by the connected validator. Role: Validator in the internal validation workflow. Filters: Dates, structure, service, etc.
972 973 974 975 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 972 def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post(request_body, opts = {}) data, _status_code, _headers = valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts) data end |
#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Search invoices to validate (Validator) Search invoices pending validation by the connected validator. Role: Validator in the internal validation workflow. Filters: Dates, structure, service, etc.
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 982 def valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/valideur/rechercher' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(request_body, opts = {}) ⇒ Object
Validate or reject an invoice (Validator) Validate or reject an invoice pending validation. Actions: - Validate: The invoice moves to the next status in the workflow - Reject: The invoice is rejected (reason required)
1040 1041 1042 1043 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 1040 def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post(request_body, opts = {}) data, _status_code, _headers = valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts) data end |
#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Validate or reject an invoice (Validator) Validate or reject an invoice pending validation. Actions: - Validate: The invoice moves to the next status in the workflow - Reject: The invoice is rejected (reason required)
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 |
# File 'lib/factpulse/api/chorus_pro_api.rb', line 1050 def valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post" end # resource path local_var_path = '/api/v1/chorus-pro/factures/valideur/traiter' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ChorusProApi.valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ChorusProApi#valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |