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

Customized api

(0) ShareShare
ReportReport
Posted on by 645

Dears, 

I would appreciate it if you share your experience to help me here. 

now to create one sale invoice we are sending multiple API requests. one to create the header, second to create the lines, and maybe more if I would send request for each line . and even more requests if I am sending the work description field "its new custom field with really long length".

now, is it possible somehow to create one API with one URL sending one request? containing all this in one call.  the idea is to merge multiple API in one. 

maybe it does make so much sense. but I would like to know your opinion here. 

and how to mitigate the risk of integration failure.

on the other side of the application, we are integrating with, we just created one table that logs all requests and the reply. we should run a batch to go through lines. it would check for the failed lines. then send the request again. 

  • Mohamed Hathout Profile Picture
    645 on at
    RE: Customized api

    thank you Josh and everyone may help me out here, 

    now I have been trying to make it happen with no success. 

    I created the web service from sales order page 42 

    pastedimage1601173393900v1.png

    second, I used the following request, 

    post

    api.businesscentral.dynamics.com/.../Company('

    it sending and update the header, but not updating the lines. 

    pastedimage1601172369534v1.png

    though get request is working fine and retrieve header and lines 

    pastedimage1601173078910v3.png

  • Suggested answer
    JAngle Profile Picture
    83 on at
    RE: Customized api

    I would check out this blog and part 2 of it as well: www.kauffmann.nl/.../

    If you are sending data to one custom table and then letting the rest happen server side you should be able to progress.

    Another idea that might be helpful can be seen here too: d365bcangle.wordpress.com/.../

    You can have a page that accepts parameters and then pass all that detail to a codeunit to handle what you actually require from making the API call

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,145 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,896 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans