How to get LCY-values from BC API2.0 endpoints (eg. SalesInvoice)

Hi,

We are pulling various data from the BC API2.0 endpoints. We can use both the /api/2.0/ and the /ODataV4/ endpoints.

The SalesInvoices and SalesInvoiceLines methods for example, returns the amounts in the currency value of the invoice. If Invoice=EUR, the amounts in EUR.
The Company the data resides in, may have another base-currency like DKK or something else.

Is there any way to get the LCY/base-currency-converted amounts for the Sales Invoice and it’s Lines ?

I know there is a way of setting up a specific API Page to provide these data, but I would really like to use the existing standard API’s that are provided by BC.

salesInvoiceLine resource type - Business Central | Microsoft Docs

In the API there are no LCY fields added.
So you have to do it with an own custom API for this. That will be the only solution.

Hi Bert,

I was afraid of that - but think you are right.

I was exploring other options as well…:

I might be able to lookup the Invoice in the GL, to get the base-amount from there. But only for the full invoice amount and not each line I suppose.
Also, currency conversion could be an option though I really not go down that road. An even if so, the ExchangeRates at any given time would be needed, and I do not see these are available in the APIs either.

I think there are no work around. Because to much dependencies.
Think the simple way is creating a extension with the new API in that with all the needed fields.