Frequently Asked Question

Convert - Convert files between various formats
Last Updated 11 days ago

FileConvert API

Overview

This API allows you to convert files between different formats using the unoconv utility. It supports various conversions including spreadsheets, documents, and presentations.

Endpoint

/v2/fileconvert

Method

POST only

Authentication

API key required in the request header:

X-API-Key: your_api_key

Request Parameters

Parameter Type Required Description
File File Yes The file to be converted
f String Yes Conversion function (e.g., XLSX2PDF)

Supported Conversion Functions

  • ODS2XLSX - Convert OpenDocument Spreadsheet to Excel
  • ODS2CSV - Convert OpenDocument Spreadsheet to CSV
  • CSV2ODS - Convert CSV to OpenDocument Spreadsheet
  • CSV2XLSX - Convert CSV to Excel
  • XLSX2ODS - Convert Excel to OpenDocument Spreadsheet
  • XLSX2CSV - Convert Excel to CSV
  • DOC2PDF - Convert Word Document to PDF
  • DOCX2PDF - Convert Word Document to PDF
  • XLS2PDF - Convert Excel to PDF
  • XLSX2PDF - Convert Excel to PDF
  • PPT2PDF - Convert PowerPoint to PDF
  • PPTX2PDF - Convert PowerPoint to PDF

Response

On success, the API returns the converted file with appropriate Content-Type and Content-Disposition headers for download.

On failure, the API returns a JSON response with error details:

{
    "status": "error",
    "message": "Error message description",
    "details": "Additional error details (if available)"
}

Example Usage

Using cURL

curl -X POST \
-H "X-API-Key: your_api_key" \
-F "File=@/path/to/your/document.xlsx" \
-F "f=XLSX2PDF" \
"https://api-url/v2/fileconvert" \
--output converted_document.pdf

Using HTML Form with JavaScript

Convert

Error Codes

Error Description
No file uploaded or upload error The file was not properly uploaded or there was an error during upload
Invalid conversion function The specified conversion function is not supported
File conversion failed The conversion process failed, check the details field for more information
unauthorised Invalid or missing API key
insufficient credit Your account does not have sufficient credit to perform this operation
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...