Hi
I am trying to create a new bill using the FA API. I am getting a 401 Unauthorised error when I do the following:
POST https://api.sandbox.freeagent.com/v2/bills
headers:
{
“Accept”: “application/json”,
“Authorization”: “Bearer …”,
“Content-Type”: “application/json”
}
data:
{
“bill”: {
“contact”: “https://api.sandbox.freeagent.com/v2/contacts/44770”,
“dated_on”: “2018-05-23”,
“due_on”: “2018-06-23”,
“reference”: “X600”,
“total_value”: “201.0”
}
}
When I try https://api.sandbox.freeagent.com/v2/users/me I get “permission_level”: 8 so it seems not a permission problem.
Also get requests work fine so it seems not an authentication problem.
Any suggestions?