Hello,
We are using the POST /v2/bank_transactions/statement
endpoint to push OFX-formatted transactions into FreeAgent bank accounts as documented here, but it appears this endpoint does not push into the account specified in the query string, but instead pushes to a different account.
We have multiple GBP bank accounts set up in FreeAgent, including account 528630 and account 530469. When calling the endpoint with bank_account=530469
the API responds 200, but the new transaction actually appears in account 530469.
Are we not using the API correctly, or is this an internal issue with the FreeAgent API? I’ve pasted the raw request below if that helps.
Thanks!
> POST https://api.freeagent.com/v2/bank_transactions/statement?bank_account=530469 HTTP/1.1
> Accept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml
> Authorization: Bearer <token>
> User-Agent: RestSharp/105.2.3.0
> Content-Type: application/x-www-form-urlencoded
> Host: api.freeagent.com
> Content-Length: 1037
> Accept-Encoding: gzip, deflate
> statement=OFXHEADER%3A100%0D%0ADATA%3AOFXSGML%0D%0AVERSION%3A102%0D%0ASECURITY%3ANONE%0D%0AENCODING%3AUSASCII%0D%0ACHARSET%3A1252%0D%0ACOMPRESSION%3ANONE%0D%0AOLDFILEUID%3ANONE%0D%0ANEWFILEUID%3ANONE%0D%0A%3COFX%3E%0D%0A%3CSIGNONMSGSRSV1%3E%0D%0A%3CSONRS%3E%0D%0A%3CSTATUS%3E%0D%0A%3CCODE%3E0%0D%0A%3CSEVERITY%3EINFO%0D%0A%3C%2FSTATUS%3E%0D%0A%3CLANGUAGE%3EENG%0D%0A%3C%2FSONRS%3E%0D%0A%3C%2FSIGNONMSGSRSV1%3E%0D%0A%3CBANKMSGSRSV1%3E%0D%0A%3CSTMTTRNRS%3E%0D%0A%3CTRNUID%3E1%0D%0A%3CSTATUS%3E%0D%0A%3CCODE%3E0%0D%0A%3CSEVERITY%3EINFO%0D%0A%3C%2FSTATUS%3E%0D%0A%3CSTMTRS%3E%0D%0A%3CCURDEF%3EGBP%0D%0A%3CBANKACCTFROM%3E%0D%0A%3CACCTID%3E%0D%0A%3CACCTTYPE%3ECHECKING%0D%0A%3C%2FBANKACCTFROM%3E%0D%0A%3CBANKTRANLIST%3E%0D%0A%3CSTMTTRN%3E%0D%0A%3CTRNTYPE%3EOTHER%0D%0A%3CDTPOSTED%3E20180311%0D%0A%3CTRNAMT%3E12.64%0D%0A%3CFITID%3E89783151-c9f5-42e2-a890-7c87d89f7c28%0D%0A%3CNAME%3ETest%20Transaction%204%0D%0A%3C%2FSTMTTRN%3E%0D%0A%3C%2FBANKTRANLIST%3E%0D%0A%3C%2FSTMTRS%3E%0D%0A%3C%2FSTMTTRNRS%3E%0D%0A%3C%2FBANKMSGSRSV1%3E%0D%0A%3C%2FOFX%3E