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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Creating JSON/REST API in D365 F&O

(0) ShareShare
ReportReport
Posted on by 110

Hi,

I have a requirement where  I need to create JSON/REST API which will be used by third party application.

We have third party application which is used by customers to process sales orders. Now they want to place sales order "on hold" in D365 F&O by calling from their application.  I need to develop an interface to place sales order into on hold. Hence will be developing REST API which will be consumed by third party application and they will be sending sales order number as return data to API, which I will be using to process "On -hold" in D365 F&O.

Any body has worked on creating JSON/REST API from D365 F&O , please give some inputs on how to create REST API in D365 F&O.

I have never worked on creating JSON service from D365 F&O where as I have worked on consuming REST API.

Appreciate any help !

Thanks !

I have the same question (0)
  • Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    F&O already supports such things: look at OData services and custom services.

  • Verified answer
    Mea_ Profile Picture
    60,284 on at
  • Verified answer
    Rohin Profile Picture
    4,624 on at

    Hey,

    I had pretty similar requirement. I have used OData service for that . Just simply create a new Data Entity or use existing one with having Odata action method( static one with atribute SysODataActionAttribute) that accepts Salesorder Id as parameters and Do your stuff inside that action method( i.e. hold sales order in your case) . And then this OData action method is triggered by your 3rd party System. 

    Thanks

  • d365Dev Profile Picture
    110 on at

    Hi Rohin,

    Thanks for the reply.  Was that bulk  order update or single SO update ? I mean to ask if there are lot of SO's need to be updated on hold at once , whether is there any performance impact if we are using OData service.

    Thank you !

  • d365Dev Profile Picture
    110 on at

    Hi Ievgen,

    Thanks for the quick reply.  I went through these links but not able to find any code samples.. Do you have any example with code snippet on creating custom JSON service  for D365 F&O ?

    Thanks in advance !

  • Verified answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    The second of Ievgen's links shows how to create a custom service, including code samples.

    In F&O, all custom services are automatically deployed to a JSON endpoint (and a SOAP endpoind, but that's not relevant for you). It's covered by Ievgen's first link (and my second link; they point to the same page). The page also contains a link to source code of a sample application showing how to call these services.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello d365Dev,

    Just wanted to follow up on this one and ask if you have been able to get your issue resolved based on the information provided.

    If this is the case then please be so kind and verify the answers.

    Many thanks and best regards,

    Ludwig

  • d365Dev Profile Picture
    110 on at

    Rohin,

    One small  clarification needed, was that entity using "MCRHoldCodeTrans" as data source or "SalesTable"?, I have tried with "MCRHoldCodeTrans"  as data source which is giving me an error saying "Sales order cannot be edited".

  • d365Dev Profile Picture
    110 on at

    Thank you ! I am able to create custom JSON service and do my stuff.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans