Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

API- salesInvoiceLine - POST tax amount directly

(0) ShareShare
ReportReport
Posted on by 2,843

Hi All

I'm following the example below to insert taxPercent and totalTaxAmount but these fields are set as read-only.  Bit confused as this is the official example of the POST request:

Create salesInvoiceLines - Business Central | Microsoft Docs

POST https://{businesscentralPrefix}/api/v2.0/companies({id})/salesInvoices({id})/salesInvoiceLines
Content-type: application/json

{
"id": "238cb9c0-44e3-ea11-bb43-000d3a2feca1",
"documentId": "9e0f5c9c-44e3-ea11-bb43-000d3a2feca1",
"sequence": 10000,
"itemId": "02a6738a-44e3-ea11-bb43-000d3a2feca1",
"accountId": "00000000-0000-0000-0000-000000000000",
"lineType": "Item",
"lineObjectNumber": "1928-S",
"description": "AMSTERDAM Lamp",
"unitOfMeasureId": "5ca6738a-44e3-ea11-bb43-000d3a2feca1",
"unitOfMeasureCode": "PCS",
"unitPrice": 54.9,
"quantity": 3,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 164.7,
"taxCode": "FURNITURE",
"taxPercent": 5,
"totalTaxAmount": 8.24,
"amountIncludingTax": 172.94,
"invoiceDiscountAllocation": 0,
"netAmount": 164.7,
"netTaxAmount": 8.24,
"netAmountIncludingTax": 172.94,
"shipmentDate": "2020-08-21",
"itemVariantId": "00000000-0000-0000-0000-000000000000"
}

  • Suggested answer
    Andy Sather Profile Picture
    on at
    RE: API- salesInvoiceLine - POST tax amount directly

    Hello  - I do see we have some discussion similar on this post:

    community.dynamics.com/.../updating-sales-order-lines-via-api

    It looks like you would need to write your own API to update those fields.

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 374 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 247

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 231 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans