Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
POST

Attach a file to a credit note

Scope: sales:invoices.write https://api.alladdin.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

creditNoteId string required

Credit Note ID (24-char hex ObjectId)

Request body

object file string<binary>

Request

python
import requests

url = "https://api.alladdin.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

201 File attached application/json object id string

Error responses

400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Credit note not found. application/json 429 Rate limit exceeded application/json 500 Internal server error application/json object type string title string status integer detail string

← PreviousApprove a credit note →

Next →Send a credit note by email →