Skip to main content
Request the PDF preview of a file

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Path Parameters

hash
string
required

Hash of the office file to preview.

Minimum string length: 1
Pattern: ^[a-z0-9]+$
Example:

"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"

Response

Returns where the preview of the file stands.

content
string | null

Identifier of the PDF preview in the binary storage, set once the preview is ready. The preview is a separate stored file and is downloaded like any other file.

Example:

"p7kd2m4s9xq1v8b3n6c0z5w2e7r4t1y9u3i6o8a2s5d7f0g4h1j3k6l9z2x5c8v0b4"

failureReason
enum<string> | null

Why the last attempt to generate the preview failed; empty unless it failed.

  • conversion_error: The converter could not read the file, for example because it is damaged or its content does not match its type.
  • file_too_large: The file is larger than the biggest file a PDF preview is generated for.
  • service_error: The conversion service failed or could not be reached.
  • timeout: The conversion did not finish in time.
Available options:
conversion_error,
file_too_large,
service_error,
timeout,
null
hash
string

Identifier of the file the preview belongs to.

Example:

"as0ia4jdqecwq0u5s1omd9krs4u244ic2n2545kyhyat9imkwyg1bgec16r94tth"

status
enum<string> | null

Where generating the preview stands.

  • failed_irrecoverable: The file cannot be turned into a PDF preview - its content was rejected or it is too large - and it is not tried again.
  • failed_recoverable: The last attempt failed for a reason that may pass, such as a timeout or an unavailable conversion service. The next request for the preview tries again once the retry cooldown has passed.
  • finished: The PDF preview is ready and content identifies it.
  • in_progress: The PDF preview is being generated.
Available options:
failed_irrecoverable,
failed_recoverable,
finished,
in_progress,
null
statusDate
string<date-time> | null

When the preview last changed its status - when generating it started, finished or failed.