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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Post Data to Business Central Standard API [purchaseOrders]

(3) ShareShare
ReportReport
Posted on by 213

Hi, I need to create a purchase order using Postman with the standard API:

https://api.businesscentral.dynamics.com/v2.0/{tenantID}/{Sandboxname}/api/v2.0/purchaseOrders?$expand=purchaseOrderLines

My main blocker is that I need to post data into the field named "Item Reference No" in the purchase line. As per the Business Central community dev suggestion, I should use "ItemVariant". Here is how the body looks:

{

    "number": "Postman6",

    "orderDate": "2025-01-14",

    "postingDate": "2025-01-14",

    "vendorNumber": "100",

    "purchaseOrderLines": [

        {

            "lineType": "Item",

            "lineObjectNumber": "100",

            "description": "Item 1",

            "quantity": 2,

            "itemVariant": "TL-001"

        },

        {

            "lineType": "Item",

            "lineObjectNumber": "100",

            "description": "Item 2",

            "quantity": 1

        }

    ]

}

However, it is giving an error.

 

Even when I use the standard API for the line:

https://api.businesscentral.dynamics.com/v2.0/{tenantid}/Dev-Sandbox/api/v2.0/purchaseOrderLines(84c12e62-6e94-ef11-8a6b-6045bdd59b7e)

I can't see any key that references "Item Reference No".

Can someone help me with this issue?


do i need to register the Item Reference No field by making standard API copy make my changes like here they have done it : - https://www.kauffmann.nl/2021/03/12/extending-standard-apis-1/

 

I have the same question (0)
  • Suggested answer
    Satish Srivastava Profile Picture
    242 on at
    Hi ,
     
    In Microsoft Dynamics 365 Business Central, the Purchase Order API is based on the Purchase Order Page. Since we cannot directly modify the standard API, we need to extend the standard Purchase Order page using AL Language.
     
    follow the below steps.
     
     
    * Write a Page Extension to add the Item Reference No. field to the Purchase Order Page.
    * Re-Publish the Standard Purchase Order API
    * Verify the API Schema (Check for "Item Reference No.")
     
    Thanks
    Satish Srivastava
  • Suggested answer
    YUN ZHU Profile Picture
    100,364 Super User 2026 Season 1 on at
    Hi, hope the following can give you some hints.
    Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs
     
    Thanks.
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,947 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 995 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 596 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans