Transform API: convert document formats

Convert documents between e-invoicing formats without sending them via the Transform endpoint.

The Transform API lets you convert a document from one e-invoicing format to another without sending or storing it in the PSB. This is useful for testing transformations before going live, or for manually converting documents for partners that require a specific format.

Endpoint
POST /api/v1/generic/transform?targetFormat={URN}

Send the source document as the request body with content type application/xml. The targetFormat parameter contains the URN of the desired target format.

How does it work?
  1. Upload: send the XML document to the endpoint with the desired target format
  2. Detection: the PSB automatically detects the source format based on the XML content
  3. Transformation: the document is converted to the specified target format
  4. Response: the converted document is returned directly as XML

If automatic detection of the source format fails, you can specify it explicitly via the sourceFormat parameter:

POST /api/v1/generic/transform?targetFormat={URN}&sourceFormat={URN}
Examples

From NLCIUS to Peppol BIS Billing V3:

POST /api/v1/generic/transform?targetFormat=urn:cen.eu:en16931:2017%23compliant%23urn:fdc:peppol.eu:2017:poacc:billing:3.0

From UBL to CII (Cross Industry Invoice):

POST /api/v1/generic/transform?targetFormat=urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100

Note: URL-encode the URN values in the query parameters. The # character must be encoded as %23.

Supported transformations

Not all transformations are available. The PSB supports the same transformations as when sending and receiving documents. The most commonly used transformations include conversions between UBL and CII, and between different regional variants (NLCIUS, XRechnung, Factur-X).

Which transformations are available exactly depends on the current transformation table of the PSB. Consult psb.econnect.eu for the most up-to-date overview.

Error handling
Status codeMeaning200 OKTransformation succeeded, converted document in response body400 Bad RequestSource format not recognised or transformation not supported422 UnprocessableDocument cannot be converted (missing or invalid data)
When to use?
  • Testing before going live: verify that your documents are transformed correctly before you launch your integration
  • Manual conversion: convert documents for partners that require a different format
  • Comparison: generate the same document in multiple formats to verify the mapping

Note: The Transform API does not store the document and does not trigger webhooks. The document is transformed in-memory and returned directly.


Check the full API specification at psb.econnect.eu for all supported formats and URN values.

Try it in the API