Convert an invoice
POST/invoices/convert
Converts the invoice in content and returns the converted document as it is, with the media type of to. Nothing is stored. Supported conversion: from=ksef_fa3 (KSeF FA(3) XML) to=peppol_ubl (Peppol UBL).
Request
Responses
- 200
- 400
- 401
- 403
- 406
- 413
- 415
- 422
- 500
- 503
The converted invoice, in the format of to. With to=peppol_ubl: application/xml.
The body is not a JSON object, or from, to, content or the metadata values are not strings.
The token is missing, expired or invalid. Send Authorization: Bearer <token>.
The account is not enabled for the Transfer API.
The Accept header does not allow the format of to.
The body exceeds 5 MiB. The response body is not JSON.
The Content-Type is not application/json.
The invoice was not converted: violations holds one entry per reason. CONVERSION_NOT_SUPPORTED for an unsupported from and to pair, METADATA_KEY_NOT_ACCEPTED for a metadata key not accepted with this from, CONTENT_NOT_BASE64 and CONTENT_NOT_WELL_FORMED for a content that is not base64 or not well-formed in the format of from, any other code for invoice content the conversion rejects.
The conversion failed. Nothing was stored.
The conversion service is busy or did not answer in time. Nothing was stored: you can send the invoice again.