Uploading a statement through the API is slightly different to other
requests in that it’s submitted as a url-encoded form post rather than as
JSON or XML. The only field that should be submitted is the statement field
which should contain the URL encoded file that you wish to upload. As the
docs at https://dev.freeagent.com/docs/bank_transactions say, an OXF format
is strongly preferred.
Harry MillsOn Tue, Apr 2, 2013 at 7:04 AM, email@example.com wrote:
I want to know what are the data fields to send for upload a bank
statement, Freeagent does not mention in Doc
please brief me about uploading a bank statement.
On Monday, July 23, 2012 3:07:12 PM UTC+5:30, Graeme Boyd wrote:
The data is sent essentially as a form parameter. Include the statement
data as a url encoded parameter “statement”, don’t convert it to JSON or
curl -H “Authorization: Bearer XXXXXXXXX”
-H “Accept: application/json”
If you’re not familiar with the firstname.lastname@example.org above, from the
This will make curl load data from the given file (including any
newlines), URL-encode that data and pass it on in the
POST. The name part gets an equal sign appended, resulting in
name=urlencoded-file-content. Note that the name is
expected to be URL-encoded already.”
The same will work for OFX statements. Another potential caveat is to
watch what headers you’re sending the server. Many other API calls require
the Content-Type to be set to application/xml or application/json, but in
this case that will probably prevent the upload from being understood. In
my above example, curl is setting the Content-Type
to application/x-www-form-**urlencoded transparently.
On 20 July 2012 20:23, James Lawrence jlaw...@googlemail.com wrote:
Hi there, according to the API documentation it should be possible to
upload a statement in OFX or CSV format ( https://dev.freeagent.com/**
Unfortunately after playing around with a few hours, I can’t work out how
to send the “statement” data.
Is it sent as JSON/XML, if so then as what type? (I attempted sending it
as JSON as a byte and that failed), or is it sent as HTTP form data?
I’d be glad of any advice. Many thanks!
You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To view this discussion on the web visit https://groups.google.com/d/**
To post to this group, send email to freeag...@googlegroups.com**.
To unsubscribe from this group, send email to freeagent_ap…@**
For more options, visit this group at http://groups.google.com/**
Senior Software Engineer
40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny 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 email@example.com.
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/freeagent_api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.