Skip to main content
POST

Attach a file to a credit note

Scope:sales:invoices.write
https://api.holded.com/api/v2/credit-notes/{creditNoteId}/attachments

Attaches a file to a credit note. Send the file as `multipart/form-data`. Maximum file size is 10 MB.

Parameters

Path parameters

creditNoteIdstringrequired

Credit Note ID (24-char hex ObjectId)

Request body

object
filestring<binary>

Request

python
import requests

url = "https://api.holded.com/api/v2/credit-notes/{creditNoteId}/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/json
object
idstring

Error responses

400Bad requestapplication/json
401Invalid or missing API keyapplication/json
403Insufficient permissionsapplication/json
404Credit note not found.application/json
429Rate limit exceededapplication/json
500Internal server errorapplication/json
object
typestring
titlestring
statusinteger
detailstring