Mapping
Mapping converts XML documents from one format to another using the Transform endpoint, allowing documents to be mapped to the required format before compliance processing.
The Transform operation converts one or more XML or XHTML input documents to a different output format. The particular transformation to apply is identified by name, and the name also determines the required input format. The result is always a single output document. Multiple input documents can be provided when the target format requires data that is not available in a single source document.
Sovos sets up the transformations available to your configuration and they depend on your contract. Contact Sovos Support to confirm which transformation names are active for your implementation. For the integration steps, see Transform a document through the API.
Supported transformations
| Country | Transform name | Purpose |
|---|---|---|
| Italy | PDF_fatturapa_v1.2 | Converts a FatturaPA B2G document to PDF |
| PDF_fatturaordinaria_v1.2 | Converts a Fattura Ordinaria document to PDF | |
| ITRC_to_PDF | Converts a Ricevuta di Consegna document to PDF | |
| cXML_to_FatturaPA_005 | Converts a cXML document to the FatturaPA format | |
| FatturaPA_to_cXML_005 | Converts a FatturaPA document to cXML | |
| India | SCI_to_GST | Converts the Sovos Canonical Invoice (SCI) format to the JSON structure required for clearance in India |
| Germany | xRechnungPortrait | Converts the xRechnung format to a portrait PDF |
| xRechnungLandscape | Converts the xRechnung format to a landscape PDF | |
| N/A | cXML_to_SCI | Converts a cXML document to the Sovos Canonical Invoice (SCI) format |
| XHTML_to_PDF_PORTRAIT | Converts any XHTML document to a portrait PDF |
Transform a document through the API
Before transforming a document:
- Your application must be authenticated with a valid X.509v3 client certificate.
- The input document must be a well-formed XML document.
- You must know the name of the transformation to apply. See the supported transformations.
The Transform operation converts one or more XML documents to a different format. The transformation to apply is identified by name and also determines the required input format. The result is always a single output document. Multiple input documents can be provided when the target format requires data that is not available in a single source document.
The document has been transformed. The OutputDocument element contains the result as a Base64-encoded string.
For error codes returned by this operation, see Storage service error codes.
