New feature: Recording expenses incurred in foreign currencies

Hi,

I’m pleased to announce that we’ve just added support for out of pocket
expenses incurred in foreign currencies to the API. The changes are 100%
backwards compatible, so you can safely ignore this message if you have no
plans to take advantage of this feature.

We’ve updated the expenses documentationhttps://dev.freeagent.com/docs/expenses#create-an-expense to
include the new fields and added a list of supported currencieshttps://dev.freeagent.com/docs/currencies.
Here are a few JSON examples to help you get started:

Creating a 100 USD expense for a GBP company via POST
https://api.freeagent.com/v2/expenses

{ “expense”:
{
“currency”: “USD”,
“gross_value”: “100”
}
}

The currency field is entirely optional. We assume you’re posting in the
native currency unless you specify something else.

The API will automatically convert between native and foreign currencies
using the exchange rate from XE.com on the date that the expense was
incurred. Should you wish to perform your own conversion, you can specify
native values like so:

{ “expense”:
{
“currency”: “USD”,
“gross_value”: “100”,
“native_gross_value”: “65”
}
}

Generally, sales tax on expenses incurred in a foreign currency will not be
reclaimable and should be omitted. If sales_tax_rate is specified on a
foreign currency expense, it will be ignored and the rate set to zero. If
you can reclaim sales tax from HMRC/your local government agency, then the
amount reclaimable should be entered in your native currency.

{ “expense”:
{
“currency”: “USD”,
“gross_value”: “100”,
“manual_sales_tax_amount”: “5”
}
}

Retrieving the record via GET https://api.freeagent.com/v2/expenses/:id

When reading records, monetary values are always available in both foreign
and native currencies.

{ “expense”:
{
“currency”: “USD”,
“gross_value”: “100”,
“native_gross_value”: “65”,
“sales_tax_value”: “10”,
“native_sales_tax_value”: “6.5”
}
}

Have fun building foreign currency support into your apps! Please do get in
touch if you encounter any bugs or difficulties when using the API.

Best,

Rob

Rob Worley
Senior Software Engineer
FreeAgent Central Ltd
40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774