UploadBillFile
Attaches one file to a bill of the API key’s supplier and company. A bill needs at least one file before it can be submitted. The file is visible to the company and to the supplier in the portal. How keys and responses work is on Vendor bills.
Send the request as multipart/form-data with two parts: BillID and the file.
POST /api/public/uploadbillfileAPIKey: your-api-keyContent-Type: multipart/form-data; boundary=...For example, with curl:
curl -H "APIKey: your-api-key" -F "BillID=109827" -F "file=@INV-2026-0042.pdf" https://trakit.example.com/api/public/uploadbillfileReplace https://trakit.example.com with your TrakIT address. Send one file per request; to attach
several, send several requests.
| Rule | Info when it fails |
|---|---|
The request has a BillID of a bill of the key’s supplier and company. |
BillID is required, Bill not found |
| The request has exactly one file. | Attach one file, Send one file per request |
| The file is at most 20 MB. | File size cannot exceed 20 MB |
| The file name is at most 100 characters. | File name cannot exceed 100 characters |
| The file is of a type TrakIT accepts from external users. The list is set for each TrakIT installation; by default it is PDF, PNG and JPG. | File type must be ..., followed by the accepted types |
| The bill is a draft, or was rejected. | Files can be changed only while the bill is a draft or has been rejected |
| The bill has no file of the same name and size yet. | A file of the same name and size already exists |
Response
Section titled “Response”On success, Identity is the new file’s ID and RetInfo names the bill and the file:
{ "Code": 1, "Info": "", "RetInfo": { "BillID": 109827, "AttID": 195285, "FileName": "INV-2026-0042.pdf" }, "RowsAffected": 0, "Scalar": null, "Identity": 195285}
