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

Community site session details

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

Creating a purchase order through the web API

(0) ShareShare
ReportReport
Posted on by

Can someone please point me in the right direction?

I need to create a purchase order through the web API, however I don't see any reference to purchase orders in the documentation or metadata when I query the API.

Do I need to create a different type of record?

Do I need to expose the purchase order table through configuration?

Can it be done?

Thank you.

  • Verified answer
    Mohamad Vajid Profile Picture
    on at
    RE: Creating a purchase order through the web API

    Creating Purchase Orders via API is currently not available out of the box. The Product team may consider bringing PO creation with API as a standard. Kindly provide your feedback here:
    https://experience.dynamics.com/ideas

    You can look at the SalesOrders API example code that can be found on the DVD in this path:

    DVD\Applications\APIV1\Source\APIV1.Source.zip\src\pages\
    PAG20028.SalesOrders.al
    PAG20044.SalesOrderLines.al

  • Suggested answer
    Stefano Demiliani Profile Picture
    on at
    RE: Creating a purchase order through the web API

    You need to create a new API page with Purchase Header and a new part page with Purchase Line as source expression. I this wasy you can create your custom API for handling Purchase Orders.

  • Alberto Zamburlini Profile Picture
    on at
    RE: Creating a purchase order through the web API

    Hi, i'm noob....for do to that i need tu use VS Code and AL language or can i do using only BC web interface?

  • Suggested answer
    Mohamad Vajid Profile Picture
    on at
    RE: Creating a purchase order through the web API

    Yes, you would need to use VS Code and AL language extension to create pages of type API. You cannot do this from the Web client. Here is a good starting point - https://community.dynamics.com/business/b/dkatson/posts/how-to-create-custom-apis-for-business-central-even-from-macos

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans