Skip to content

CreateBill

Creates a bill in Draft for the supplier and company of the API key. Attach the scanned bill with uploadbillfile, then send it to the company with submitbill. How keys, responses and statuses work is on Vendor bills.

POST /api/public/createbill
APIKey: your-api-key
Content-Type: application/json
{
"BillNumber": "INV-2026-0042",
"BillDate": "2026-10-20",
"CurrCode": "USD",
"Amount": 1000.00,
"Tax": 150.00
}
Field Required Meaning
BillNumber Yes The supplier’s bill number. TrakIT stores it in capitals, without spaces.
BillDate Yes The date of the bill, as yyyy-MM-dd.
CurrCode Yes The currency of the bill, for example USD.
Amount Yes The amount before tax.
Tax No The tax. The bill’s total is Amount + Tax.

The supplier and company come from the key, so the request does not name them.

Rule Info when it fails
A bill number is required, of at most 30 characters. Bill Number is required, Bill Number cannot exceed 30 characters
A bill number can be used once per supplier. Bill Number specified already exists for this entity and office
The bill date is a date as yyyy-MM-dd. BillDate must be a date as yyyy-MM-dd
The bill date is not in the future. Bill Date cannot be in the future
The bill date is no more than 30 days old. Bill Date cannot be older than 30 days
The currency is one the company bills in. Select a currency that company bills in
The amount is more than zero. Total Amount must be positive
The tax is not negative. Tax Amount cannot be negative
The tax is at most a quarter of the total. Tax Amount cannot exceed 25% of Billed Amount

The company may have extra checks of its own on new bills. Their messages come back in Info the same way.

On success, Identity is the new bill’s ID and RetInfo is the bill, with the status Draft.

{
"Code": 1,
"Info": "",
"RetInfo": {
"BillID": 109827,
"BillNumber": "INV-2026-0042",
"BillDate": "2026-10-20",
"DueDate": null,
"CurrCode": "USD",
"Amount": 1000.00,
"TaxAmount": 150.00,
"Total": 1150.00,
"AdjTotal": 0.00,
"PaidAmount": 0.00,
"Outstanding": 1150.00,
"Status": "Draft",
"Remarks": "",
"FileCount": 0,
"Company": "Example Logistics Ltd"
},
"RowsAffected": 0,
"Scalar": null,
"Identity": 109827
}

If a request times out, check whether the bill was created before you send it again: see Retries.