Finding Original Currency in Expensify Transactions API

Options
valientfly7
valientfly7 Expensify Customer Posts: 2 Expensify Newcomer

Hello,


So I am connected to the Expensify API and we have to do accounting on the original purchase which 90% of the time is in a foreign currency. However while I can see in expensify that a transaction was Mex$222.80 and that converted to 13.04USD when I call it in the API all I can get is the US amount. I have gotten the following for my attempts:


expense.currency = USD (Not correct it was charged in pesos expensify did the exchange)

expense.amount = 1304 (US cents)

expense.convertedAmount = 1304 (US Cents)

currencyConversionRate = 1 (Ideally we could get the conversion rate for the transaction)



This is the tamplate I am using:

export_template = """<#if addHeader == true>

Merchant,Amount,Currency Conversion,Customer,Category,Expense number,Receipt URL<#lt>

</#if>

<#assign reportNumber = 1>

<#assign expenseNumber = 1>

<#list reports as report>

<#list report.transactionList as expense>

${expense.merchant},<#t>

${expense.currency},<#t>

${expense.convertedAmount},<#t>

${expense.amount},<#t>

<#-- note: expense.amount prints the original amount only -->

${expense.tag},<#t>

${expense.category},<#t>

${expenseNumber},<#t>

${expense.receiptObject.url},<#t>

${expense.transactionID}<#lt>

<#assign expenseNumber = expenseNumber + 1>

</#list>

<#assign reportNumber = reportNumber + 1>

</#list>"""