How to change the type of an expense?

Hello

I’ve created an expense with the FA API however it’s always set as refund
when it should be set as payment. I don’t pass anything on to this value
afaik so any insights are appreciated!

The json I pass on:
{
“expense”:{
“user”:“https://api.freeagent.com/v2/users/368947”,
“gross_value”:70.55,
“description”:“3 Suisses”,
“dated_on”:“2015-07-03T00:00:00”,
“category”:“https://api.freeagent.com/v2/categories/288”,
“currency”:“GBP”,
“sales_tax_rate”:10.0,
“manual_sales_tax_amount”:6.42
}
}

Thanks in advance!

Hi Niels,

Looking at your code example, the gross_value and manual_sales_tax_amount values
that you’re specifying are positive, instead of negative as indicated in the
docs https://dev.freeagent.com/docs/expenses. I realise it’s not
amazingly clear, but if you could try switching the sign on the values and
let me know if that resolves the issue?

Thanks,

-JOn Friday, 3 July 2015 11:22:48 UTC+1, Niels Willems wrote:

Hello

I’ve created an expense with the FA API however it’s always set as refund
when it should be set as payment. I don’t pass anything on to this value
afaik so any insights are appreciated!

The json I pass on:
{
“expense”:{
“user”:“https://api.freeagent.com/v2/users/368947”,
“gross_value”:70.55,
“description”:“3 Suisses”,
“dated_on”:“2015-07-03T00:00:00”,
“category”:“https://api.freeagent.com/v2/categories/288”,
“currency”:“GBP”,
“sales_tax_rate”:10.0,
“manual_sales_tax_amount”:6.42
}
}

Thanks in advance!