Upcoming feature: Recording expenses incurred in foreign currencies

Hello,

We’re extending our API so that you can record out of pocket expenses
incurred in foreign currencies. Today this is only possible in our web app.

Here’s an outline of our plan. We’d love to hear from you if you have any
questions or feedback.

For the sake of brevity I’ll stick to JSON examples and omit some of the
existing required fields. Please refer to
https://dev.freeagent.com/docs/expenses if you are unsure.

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. All monetary amounts
must be expressed in a single currency.

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”
}
}

That’s about it! We’ll post an update when we’re ready to roll out. In the
meantime please do let us know if you have any questions or feedback.

Thanks,

Rob

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

looks good to me - I like the “add a currency, or we’ll just use the
companies default one”

Nice and easy :)On 22 May 2013 11:42, Rob Worley rob@freeagent.com wrote:

Hello,

We’re extending our API so that you can record out of pocket expenses
incurred in foreign currencies. Today this is only possible in our web app.

Here’s an outline of our plan. We’d love to hear from you if you have any
questions or feedback.

For the sake of brevity I’ll stick to JSON examples and omit some of the
existing required fields. Please refer to
https://dev.freeagent.com/docs/expenses if you are unsure.

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. All monetary amounts must
be expressed in a single currency.

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”
}
}

That’s about it! We’ll post an update when we’re ready to roll out. In the
meantime please do let us know if you have any questions or feedback.

Thanks,

Rob

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


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Nic Wise
t. +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/