Skip to main content



No record found.

Business Central forum

Creating Purchase Invoice "Lines" with multiple VAT Rates via API V2

Posted on by 5
I'm currently trying to create Purchase invoices with lines using the below documentation below,
I will only be creating lines with the type /G/L Account/ and need to have the ability to set different VAT Codes (VAT Prod Posting Groups) on each line.
For example: i buy a range of food and drink items from a supplier, some of which is taxed and some of which is not but all items fall under the same G/L Account.
When i try to create a line and populate the /taxcode/ with one of my VAT Prod posting groups it seems to get ignored and the VAT Prod Posting Group on each line is blank.
The provided example is not great as it only shows the Type /Item/ and lists the tax code as /Furniture/
Am i correct in saying that the /taxcode/ field above relates to the code in the table  below? 
Any insight as to why this isn't working  or how i can get around this would be greatly appreciated .

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans