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 :
Small and medium business | Business Central, N...
Suggested Answer

VendorPayment POST through API does not change the status of PurchaseInvoice to PAID

(0) ShareShare
ReportReport
Posted on by 10

When POSTing a PurchaseInvoice, the status field is "read-only" and gets posted as `Draft` through the API, although in the actual application it says `Open`.

When trying to reference a PurchaseInvoice in the VendorPayment API, the VendorPayment either require the `appliesToInvoiceNumber` or `appliesToInvoiceId` fields filled out. When I use the `appliesToInvoiceId`, I get an error that says "The \"appliesToInvoiceId\" should be the ID of an Open, Paid, Corrective, or Canceled Invoice." However, when using the `appliesToInvoiceNumber`, the VendorPayment gets posted, but does not change the status of the PurchaseInvoice to Paid. How can I change the status of the PurchaseInvoice to paid when POSTing a VendorPayment specifically for that PurchaseInvoice?

Thank you in advance!

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Interesting questions, if you are not getting further responses from the community, please consider raising a ticket to Microsoft via your partner or CSP.

    Thank you.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Are you talking about the closed filed on the posted purchase invoices?

    If so can you provide a sample showing the vendor ledger entries that is generated from posting of the invoice and the payment?

  • kitani Profile Picture
    10 on at

    Hello!

    I am actually talking about moving a PurchaseInvoice from Open to Posted. Is this possible from the api?

  • Suggested answer
    Vaishnavi J Profile Picture
    3,062 on at

    Hi,

    Have you created your own API or are you using standard Business central API?

    And what is the version you are using v1 or v2.

    Can you insert the Purchase Invoice first trough API and then do a get request to check status field is in draft or not and then post it from front end and check the status of PPI by doing a get request is it Open or Draft?

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

  • kitani Profile Picture
    10 on at

    I'm using the standard Business central API v2! I would like to avoid creating my own API if possible.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,098

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,556 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,108 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans