API Flows
Outbound document flow
Within this flow, the client system interacts with the Marosa API to generate and issue a document to the customer or to the appropriate tax authority according to the provided country code.
The client system must implement a periodic mechanism to obtain document status updates. This may be accomplished either through the filtered and paginated listing endpoint (as shown in the diagram below) or by invoking the individual Get Document endpoint using the document ID returned during the processing request.
The Marosa API offers two distinct issuance flows, which are detailed below.
Onbound single document
The API supports single document issuance via the POST /document endpoint, which accepts documents in JSON or UBL 2.1 format.
Upon successful validation, the document is asynchronously routed to the Marosa system for processing and submission. The total processing time may vary according to the destination country, applicable status workflows, and other operational factors.
The diagram below outlines the document processing workflow, including client-side polling for documents ISSUED in Error or OK status and the optional download of the corresponding document file.
Document may be retrieved in various formats, including PDF and XML.
Onbound document batch
The API enables batch document processing via the POST /batch endpoint. Clients must submit a list of documents to be processed within the request payload.
Each document undergoes validation. Upon successful validation, the system generates a batch event and one document-create event per document, which are dispatched to the Marosa core system for asynchronous processing.
The diagram below outlines the document processing workflow, including client-side polling for documents ISSUED in Error or OK status, using the batch id and the optional download of the corresponding document file.
Document may be retrieved in various formats, including PDF and XML.
Inbound document flow
In the incoming (received) documents flow, documents addressed to the company are delivered via polling or webhook, depending on the integration model implemented for the respective country.
Once these invoices are registered in the Marosa system, the client must periodically retrieve invoices in Error or OK status within the RECEIVED flow, following the same polling mechanism described earlier for issued invoices.
Inbound document
The diagram below outlines the document processing workflow, including client-side polling for documents RECEIVED in Error or OK status and the optional download of the corresponding document file.
Document may be retrieved in various formats, including PDF and XML.
Updated 24 days ago