Explaining Transactions

Hi Chris,

When posting a bank_transaction_explanation you need to pass a
‘bank_transaction_explanation’ JSON object with the payload inside. Looking
at what I think you’ve been submitting so far it appears you are missing
this. Can you try something like the JSON below and let me know if that
works for you. I also noticed that the format you were using for dates was
slightly wrong and you were missing the entry type. I realise that our
documentation isn’t entirely clear on this and we do plan on improving this
in the near future.

{
“bank_transaction_explanation”: {
“bank_transaction”: "
https://api.freeagent.com/v2/bank_transactions/23556874",
“bank_account”: “https://api.freeagent.com/v2/bank_accounts/181241”,
“dated_on”: “14-02-2013”,
“paid_invoice”: “https://api.freeagent.com/v2/invoices/5163550”,
“entry_type”: “Invoice Receipt”
}
}

Regards,
Harry MillsOn Thu, Feb 14, 2013 at 4:10 PM, Chris chris.page@hallwaystudios.comwrote:

Hi,

I am trying to explain transactions and I am posting JSON formatted data
to where the API docs states me to. I have created a post method and it
works well with all the other classes I am creating things so I know the
post method is not at fault. I am also parsing all of the relevant fields,
including bank_transaction. However, I am getting an error back saying
that bank_transaction needs to be specified.

Is this a bug or can you identify what is going wrong? It has currently
put our project on hold.

I look forward to hearing from you.


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 freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

I’ve just run into the same issue. The documentation does not mention that
there should be a entry_type at all, and what an entry type should look
like.

Thanks
PeterOn Tuesday, February 19, 2013 7:18:50 PM UTC+4, Chris wrote:

Brilliant, it works now thanks very much. I certainly look forward to
the developer docs being updated! It’s lacking a fair bit!

Appreciate your quick responses.

Chris.

Brilliant, it works now thanks very much. I certainly look forward to the developer docs being updated! It’s lacking a fair bit!

Appreciate your quick responses.

Chris.

Sorry, this was my mistake. entry_type is not a required field for bank
transaction explanations.

Thanks
PeterOn Wednesday, July 16, 2014 5:25:36 PM UTC+4, pe...@golov.me wrote:

Hi,

I’ve just run into the same issue. The documentation does not mention that
there should be a entry_type at all, and what an entry type should look
like.

FreeAgent Developer Dashboard

Thanks
Peter

On Tuesday, February 19, 2013 7:18:50 PM UTC+4, Chris wrote:

Brilliant, it works now thanks very much. I certainly look forward to
the developer docs being updated! It’s lacking a fair bit!

Appreciate your quick responses.

Chris.

Hi Chris,

I’ve had a look in to your problem and I made a mistake in the first
snippet of JSON I sent you. While passing in an entry_type of ‘Invoice
Receipt’ will allow the bank transaction explanation to be created, it
won’t set the explained amount correctly. Instead of passing entry_type you
can pass a gross_value. This specifies the value and the entry type will be
worked out automatically. This is preferred and I will be updating the docs
to make this all much clearer in the near future. Sorry about any problems
this may have caused.

For your second problem it looks like you are trying to record fee payments
to GoCardless. The correct way to record these is in the Bank/Finance
Charges category. For example, the following JSON works for me:

{
“bank_transaction_explanation”: {
“bank_transaction”: "
https://api.freeagent.com/v2/bank_transactions/21…",
“bank_account”: “https://api.freeagent.com/v2/bank_accounts/1…”,
“dated_on”: “14-02-2013”,
“category”: “https://api.freeagent.com/v2/categories/363”,
“gross_value”: 30,
“description”: “GoCardless Fee for invoice #x
}
}

Please try this and let me know how it goes.

Regards,
Harry MillsOn Tue, Feb 19, 2013 at 1:54 PM, Chris chris.page@hallwaystudios.comwrote:

Thanks for your response. That worked fine for an invoice receipt. Now I
am trying to explain a negative amount (the bank transaction fee).

I am sending the following payload but getting a ‘base Entry Type is
invalid’ error message:

{“bank_transaction_explanation”:
{
“bank_transaction”:"
https://api.freeagent.com/v2/bank_transactions/26193962",
“dated_on”:“19-02-2013”,
“gross_value”:“-0.2”,
“description”:“GoCardless fee for Invoice #002”,
“entry_type”:“Payment”
}
}

Is this because the entry type ‘Payment’ does not exist? I have also
tested setting the gross_value to a positive amount (0.20) with no success.

I look forward to hearing from you,
Chris.

On Thursday, 14 February 2013 17:31:00 UTC, Harry wrote:

Hi Chris,

When posting a bank_transaction_explanation you need to pass a
‘bank_transaction_explanation’ JSON object with the payload inside. Looking
at what I think you’ve been submitting so far it appears you are missing
this. Can you try something like the JSON below and let me know if that
works for you. I also noticed that the format you were using for dates was
slightly wrong and you were missing the entry type. I realise that our
documentation isn’t entirely clear on this and we do plan on improving this
in the near future.

{
“bank_transaction_explanation”: {
“bank_transaction”: "https://api.freeagent.com/v2/

bank_transactions/23556874https://api.freeagent.com/v2/bank_transactions/23556874
",
“bank_account”: "https://api.freeagent.com/v2/**
bank_accounts/181241 https://api.freeagent.com/v2/bank_accounts/181241
",
“dated_on”: “14-02-2013”,
“paid_invoice”: "https://api.freeagent.com/v2/**invoices/5163550https://api.freeagent.com/v2/invoices/5163550
",
“entry_type”: “Invoice Receipt”
}
}

Regards,
Harry Mills

On Thu, Feb 14, 2013 at 4:10 PM, Chris <chris...@hallwaystudios.com**>wrote:

Hi,

I am trying to explain transactions and I am posting JSON formatted data
to where the API docs states me to. I have created a post method and it
works well with all the other classes I am creating things so I know the
post method is not at fault. I am also parsing all of the relevant fields,
including bank_transaction. However, I am getting an error back
saying that bank_transaction needs to be specified.

Is this a bug or can you identify what is going wrong? It has currently
put our project on hold.

I look forward to hearing from you.


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 freeagent_ap…@googlegroups.com.
To post to this group, send email to freeag...@googlegroups.com
.

Visit this group at http://groups.google.com/**group/freeagent_api?hl=enhttp://groups.google.com/group/freeagent_api?hl=en
.
For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.


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 freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.