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 ?