Skip to content

HTTP API

Check the PDF copy

GET
/v1/documents/{document_id}/renditions/{format}
curl --request GET \
--url https://sergo.example.com/v1/documents/example/renditions/example \
--header 'Authorization: Bearer <token>'

Whether an Office file has a PDF copy yet. Page pictures use it, and its pages are the page numbers of the chunks. format is pdf.

document_id
required
Document Id
string
format
required
Format
string

Successful Response

Media typeapplication/json
Rendition
object
state
required
State

done when the copy is ready; none when there is none

string
Allowed values: none queued running done failed
reason
required
Reason

Why there is no copy, when it failed

Any of:
string
page_count
required
Page Count
Any of:
integer

Example

{
"state": "none"
}

Validation Error

Media typeapplication/json
RequestError
object
code
required
Code
string
Allowed value: invalid_request
message
required
Message

What was wrong, field by field

string

Example

{
"code": "invalid_request"
}