GET
Get a processed thumbnail of a file from an inbox document
Scope:
inbox:inbox.readhttps://api.holded.com/api/v2/inbox/{incomingDocumentId}/files/{filename}/previewReturns a PNG thumbnail of the file, resized to one of a closed set of platform widths. Omitting both width and height returns the original image unresized.
Parameters
Path parameters
incomingDocumentId
stringrequiredIncoming document identifier
filename
stringrequiredName of the file to retrieve
Query parameters
width
integeroptionalTarget width in pixels. Must be one of the allowed platform presets; any other value returns 404. Omit together with height to get the original image unresized.
"32""40""86""248"height
integeroptionalTarget height in pixels. Optional: only allowed when equal to width and width is one of the platform square presets, to request an exact square crop instead of an auto height.
"32""40"Request
python
import requests
url = "https://api.holded.com/api/v2/inbox/507f1f77bcf86cd799439011/files/document.pdf/preview?width=86&height=40"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Responses
Response
json
"string"Success responses
200Processed image thumbnailimage/pngstring<binary>
Error responses
401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Document or file not foundapplication/json429Rate limit exceededapplication/json