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

Create purchase invoice for posted PO Receipt using API

(5) ShareShare
ReportReport
Posted on by 10

I am trying to create a purchase invoice for a Posted PO Receipt through API ( 3 way match). After creating the Purchase Invoice and posting in BC, I am not able to link the invoice with the PO and PO Receipt. The quantity Invoiced from the Purchase Invoice is not reflected in PO and PO Receipt. 

Is there a way to link a purchase invoice with a Posted Receipt and PO using API? Any comment is appreciated. 

I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,760 Super User 2026 Season 1 on at
    Hello,
     
    You can’t link a manually created purchase invoice to a posted receipt via API. Only invoices created from the purchase order (using the API action /purchaseOrders({id})/Microsoft.NAV.receiveAndInvoice) automatically link to receipts and update quantities. Otherwise, you’ll need a custom API to handle this.
     

    References
    purchaseOrder (bound action receiveAndInvoice): https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_purchaseorder

    Regards,
    Oussama Sabbouh
  • Suggested answer
    Sumit Singh Profile Picture
    11,757 Super User 2026 Season 1 on at
    Hi,

    Creating a standalone purchase invoice via the standard Business Central API will not link it to the PO/posted receipt, so the Qty. Invoiced on the PO/receipt won’t move. Linking happens when you pull posted receipt lines into the invoice (“Get Receipt Lines”) or you post from the PO. The standard purchaseInvoices endpoint doesn’t expose a way to do either.
    Below official links might help;-

     Purchase Order API & Bound Action (receiveAndInvoice)

    Purchase Invoice API

     Purchase Receipts & Receipt Lines

     Bound Actions (How to create custom ones)

     UI Logic for “Get Receipt Lines”

  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,732 Super User 2026 Season 1 on at
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    6,219 Super User 2026 Season 1 on at
    Hi,
     
    There is no standard API in Business Central that links a purchase invoice to a posted receipt and purchase order automatically. The standard APIs (/purchaseInvoices, /purchaseReceipts, /purchaseOrders) work independently and do not perform the three-way match logic.
    Options:
    > Use the purchaseInvoiceLines endpoint and populate the orderId and orderLineId fields when creating the invoice lines. This links the invoice to the original PO.
    > Business Central does not expose posted receipt linkage via API for automatic matching. To achieve full three-way match, you need a custom API or extension that reads receipt lines and applies them to invoice lines.
    > Without customization, the only supported approach is to create the invoice from the PO in the UI or through the standard API using the PO reference.
     
    Regards
    Rishabh
  • Suggested answer
    YUN ZHU Profile Picture
    99,049 Super User 2026 Season 1 on at
    Hi, hope the following can give you some hints.
    Dynamics 365 Business Central: How to use Standard/Custom API Bound Actions
     
    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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,804 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,103 Super User 2026 Season 1

#3
Kamal Khakhkhar Profile Picture

Kamal Khakhkhar 695

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans