I need to create a custom API page with OData in Dynamic 365 Business Central v15 cloud - for posting a sales order as shipped via API. Can someone help me how should I achieve this? I could not find any docs for the cloud version of business central oData.
check you this old post from the community.dynamics. They have explained how you can create custom APIs for business central. I hope this helps you.
community.dynamics.com/.../how-to-create-custom-apis-for-business-central-even-from-macos
If you find this article helpful, please mark it as a solution.
Regards,
Admin
Apps4rent
I think that an agile way to stretch your bones with this is to extract the standard API code.
You might use Docker to create a container and pull out the source code of API V1 extension or you could download on premise DVD and extract the source file from Applications folder for API V1. There you will find the source code for all standard APIs.
A good blog post from the almighty AJ could help you to know more about that
https://www.kauffmann.nl/2019/11/02/where-is-the-api-v1-0-source-code/
To called Posting function in the API page, you can create a Bound Action in the page and that action will call the posting function in BC. Please refer to below link for more detail information
community.dynamics.com/.../bound-actions-in-dynamics-nav-amp-business-central
@aotto this might be what I need but how would I form the OData base url for cloud version? Also I am not familiar with AL. I just need the posting functionality via API.
@aotto I have figured out the base url but I am not able call the bound function of Sales Order.
You should be able to call the function like below
salesOrders("SalesOrderId")/Microsoft.NAV.shipAndInvoice
No - it does not work with POST request. This is the url - api.businesscentral.dynamics.com/.../salesOrders(e74b86e2-475c-ea11-a814-000d3ab1b8ee
)/Microsoft.NAV.shipAndInvoiceI get this response -
Try
api.businesscentral.dynamics.com/.../Microsoft.NAV.shipAndInvoice
I had to change company name to company id but it worked.
But what if I only want to ship the order not invoice it?
You have to create a custom API with a bound action that perform what you would like to do. Not a snappy thing.
Please refer to your CSP Partner or reseller for this.
You are also encouraged in vote this request through IDEAS site for future product enhancements that actually request what you wuold like to do
https://experience.dynamics.com/ideas/idea/?ideaid=f85e9809-3f70-e911-80e7-0003ff68c74e
"
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Rishabh Kanaskar 3,761
Sumit Singh 2,611
YUN ZHU 1,975 Super User 2025 Season 2