GET
Obtenir una miniatura processada d'un fitxer d'un document entrant
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.
Paràmetres
Paràmetres de ruta
incomingDocumentId
stringobligatoriID del document entrant (ObjectId hexadecimal de 24 caràcters)
filename
stringobligatoriNom del fitxer
Paràmetres de consulta
width
integeropcionalAmplada en píxels
"32""40""86""248"height
integeropcionalAlç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/pngstring<binary>
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Document o fitxer no trobatapplication/json429Límit de sol·licituds exceditapplication/json