web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to link General Ledger Entries to Customer/Vendor/Contact via Business Central API?

(1) ShareShare
ReportReport
Posted on by 14
Hi everyone,
 
We are integrating with Microsoft Dynamics 365 Business Central using the standard API v2.0.
 
We currently import generalLedgerEntries from the standard endpoint: /api/v2.0/companies({companyId})/generalLedgerEntries
 
We would like to link individual general ledger entries to the related customer, vendor, or contact in Business Central.
 
However, the standard generalLedgerEntry API resource only seems to expose fields such as:
  • id
  • entryNumber
  • postingDate
  • documentNumber
  • documentType
  • accountId
  • accountNumber
  • description
  • debitAmount
  • creditAmount
  • lastModifiedDateTime
It does not appear to expose fields such as:
  • Source Type
  • Source No.
  • Customer No.
  • Vendor No.
  • Customer Id
  • Vendor Id
  • Contact Id
Because of this, we cannot reliably determine whether a G/L entry belongs to a customer or vendor, or link it to the related contact.
 
I understand that the underlying G/L Entry table in Business Central may contain fields like Source Type and Source No., which could potentially be used to link to customers or vendors. But these fields do not seem to be available in the standard API v2.0 generalLedgerEntries resource.
 
My questions are:
  • Is there any standard Business Central API endpoint that allows us to reliably link a generalLedgerEntry to its related customer/vendor/contact WITHOUT creating a custom AL APPI query?
Any guidance, examples, or recommended approaches would be appreciated.
 
Thanks!
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    17,715 Super User 2026 Season 1 on at
    Hello,
    No, the standard API v2.0 generalLedgerEntries endpoint does not expose Source Type, Source No., Customer Id, Vendor Id, or Contact Id; Microsoft’s v2.0 resource only gives the G/L account-related fields and navigation to account/attachments/dimensions, so you cannot reliably link each G/L entry to a customer/vendor/contact from that endpoint alone. Microsoft does show other reporting/analytics G/L entry resources that include sourceType / sourceNo, but that is not the same standard API v2.0 resource, so for a clean production integration the usual approach is to create a small custom API page/query over G/L Entry exposing Source Type and Source No. and then map Customer / Vendor from there; contact linkage may still need extra logic because the G/L Entry does not always directly represent a contact.
    Regards,
    Oussama Sabbouh

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,960 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,299 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,131 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans