Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Create payment with g/l account by business central rest api

Posted on by 11
In web UI of business central on page Payment Journals we can create new entries. One of column for fill up is /Account Type/. Here, among other we can select option /G/L Account/. 
I'm trying to find a way how to create payment in payment journal with account type g/l account. I found endpoints /vendorPaymentJournals and indeed - GET /vendorPaymentJournals is returning list of payment journal batches. Problem i have now is inside that endpoint namespace can see only endpoint /vendorPaymentJournals(:journal_id)/vendorPayments which is returning ONLY entries with account type vendor. How I can - using API - create and fetch entries with other account type than vendor ?
 
-- edit
I found that payment journal entries with g/l account type can be created by using just POST /jounals(:journal_id)/journalLines endpoint. But unfortunately here i cannot define paymentMethodId nor documentType. 
 
 
Recap is: I need to create following entry in payment journal:
Document type: Payment
Account type: G/L account
G/L account no: (one of my gl account here)
Payment method code: (one of my payment methods here)
 
How I should approach that problem ?
 
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 71,565 Super User 2024 Season 2 on at
    Create payment with g/l account by business central rest api
    Hi, the only standard API that can be used is journalLines.
    But if there are insufficient fields, unfortunately, as of now, you can only customize a new API page.
    More details: Dynamics 365 Business Central: Can we extend standard APIs? – Download Standard Source Code for APIs
     
     
    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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans