Saltar al contingut principal
GET

Obtenir una miniatura processada d'un fitxer d'un document entrant

Scope:inbox:inbox.read
https://api.holded.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.

Paràmetres

Paràmetres de ruta

incomingDocumentIdstringobligatori

ID del document entrant (ObjectId hexadecimal de 24 caràcters)

filenamestringobligatori

Nom del fitxer

Paràmetres de consulta

widthintegeropcional

Amplada en píxels

"32""40""86""248"
heightintegeropcional

Alçada en píxels

"32""40"

Petició

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())

Respostes

Resposta

json
"string"

Respostes exitoses

200Miniatura PNG processadaimage/png
string<binary>

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Document o fitxer no trobatapplication/json
429Límit de sol·licituds exceditapplication/json