API Purchase/Create can't set an arbitrary VAT amount

Creating purchase invoices from the API I find that if the VatTotal value is even a single or a few pence more than it should apparently be then I get an error "VAT amount supplied exceeds that permitted by the rate on item row 1. "

I’m able to set a difference of up to 9p by hand, which should be plenty to allow for my suppliers’ terrible rounding… any chance we can have this same slack amount in the API?

Thanks.

Hi @Nurg

I’ve actually been using function myself recently through the JSON endpoint, without any issues.

Would you mind adding some examples of the code you’re sending please so we can take a closer look?

Hi, this is the PurchaseData sub-block. As you can see, the VAT is 2p more than it should be. This supplier is consistently 1-2p out on rounding VAT and they aren’t even my worst offender. I removed the SupplierID and SupplierReference, let me know if you want those numbers.

"PurchaseData": {
    "SupplierID": xxx,
    "ReceiptDate": "2017-06-09",
    "TermDays": "30",
    "Currency": "GBP",
    "InvoiceDescription": "Items",
    "SupplierReference": "yyy",
    "InvoiceLines": [
        {
            "ItemLine": {
                "ItemNominalCode": "5000",
                "ItemDescription": "Items",
                "SubTotal": 715.41,
                "VatRate": "20",
                "VatTotal": "143.10"
            }
        }
    ]
}

Thanks! I’ve asked our development team to take a look and will come back to you.

I can report that this seems to be fixed now, my invoice with wonky VAT has been inserted correctly. Thanks.

1 Like