Skip to content

Convert artifact to target format

POST/office/documents/{id}/convert

Converts an existing render artifact to a new output format (e.g. PDF to DOCX, or XLSX to ODS). The conversion is queued as a background job. Poll the returned job ID to retrieve the converted artifact when complete.

Request

Path parameters

NameTypeRequiredDescription
idintegerYes

The numeric ID of the document artifact to convert.

Request body

Content type application/json (required).

FieldTypeRequiredDescription
target_formatstringYes

The target output format to convert the document to.

One of: "pdf", "docx", "odt", "xlsx", "ods", "pptx", "odp"

Example

{
  "target_format": "docx"
}

Responses

202 Conversion job queued

Content type application/json, object.

FieldTypeRequiredDescription
job_idintegerNo

ID of the conversion render job to poll for completion.

Example

{
  "job_id": 92
}

404 Document not found

422 target_format is invalid or same as existing format

Example request

curl -X POST "https://{tenant}.faciotech.net/api/v1/office/documents/{id}/convert" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"target_format": "docx"}'
Loading