Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : xUhx2wq4ArbxtGQO7N1GBb
Small and medium business | Business Central, N...
Unanswered

Fetching Posted Payments - API/Odata

Like (1) ShareShare
ReportReport
Posted on 4 Jun 2024 06:59:53 by
I've been trying to fetch all posted payments using the V2 Apis.

The /customerpayments and /vendorpayments endpoint return only the draft payments (journal lines).
I am now trying to fetch the posted payments from the VendorLedgerEntries and Cust_LedgerEntries endpoints using Odata but i only get the contact and invoice document numbers. Is there any way from which i can directly get the posted payments with the proper contact and invoice platform unique id.

If not possible, how can i create a custom web service to fetch the posted payments.
  • Aaron Bauldree Profile Picture
    19 on 04 Jun 2024 at 20:46:53
    Fetching Posted Payments - API/Odata

    To fetch posted payments via API, you're looking in the right place by checking the Customer Ledger Entries. While I'm not familiar with the exact data on that page, I can share my experience with custom API pages for similar data.

    If you need more details about the Customer and Invoice for each payment, you have a couple of options:

    1. Request Ledger Entries and Loop Through: You can request the Ledger Entries and then loop through them, making separate API calls to fetch the customer and invoice details. While this method works, it can be somewhat heavy and less efficient.

    2. Create a Custom API Page: A better approach would be to expand the custom API page for the Customer Ledger Entries to include the necessary fields from the Customer and Invoice tables. Once you've created this custom page in BC, you can publish it as a Web Service.

    By creating a custom API page, you can directly get the posted payments with the proper contact and invoice platform unique IDs.

  • gdrenteria Profile Picture
    16,961 Most Valuable Professional on 04 Jun 2024 at 09:02:12
    Fetching Posted Payments - API/Odata
    Hi
    I hope this can help you and give you some hints.
    BR
    GR

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,533 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,619 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading complete