I’ve been working on an integration between Taxi For Email and Freeagent.
We’re trying to generate invoices for automated credit card transactions
from our web app. I’m having trouble creating new contacts through the
API. I tried using httpbin (as recommended in your trouble shooting
guide). Here’s the post request that I made - as seen in httpbin:
{
“args”: {},
“data”: “{“organisation_name”:“API Test
Org",“first_name”:“Aypee”,“last_name”:“eye”,“email”:"email@email.com”}”,
“files”: {},
“form”: {},
“headers”: {
“Accept”: “application/json”,
“Accept-Encoding”: “gzip, deflate”,
“Authorization”: “Bearer [Sanitised]”,
“Content-Length”: “101”,
“Content-Type”: “application/json”,
“Host”: “httpbin.org”,
“User-Agent”: “Ruby”
},
“json”: {
“email”: "email@email.com",
“first_name”: “Aypee”,
“last_name”: “eye”,
“organisation_name”: “API Test Org”
},
“origin”: “80.87.18.226”,
“url”: “http://httpbin.org/post”
}
And here is the response from the same request through the Freeagent API:
{“errors”:[{“message”:“first_name can’t be blank”},{“message”:“last_name
can’t be blank”},{“message”:“organisation_name can’t be blank”}]}
Approximate timestamp: Thu, 07 Jan 2016 17:56:31 +0000
I’ve run out of things to try here, any help much appreciated
Thanks
W