e-invoicing

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 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

ITRC_to_PDF
Converts the Ricevuta Consigna XML received as a confirmation in Italy to a PDF document using the official stylesheet.
PDF_fatturaordinaria_v1.2
Converts an Italian B2B clearance invoice into a PDF document.
PDF_fatturapa_v1.2
Converts an Italian B2G clearance invoice into a PDF document.
SCI_to_GST
Converts the Sovos Canonical Invoice format to the JSON format required for clearance in India.
xRechnungPortrait
Converts a German xRechnung XML invoice into a PDF document with portrait orientation.
xRechnungLandscape
Converts a German xRechnung XML invoice into a PDF document with landscape orientation.
xRechnungZugferdPortrait
Converts a German xRechnung XML invoice into a German Zugferd PDF document with portrait orientation and an embedded xRechnung file.
xRechnungZugferdLandscape
Converts a German xRechnung XML invoice into a German Zugferd PDF document with landscape orientation and an embedded xRechnung file.

Transform a document through the API

Before transforming a document:

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.

  1. Build the Transform request with the transformation name and the input document or documents.

    Request type tas:TransformRequest extends tac:TrustArchiveRequest.

    Element Type Cardinality Description
    Transform xs:string 1 The name of the transformation to apply. See Supported transformations.
    InputDocuments tas:InputDocuments 1 The input document or documents to transform. Each document is provided as a Base64-encoded string.

    Example request:

    CODE
    <Transform
      xmlns="http://www.trustweaver.com/trustarchive/storage/v1">
      <Request xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <TransactionId
          xmlns="http://www.trustweaver.com/trustarchive/common/v1"
          >3311b...</TransactionId>
        <Transform>DEFAULT</Transform>
        <InputDocuments>
          <InputDocument>ABCD1234</InputDocument>
        </InputDocuments>
      </Request>
    </Transform>
  2. Send the request to the storage service endpoint using HTTPS with client certificate authentication.
  3. Retrieve the transformed document from the TransformResponse.

    Result type: tas:TransformResult.

    Element Type Description
    OutputDocument xs:base64Binary The transformed document, encoded in Base64

    Example response:

    CODE
    <TransformResponse
      xmlns="http://www.trustweaver.com/trustarchive/storage/v1">
      <Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <OutputDocument>ABCD1234</OutputDocument>
      </Result>
    </TransformResponse>

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.