Skip to main content

Notifications

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!

  • kitani Profile Picture
    10 on at
    RE: VendorPayment POST through API does not change the status of PurchaseInvoice to PAID

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

  • Suggested answer
    Vaishnavi J Profile Picture
    3,060 on at
    RE: VendorPayment POST through API does not change the status of PurchaseInvoice to PAID

    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
    RE: VendorPayment POST through API does not change the status of PurchaseInvoice to PAID

    Hello!

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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,029 Moderator on at
    RE: VendorPayment POST through API does not change the status of PurchaseInvoice to PAID

    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?

  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: VendorPayment POST through API does not change the status of PurchaseInvoice to PAID

    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.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans