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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The numeric ID of the document artifact to convert. |
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
target_format | string | Yes | The target output format to convert the document to. One of: |
Example
{
"target_format": "docx"
}
Responses
202 Conversion job queued
Content type application/json, object.
| Field | Type | Required | Description |
|---|---|---|---|
job_id | integer | No | 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"}'