Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
GET

Get a processed thumbnail of a file from an inbox document

Scope: inbox:inbox.read https://api.alladdin.com/api/v2/inbox/{incomingDocumentId}/files/{filename}/preview

Returns 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 string required

Incoming document identifier

filename string required

Name of the file to retrieve

Query parameters

width integer optional

Target 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 integer optional

Target 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.alladdin.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

200 Processed image thumbnail image/png string<binary>

Error responses

401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Document or file not found application/json 429 Rate limit exceeded application/json

← PreviousDownload a file from an inbox document →

Next →Delete an incoming document →