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

Announcements

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
    17,521 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,797 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
    17,006 Super User 2026 Season 1 on at
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    6,231 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
    101,995 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,353 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,808 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,371

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans