web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to update Business Central Inventory through API

(0) ShareShare
ReportReport
Posted on by 5

Hello, 

I am developing a Business Central Integration that requires creating Inventory adjustments. I understand creating Item Journal entries is the best way to do this, but is not possible through the APIs. There is a codeunit (1327) that can adjust Item Inventory, but I am struggling to find documentation on how to use it. I have added the codeunit row to Web Services, given it a name, and have an API endpoint to use. I am getting 415 Unsupported Media Type error in return when I supply any kind of body (json), but I can't find any documentation on what parameters are expected.

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at

    Why is it not possible to create item journal through API ?

    You can create a new codeunit with function to create and post the journal, and call that function using API. We have done this a few times without no issue.

  • Suggested answer
    JAngle Profile Picture
    159 on at

    Depends on the procedure being used. Source code for the one I assume you might be trying is:

    procedure PostAdjustmentToItemLedger(Item: Record Item; NewInventory: Decimal) LastErrorText: Text

    I think the error is logical as a complete json representation of a rec value won’t be easy to replicate.

    Might be better creating your own codeunit based off this one. So instance if you swap the Item parameter to be a code[20]. Add logic to find the item record from your provided code value. After that the rest of the code is fine

  • kplatz Profile Picture
    5 on at

    Thanks for the responses!

    To clarify, I was only trying to create Item Journal Lines, not post them. I was referencing the MSFT's API documentation, which only discussed the standard APIs. I did not realize that you could expose an existing page from BC Web Services, and POST new lines through the generated API. 

    Exposing the Item Journals Page got me what I needed. 

    Thanks!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,314 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,781 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,356

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans