If you have a procedure written inside a Codeunit and want to invoke it from calling an API endpoint, here is how you can do it;
When a Codeunit is published as a web service in D365 Business Central, ODataV4 endpoint in unavailable and only SOAP URL is available.
You can however still call the Codeunit using an ODataV4 URL as it is called ‘unbound actions’. Following is an example taking you through it and testing it using Postman.
Let’s create a simple Codeunit with a Procedure and publish it as a web service.


Build the ODataV4 URL to invoke the MyProcedure() from MyCodeunit

Success
