POST
Adjuntar un fitxer a un pressupost
Scope:
sales:estimates.writehttps://api.holded.com/api/v2/estimates/{estimateId}/attachmentsAdjunta un fitxer a un pressupost. Envia el fitxer com a `multipart/form-data`.
Paràmetres
Paràmetres de ruta
estimateId
stringobligatoriID del pressupost (ObjectId hexadecimal de 24 caràcters)
Cos de la petició
object
filestring<binary>
The file to attach
Petició
python
import requests
url = "https://api.holded.com/api/v2/estimates/{estimateId}/attachments"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
}
files = {"file": open("file.pdf", "rb")}
response = requests.post(url, headers=headers, files=files)
print(response.json())Respostes
Resposta
json
{
"id": "507f1f77bcf86cd799439011"
}Respostes exitoses
201Fitxer adjuntapplication/jsonobject
idstring
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Pressupost no trobatapplication/json429Límit de sol·licituds exceditapplication/json