Hi Dan,
Thanks for your message and apologies for the delayed response.
I’ve had a tinker with the API and it looks like our documentation is
missing one very important parameter when trying to rebill expenses.
To rebill an expense at a specific price, you need to set “rebill_type” as
“price” and “rebill_factor” at the price you wish to rebill the expense.
For example, here’s the POST request needed to rebill a £500 expense at
£550:
POST https://api.sandbox.freeagent.com/v2/expenses
{ “expense”:
{
“user”:“https://api.freeagent.com/v2/users/794”,
“project”:“https://api.freeagent.com/v2/projects/3125”,
“category”:“https://api.freeagent.com/v2/categories/268”,
“dated_on”:“2015-02-06”,
“gross_value”:“-500.00”,
“description”:“My Expense”,
“rebill_factor”:“550”,
“sales_tax_rate”:“0”,
“rebill_type”:“price”
}
}
I’ll look at getting the documentation updated but I hope this helps in the
meantime.
Kind regards,
Dave JOn 2 February 2015 at 15:21, Dan Jenkins dan@nimbleape.com wrote:
Hi,
I’m trying to import some expenses using the FreeAgent API but I want to
rebill items at a specific price (currency tied to the project). In the
FreeAgent gui, I can do exactly this but I can’t see how to do this via the
API,
Can someone help me? Or point me at some documentation?
Thanks,
Dan
–
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.
For more options, visit https://groups.google.com/d/optout.
David Jones
Senior Support Engineer
FreeAgent