{ "openapi": "3.0.1", "info": { "title": "ConvertAPI", "description": "# High-Performance File Conversion API\nConvert Word, Excel, PowerPoint, HTML, PDF and Image formats with our powerful file conversion service.\nWe support more than [200 file types.]( https://www.convertapi.com/doc/file-formats)", "termsOfService": "https://www.convertapi.com/terms", "contact": { "url": "https://www.convertapi.com/support", "email": "support@convertapi.com" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "v2" }, "servers": [ { "url": "https://v2.convertapi.com" }, { "url": "https://eu-v2.convertapi.com" }, { "url": "https://uk-v2.convertapi.com" }, { "url": "https://us-v2.convertapi.com" }, { "url": "https://ca-v2.convertapi.com" }, { "url": "https://as-v2.convertapi.com" }, { "url": "https://au-v2.convertapi.com" } ], "paths": { "/convert/peppol/to/pdf": { "summary": "Peppol Invoice to PDF API", "description": "Generate PDF invoices from Peppol BIS Billing 3.0 UBL XML files with invoice lines, VAT breakdown and contact details.", "post": { "tags": [ "Conversion" ], "externalDocs": { "description": "Read more about the converter", "url": "https://www.convertapi.com/peppol-to-pdf" }, "requestBody": { "content": { "multipart/form-data": { "schema": { "required": [ "File" ], "type": "object", "properties": { "Timeout": { "maximum": 1200, "minimum": 10, "type": "integer", "description": "Conversion timeout in seconds.", "default": 900, "x-ca-featured": false, "x-ca-label": "Timeout", "x-ca-group": "Execution", "x-ca-type": "Integer", "x-ca-representation": "Default", "x-ca-range": { "from": "10", "to": "1200" } }, "StoreFile": { "type": "boolean", "description": "When the `StoreFile` parameter is set to `True`, your converted file is written to ConvertAPI’s encrypted, temporary storage and made available via a time-limited secure download URL, valid for up to 3 hours. After this period, the file is permanently deleted.\r\n\r\nWhen `StoreFile` is set to `False`, conversion happens entirely in-memory. The raw file bytes are streamed back in the API response without touching disk or external storage, ensuring maximum security and zero persistence so that only you can access the content.\r\n", "default": false, "x-ca-featured": false, "x-ca-label": "Store file", "x-ca-group": "Output", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "File": { "type": "string", "description": "File to be converted. Value can be URL or file content.", "format": "binary", "x-ca-featured": true, "x-ca-label": "File", "x-ca-group": "Input", "x-ca-type": "File", "x-ca-representation": "Default", "x-ca-allowed-extensions": [ "xml" ] }, "FileName": { "type": "string", "description": "The `FileName` property defines the name of the output file(s) generated by the file conversion API, ensuring safe and\r\nunique file naming. It sanitizes input filenames to remove potentially harmful characters, automatically appends the\r\ncorrect file extension based on the target format, and includes an indexing feature to distinguish multiple output files\r\nfrom a single input. For example, converting `report.docx` to PDF format might result in `report.pdf` for a single file,\r\nor `report_0.pdf`, `report_1.pdf` for multiple files, ensuring each output file is uniquely identifiable.", "x-ca-featured": false, "x-ca-label": "Output file name", "x-ca-group": "Output", "x-ca-type": "String", "x-ca-representation": "Default", "x-ca-range": { "from": "1", "to": "200" } }, "PeppolTemplateFile": { "type": "string", "description": "Optional custom DOCX template used to render the Peppol invoice. The Peppol BIS Billing 3.0 (UBL) XML supplied as the source file is parsed and its values are substituted into the template's `{{placeholder}}` tokens. When this parameter is omitted, the bundled default template is used.\r\n\r\n#### Text placeholders\r\n\r\nInvoice identification:\r\n\r\n* `{{DocumentType}}` — human-readable document type, resolved from UBL `cbc:InvoiceTypeCode`: `380` → `INVOICE`, `381` → `CREDIT NOTE`, `384` → `CORRECTED INVOICE`. Other codes are emitted verbatim.\r\n* `{{InvoiceNumber}}` — UBL `cbc:ID` (e.g. `INV-2025-001`).\r\n* `{{IssueDate}}` — UBL `cbc:IssueDate` (e.g. `2025-03-12`).\r\n* `{{DueDate}}` — UBL `cbc:DueDate` (e.g. `2025-04-11`).\r\n* `{{Currency}}` — UBL `cbc:DocumentCurrencyCode` (e.g. `EUR`, `USD`).\r\n* `{{BuyerReference}}` — UBL `cbc:BuyerReference` (e.g. `PO-12345`).\r\n* `{{Note}}` — UBL `cbc:Note`.\r\n\r\nParties (supplier from `cac:AccountingSupplierParty`, customer from `cac:AccountingCustomerParty`):\r\n\r\n* `{{SupplierName}}` / `{{CustomerName}}` — `cac:PartyLegalEntity/cbc:RegistrationName`, falling back to `cac:PartyName/cbc:Name`.\r\n* `{{SupplierVatId}}` / `{{CustomerVatId}}` — first non-empty `cac:PartyTaxScheme/cbc:CompanyID`.\r\n* `{{SupplierAddress}}` / `{{CustomerAddress}}` — composed from `cac:PostalAddress` as `StreetName, CityName, PostalZone, Country` (empty parts skipped).\r\n\r\nContact (rendered inside `{{#IF ShowContactDetails}} ... {{#ENDIF ShowContactDetails}}`):\r\n\r\n* `{{SupplierContactName}}` / `{{CustomerContactName}}` — `cac:Contact/cbc:Name`.\r\n* `{{SupplierContactPhone}}` / `{{CustomerContactPhone}}` — `cac:Contact/cbc:Telephone`.\r\n* `{{SupplierContactEmail}}` / `{{CustomerContactEmail}}` — `cac:Contact/cbc:ElectronicMail`.\r\n\r\nTotals (from `cac:LegalMonetaryTotal` and `cac:TaxTotal`):\r\n\r\n* `{{TaxExclusiveAmount}}` — net total before tax.\r\n* `{{TaxAmount}}` — total VAT amount.\r\n* `{{PrepaidAmount}}` — amount already paid.\r\n* `{{PayableAmount}}` — final amount due.\r\n\r\nPayment (from `cac:PaymentMeans/cac:PayeeFinancialAccount`):\r\n\r\n* `{{PayeeIBAN}}` — account `cbc:ID`.\r\n* `{{PayeeAccountName}}` — account `cbc:Name`.\r\n\r\n#### Conditional sections\r\n\r\nWrap optional content in the template so it can be toggled via the `ShowContactDetails` and `ShowNote` parameters. The wrapper tags themselves are removed from the rendered output:\r\n\r\n* `{{#IF ShowContactDetails}} ... {{#ENDIF ShowContactDetails}}` — kept when `ShowContactDetails` is `true`; the whole block is removed when `false`.\r\n* `{{#IF ShowNote}} ... {{#ENDIF ShowNote}}` — kept when `ShowNote` is `true`; removed when `false`.\r\n\r\n#### Table placeholders\r\n\r\nPlace each table placeholder in a single cell of a one-row template table — the row is cloned for each item, preserving formatting.\r\n\r\n* `{{InvoiceLines}}` — one row per `cac:InvoiceLine`. Columns (in order): Description, Quantity, Unit Price, VAT %, Line Amount.\r\n* `{{VatBreakdown}}` — one row per `cac:TaxTotal/cac:TaxSubtotal`. Columns (in order):\r\n * VAT Category label — `VAT {percent}%` for rated categories (e.g. `VAT 21%`), or a descriptive label with UNTDID 5305 code for non-rated ones: `Standard rate (S)`, `Zero-rated (Z)`, `Exempt (E)`, `Reverse charge (AE)`, `Intra-community (K)`, `Export (G)`, `Out of scope (O)`, `Canary Islands IGIC (L)`, `Ceuta/Melilla IPSI (M)`.\r\n * Tax Amount with currency (e.g. `73.50 EUR`).\r\n * Rate % (e.g. `21%`, `8.5%`).\r\n * Taxable Amount.", "format": "binary", "x-ca-featured": false, "x-ca-label": "Peppol Template File", "x-ca-group": "Input", "x-ca-type": "File", "x-ca-representation": "Default", "x-ca-allowed-extensions": [ "docx" ] }, "ShowContactDetails": { "type": "boolean", "description": "When enabled, supplier and customer contact details (name, phone, email) are included in the rendered invoice; when disabled, the contact block is hidden.\r\n\r\nTakes effect by default when the bundled template is used. When a custom `PeppolTemplateFile` is supplied, the contact block must be wrapped with `{{#IF ShowContactDetails}} ... {{#ENDIF ShowContactDetails}}` for this parameter to have any effect.\r\n", "default": false, "x-ca-featured": false, "x-ca-label": "Show contact details", "x-ca-group": "Input", "x-ca-type": "Bool", "x-ca-representation": "Default" }, "ShowNote": { "type": "boolean", "description": "When enabled, the invoice note is included in the rendered invoice; when disabled, the note block is hidden.\r\n\r\nTakes effect by default when the bundled template is used. When a custom `PeppolTemplateFile` is supplied, the note block must be wrapped with `{{#IF ShowNote}} ... {{#ENDIF ShowNote}}` for this parameter to have any effect.\r\n", "default": false, "x-ca-featured": false, "x-ca-label": "Show note", "x-ca-group": "Input", "x-ca-type": "Bool", "x-ca-representation": "Default" } } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "ConversionCost": { "type": "integer", "description": "This amount will be deducted from your balance after the conversion.", "format": "int32", "example": 1 }, "Files": { "type": "array", "items": { "type": "object", "properties": { "FileName": { "type": "string", "description": "Name of the converted file.", "example": "myfile.pdf" }, "FileExt": { "type": "string", "description": "File type (file name extension)", "example": "pdf" }, "FileSize": { "type": "integer", "description": "File size", "format": "int32", "example": 111955 }, "FileId": { "type": "string", "description": "File ID", "example": "25811safe8e61dd3f51ef00ee5f58b92" }, "Url": { "type": "string", "description": "File URL", "example": "https://v2.convertapi.com/d/v01plsb72o0cmdooq90w4d1lnqsf6oy4/myfile.pdf" }, "FileData": { "type": "string", "description": "Base64 encoded file data", "format": "base64", "example": "JVBERi0xLjcKJb662+4KMSAwIG9iago8PC9UeXBlIC9DYXRhbG9n..." } } } } }, "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#applicationjson-1" } } }, "multipart/mixed": { "schema": { "type": "string", "format": "binary", "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#multipartmixed" } }, "example": "--43cf1475-ab15-4c6b-b5ee-e2cbcedfe92f\nConversionCost: 1\nContent-Type: application/octet-stream\nContent-Disposition: attachment; filename=\"my_file.pdf\"; size=8475\n\n--FILE CONTENT--\n--43cf1475-ab15-4c6b-b5ee-e2cbcedfe92f--\n" }, "application/octet-stream": { "schema": { "type": "string", "format": "binary", "externalDocs": { "url": "https://www.convertapi.com/doc/content-types#applicationoctet-stream-1" } } } } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "415": { "$ref": "#/components/responses/415" }, "500": { "$ref": "#/components/responses/500" }, "503": { "$ref": "#/components/responses/503" } }, "security": [ { "secret": [ ] }, { "token": [ ] }, { "jwt": [ ] } ] }, "x-ca-overview": "Peppol Invoice to PDF API turns a structured Peppol BIS Billing 3.0 (UBL) XML invoice into a professionally rendered PDF document. The API extracts invoice header fields, supplier and customer details, monetary totals, invoice line items, and VAT breakdown from the Peppol XML and renders them into a ready-to-share PDF. Conditional sections such as contact details and free-form notes can be toggled on or off, giving you full control over the final layout. Use this API to automate the generation of compliant electronic invoices in PDF format directly from your accounting or ERP system.\n", "x-ca-overview-markdown": "Peppol Invoice to PDF API turns a structured Peppol BIS Billing 3.0 (UBL) XML invoice into a professionally rendered PDF document. The API extracts invoice header fields, supplier and customer details, monetary totals, invoice line items, and VAT breakdown from the Peppol XML and renders them into a ready-to-share PDF. Conditional sections such as contact details and free-form notes can be toggled on or off, giving you full control over the final layout. Use this API to automate the generation of compliant electronic invoices in PDF format directly from your accounting or ERP system.", "x-ca-meta-title": "Peppol Invoice to PDF API - Generate PDFs from Peppol UBL XML", "x-ca-meta-description": "Convert Peppol BIS Billing 3.0 (UBL) invoice XML to a PDF document. Supports invoice lines, VAT breakdown, and optional contact and note blocks.", "x-ca-keywords": "", "x-ca-source-formats": "xml", "x-ca-destination-formats": "pdf", "x-ca-tags": [ "einvoice", "pdf" ] } }, "components": { "schemas": { "fileId": { "maxLength": 32, "minLength": 32, "type": "string", "description": "Uploaded File ID", "example": "25811safe8e61dd3f51ef00ee5f58b92" }, "error": { "type": "object", "properties": { "Code": { "type": "integer", "description": "Error message code", "format": "int32", "example": 4000 }, "Message": { "type": "string", "description": "Error message text", "example": "Parameter validation error." } }, "externalDocs": { "url": "https://www.convertapi.com/doc/response-codes" } } }, "responses": { "400": { "description": "Malformed request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "401": { "description": "Authentication error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "415": { "description": "File type error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "500": { "description": "Conversion failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } }, "503": { "description": "Conversion rate limit error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error" } } } } }, "parameters": { "fileId": { "name": "fileId", "in": "path", "description": "File ID", "required": true, "schema": { "$ref": "#/components/schemas/fileId" } }, "src": { "name": "src", "in": "path", "description": "Source file format (docx, pdf, jpg etc.)", "required": true, "schema": { "type": "string" } }, "dst": { "name": "dst", "in": "path", "description": "Destination file format (docx, pdf, jpg etc.)", "required": true, "schema": { "type": "string" } } }, "headers": { "content-disposition": { "description": "File information ([docummentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition))", "schema": { "type": "string" } }, "file-name": { "description": "File name", "schema": { "type": "string" } }, "file-ext": { "description": "File name extension", "schema": { "type": "string" } }, "file-size": { "description": "File size", "schema": { "type": "integer" } } }, "securitySchemes": { "secret": { "type": "http", "description": "[Get `Secret`](https://www.convertapi.com/a/secret)", "scheme": "bearer" }, "token": { "type": "http", "description": "[Get `Token`](https://www.convertapi.com/a/api-tokens)", "scheme": "bearer" }, "jwt": { "type": "http", "description": "[Get `JWT`](https://www.convertapi.com/a/jwt-tokens)", "scheme": "bearer", "bearerFormat": "JWT" } } }, "tags": [ { "name": "Conversion", "description": "File Conversion API call", "externalDocs": { "description": "File Conversion related operations", "url": "https://www.convertapi.com/doc/content-types" } }, { "name": "File Server", "description": "ConvertAPI temporary file storage", "externalDocs": { "description": "File Server related operations", "url": "https://www.convertapi.com/doc/upload" } }, { "name": "User", "description": "API User", "externalDocs": { "description": "API User related operations", "url": "https://www.convertapi.com/doc/user" } } ], "externalDocs": { "description": "Find out more about ConvertAPI", "url": "https://www.convertapi.com/doc" } }