POST
Attach a file to an estimate
Scope:
sales:estimates.writehttps://api.holded.com/api/v2/estimates/{estimateId}/attachmentsAttaches a file to an estimate. Send the file as `multipart/form-data`. Maximum file size is 10 MB. Attached files are visible in the estimate detail view. A signed-in user with limited access to estimates only reaches the estimates assigned to them or created by them; any other is reported as not found. API keys still need the scope of this endpoint.
Parameters
Path parameters
estimateId
stringrequiredEstimate ID (24-char hex ObjectId)
Request body
object
filestring<binary>
The file to attach
Request
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())Responses
Response
json
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201File attachedapplication/jsonobject
idstring
Error responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Estimate not foundapplication/json429Rate limit exceededapplication/json