Paid_Value - unknown attribute

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest,
Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper],
Content={“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

I’ve just had a look - and it also looks like Jon is using my .NET wrapper
:slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s coming
thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with MobileAgent.
Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}

I’ll try to get the full json request out. This is something which I’ve
had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into that,
but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.

If you’re worried about posting this in public, you could follow-up on
the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered if
you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact
and project, but the supplied project doesn’t actually belong to the
contact you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Jon,

From the exception:

FreeAgentException: StatusCode=BadRequest,
Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper],
Content={“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}]

:)On 2 April 2015 at 18:08, Jon Free jon.free@wastesource.co.uk wrote:

Ha how did you know I was using the wrapper (thanks for making that, it’s
saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code the
modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/v2/contacts/1904514",“category”:"/v2/categories/285",“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,“second_sales_tax_rate”:0,“recurring”:"",“status”:null,“rebill_type”:null,“rebill_factor”:0,“comments”:"",“depreciation_schedule”:null,“attachment”:null,“updated_at”:"",“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s coming
thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which I’ve
had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could follow-up on
the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered
if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact
and project, but the supplied project doesn’t actually belong to the
contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Ha how did you know I was using the wrapper (thanks for making that, it’s
saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is working
as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code the
modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/v2/contacts/1904514",“category”:"/v2/categories/285",“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,“second_sales_tax_rate”:0,“recurring”:"",“status”:null,“rebill_type”:null,“rebill_factor”:0,“comments”:"",“depreciation_schedule”:null,“attachment”:null,“updated_at”:"",“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s coming
thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which I’ve
had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.

If you’re worried about posting this in public, you could follow-up on
the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered
if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact
and project, but the supplied project doesn’t actually belong to the
contact you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

Nic,

I’ve got it to work again, thankfully. You need to add the following two
lines to your code within UrlParsingSerializer.cs.

json = Remove(json, ““paid_value”:0”);
json = Remove(json, ““due_value”:0”);

I’m assuming you’ve had this issue before as this is what the rest of the
Remove functions in this section appear to do. I did try and do it the
proper way using DataAttributes and the ignore settings but rest sharp
doesn’t seem to support it quite as expected.

I’ve pencilled in an attempt to update it to use
the DataContractJsonSerializer which is all built into .net as this was
would support the Data Attributes correctly. I won’t be doing it today!

Dave, you must have tightened up something at your end as both of our
implementations would have been submitting paid_value and due_value all the
time.

Cheers

JonOn 2 April 2015 at 09:08, David Jones david.jones@freeagent.com wrote:

Hi Nic, Jon,

Thanks for providing the JSON, I’ll try to find your request in the logs
and I’ll have a shot a reproducing the issue locally.
I’ll let you know what I find.

Thanks for your patience,
Dave J

On Thursday, 2 April 2015 06:09:18 UTC+1, Jon Free wrote:

Ha how did you know I was using the wrapper (thanks for making that, it’s
saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code the
modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/
v2/contacts/1904514",“category”:"/v2/categories/285"
,“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-
04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,"
second_sales_tax_rate":0,“recurring”:"",“status”:null,"
rebill_type":null,“rebill_factor”:0,“comments”:"","
depreciation_schedule":null,“attachment”:null,“updated_at”:
“”,“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s
coming thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which
I’ve had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could follow-up
on the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered
if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a
contact and project, but the supplied project doesn’t actually belong to
the contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following
error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

Hi Guys,

Thanks for your patience. We’ve found the cause of the problem.
10 days ago we deployed a change to the list of whitelisted attributes that
would be accepted by the /bills end-point.

The revised whitelist (erroneously) included the “paid_value” and
“due_value” attributes, allowing these to pass to the bill creation logic,
rather than being silently dropped (as was happening previously).

Nic, reading through your code on GitHub, I imagine you generated youir
“bill” model based on the response you received from our API? This means
your POST requests include some parameters that aren’t strictly supported
by the API, such as created_at and updated_at timestamps, but our attribute
filtering normally takes care of these.

One of our developers has corrected the whitelist and I’m currently
verifying the fix. I’ll be sure to drop you both another message once the
patch hits production.

Sorry for the confusion and thanks for your help tracking this down.

Kind regards,
Dave JOn 2 April 2015 at 19:37, Nic Wise nicw@fastchicken.co.nz wrote:

yes, I have had the issue with other calls - mostly when they wouldn’t
accept the default. The library is using RestSharp, so I couldn’t use
DataAttributes to remove things.

I’d be happy to change it, but as it was working up until last week, I’d
rather not, as the appstore’s lead time at the moment is nearly 2 weeks,
and it’s something which has changed at FA’s end…

On 2 April 2015 at 22:54, Jon Free jon.free@wastesource.co.uk wrote:

Nic,

I’ve got it to work again, thankfully. You need to add the following two
lines to your code within UrlParsingSerializer.cs.

json = Remove(json, ““paid_value”:0”);
json = Remove(json, ““due_value”:0”);

I’m assuming you’ve had this issue before as this is what the rest of the
Remove functions in this section appear to do. I did try and do it the
proper way using DataAttributes and the ignore settings but rest sharp
doesn’t seem to support it quite as expected.

I’ve pencilled in an attempt to update it to use
the DataContractJsonSerializer which is all built into .net as this was
would support the Data Attributes correctly. I won’t be doing it today!

Dave, you must have tightened up something at your end as both of our
implementations would have been submitting paid_value and due_value all the
time.

Cheers

Jon

On 2 April 2015 at 09:08, David Jones david.jones@freeagent.com wrote:

Hi Nic, Jon,

Thanks for providing the JSON, I’ll try to find your request in the logs
and I’ll have a shot a reproducing the issue locally.
I’ll let you know what I find.

Thanks for your patience,
Dave J

On Thursday, 2 April 2015 06:09:18 UTC+1, Jon Free wrote:

Ha how did you know I was using the wrapper (thanks for making that,
it’s saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code
the modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/
v2/contacts/1904514",“category”:"/v2/categories/285"
,“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-
04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,"
second_sales_tax_rate":0,“recurring”:"",“status”:null,"
rebill_type":null,“rebill_factor”:0,“comments”:"","
depreciation_schedule":null,“attachment”:null,“updated_at”:
“”,“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s
coming thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which
I’ve had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could follow-up
on the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be
triggered if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a
contact and project, but the supplied project doesn’t actually belong to
the contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the
POST request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following
error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

David Jones
Senior Support Engineer

FreeAgent

Hi Nic, Jon,

Thanks for providing the JSON, I’ll try to find your request in the logs
and I’ll have a shot a reproducing the issue locally.
I’ll let you know what I find.

Thanks for your patience,
Dave JOn Thursday, 2 April 2015 06:09:18 UTC+1, Jon Free wrote:

Ha how did you know I was using the wrapper (thanks for making that, it’s
saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code the
modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/v2/contacts/1904514",“category”:"/v2/categories/285",“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,“second_sales_tax_rate”:0,“recurring”:"",“status”:null,“rebill_type”:null,“rebill_factor”:0,“comments”:"",“depreciation_schedule”:null,“attachment”:null,“updated_at”:"",“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s coming
thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which I’ve
had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could follow-up on
the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered
if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact
and project, but the supplied project doesn’t actually belong to the
contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

Dave,

It was working yesterday, and everyday before that since I released it over
two years ago. And it doesn’t work today, so I’d have to assume something
has been tweaked at your end!

I’ll have to look into grabbing exactly what’s sent over later today and
get back to you.

Thanks

JonOn 1 April 2015 at 13:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into that,
but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.

If you’re worried about posting this in public, you could follow-up on the
email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered if
you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact and
project, but the supplied project doesn’t actually belong to the contact
you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

Hi Dave

Yup, appears to have fixed the problem! Customers happy again :slight_smile:

thanks

NicOn 7 April 2015 at 01:55, David Jones david.jones@freeagent.com wrote:

Hi Guys,

Just a quick note to confirm that we’ve now applied our patch to the
/bills end-point of the API.
Please could you confirm that this has silenced the errors in your
integrations?

Thanks!
Dave J

On Friday, 3 April 2015 16:20:11 UTC+1, David Jones wrote:

Hi Guys,

Thanks for your patience. We’ve found the cause of the problem.
10 days ago we deployed a change to the list of whitelisted attributes
that would be accepted by the /bills end-point.

The revised whitelist (erroneously) included the “paid_value” and
“due_value” attributes, allowing these to pass to the bill creation logic,
rather than being silently dropped (as was happening previously).

Nic, reading through your code on GitHub, I imagine you generated youir
“bill” model based on the response you received from our API? This means
your POST requests include some parameters that aren’t strictly supported
by the API, such as created_at and updated_at timestamps, but our attribute
filtering normally takes care of these.

One of our developers has corrected the whitelist and I’m currently
verifying the fix. I’ll be sure to drop you both another message once the
patch hits production.

Sorry for the confusion and thanks for your help tracking this down.

Kind regards,
Dave J

On 2 April 2015 at 19:37, Nic Wise nicw@fastchicken.co.nz wrote:

yes, I have had the issue with other calls - mostly when they wouldn’t
accept the default. The library is using RestSharp, so I couldn’t use
DataAttributes to remove things.

I’d be happy to change it, but as it was working up until last week, I’d
rather not, as the appstore’s lead time at the moment is nearly 2 weeks,
and it’s something which has changed at FA’s end…

On 2 April 2015 at 22:54, Jon Free jon.free@wastesource.co.uk wrote:

Nic,

I’ve got it to work again, thankfully. You need to add the following
two lines to your code within UrlParsingSerializer.cs.

json = Remove(json, ““paid_value”:0”);
json = Remove(json, ““due_value”:0”);

I’m assuming you’ve had this issue before as this is what the rest of
the Remove functions in this section appear to do. I did try and do it the
proper way using DataAttributes and the ignore settings but rest sharp
doesn’t seem to support it quite as expected.

I’ve pencilled in an attempt to update it to use
the DataContractJsonSerializer which is all built into .net as this was
would support the Data Attributes correctly. I won’t be doing it today!

Dave, you must have tightened up something at your end as both of our
implementations would have been submitting paid_value and due_value all the
time.

Cheers

Jon

On 2 April 2015 at 09:08, David Jones david.jones@freeagent.com wrote:

Hi Nic, Jon,

Thanks for providing the JSON, I’ll try to find your request in the
logs and I’ll have a shot a reproducing the issue locally.
I’ll let you know what I find.

Thanks for your patience,
Dave J

On Thursday, 2 April 2015 06:09:18 UTC+1, Jon Free wrote:

Ha how did you know I was using the wrapper (thanks for making that,
it’s saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code
the modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/v2/
contacts/1904514",“category”:"/v2/categories/285","
reference":“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-04-
02”,“total_value”:22,“paid_value”:0,“due_value”:0,“second_
sales_tax_rate”:0,“recurring”:"",“status”:null,“rebill_type”
:null,“rebill_factor”:0,“comments”:"",“depreciation_schedule”:null,"
attachment":null,“updated_at”:"",“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s
coming thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which
I’ve had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig
into that, but we haven’t had reports from anyone else on this, which I’d
have expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could
follow-up on the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as
I’m testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones <david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be
triggered if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a
contact and project, but the supplied project doesn’t actually belong to
the contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the
POST request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_
bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following
error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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
.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.

Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Dave,

It shouldn’t have anything to do with contacts and projects as I’m testing
it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring? Have
you tightened up some code regarding updating bills and it’s tolerance to
this value being passed when obviously it shouldn’t be? As that is what my
code is doing.

Thanks

JonOn 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered if you
send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact and
project, but the supplied project doesn’t actually belong to the contact
you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST request
you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

yes, I have had the issue with other calls - mostly when they wouldn’t
accept the default. The library is using RestSharp, so I couldn’t use
DataAttributes to remove things.

I’d be happy to change it, but as it was working up until last week, I’d
rather not, as the appstore’s lead time at the moment is nearly 2 weeks,
and it’s something which has changed at FA’s end…On 2 April 2015 at 22:54, Jon Free jon.free@wastesource.co.uk wrote:

Nic,

I’ve got it to work again, thankfully. You need to add the following two
lines to your code within UrlParsingSerializer.cs.

json = Remove(json, ““paid_value”:0”);
json = Remove(json, ““due_value”:0”);

I’m assuming you’ve had this issue before as this is what the rest of the
Remove functions in this section appear to do. I did try and do it the
proper way using DataAttributes and the ignore settings but rest sharp
doesn’t seem to support it quite as expected.

I’ve pencilled in an attempt to update it to use
the DataContractJsonSerializer which is all built into .net as this was
would support the Data Attributes correctly. I won’t be doing it today!

Dave, you must have tightened up something at your end as both of our
implementations would have been submitting paid_value and due_value all the
time.

Cheers

Jon

On 2 April 2015 at 09:08, David Jones david.jones@freeagent.com wrote:

Hi Nic, Jon,

Thanks for providing the JSON, I’ll try to find your request in the logs
and I’ll have a shot a reproducing the issue locally.
I’ll let you know what I find.

Thanks for your patience,
Dave J

On Thursday, 2 April 2015 06:09:18 UTC+1, Jon Free wrote:

Ha how did you know I was using the wrapper (thanks for making that,
it’s saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code the
modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/
v2/contacts/1904514",“category”:"/v2/categories/285"
,“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-
04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,"
second_sales_tax_rate":0,“recurring”:"",“status”:null,"
rebill_type":null,“rebill_factor”:0,“comments”:"","
depreciation_schedule":null,“attachment”:null,“updated_at”:
“”,“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s
coming thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which
I’ve had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could follow-up
on the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be
triggered if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a
contact and project, but the supplied project doesn’t actually belong to
the contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following
error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

If it’s any consolation (it’s not) I have the same issue with MobileAgent.
Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}

I’ll try to get the full json request out. This is something which I’ve had
2 customers email me about in the past 24 hours.On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into that,
but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.

If you’re worried about posting this in public, you could follow-up on the
email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered if
you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact and
project, but the supplied project doesn’t actually belong to the contact
you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.

Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Hi Jon,

Reading through the logs, it looks like that error can be triggered if you
send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact and
project, but the supplied project doesn’t actually belong to the contact
you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST request
you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave JOn Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/v2/contacts/1904514",“category”:"/v2/categories/285",“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,“second_sales_tax_rate”:0,“recurring”:"",“status”:null,“rebill_type”:null,“rebill_factor”:0,“comments”:"",“depreciation_schedule”:null,“attachment”:null,“updated_at”:"",“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET wrapper
:slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s coming
thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which I’ve
had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig into
that, but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.

If you’re worried about posting this in public, you could follow-up on
the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m
testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered if
you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact
and project, but the supplied project doesn’t actually belong to the
contact you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/

Hi Guys,

Just a quick note to confirm that we’ve now applied our patch to the /bills
end-point of the API.
Please could you confirm that this has silenced the errors in your
integrations?

Thanks!
Dave JOn Friday, 3 April 2015 16:20:11 UTC+1, David Jones wrote:

Hi Guys,

Thanks for your patience. We’ve found the cause of the problem.
10 days ago we deployed a change to the list of whitelisted attributes
that would be accepted by the /bills end-point.

The revised whitelist (erroneously) included the “paid_value” and
“due_value” attributes, allowing these to pass to the bill creation logic,
rather than being silently dropped (as was happening previously).

Nic, reading through your code on GitHub, I imagine you generated youir
“bill” model based on the response you received from our API? This means
your POST requests include some parameters that aren’t strictly supported
by the API, such as created_at and updated_at timestamps, but our attribute
filtering normally takes care of these.

One of our developers has corrected the whitelist and I’m currently
verifying the fix. I’ll be sure to drop you both another message once the
patch hits production.

Sorry for the confusion and thanks for your help tracking this down.

Kind regards,
Dave J

On 2 April 2015 at 19:37, Nic Wise nicw@fastchicken.co.nz wrote:

yes, I have had the issue with other calls - mostly when they wouldn’t
accept the default. The library is using RestSharp, so I couldn’t use
DataAttributes to remove things.

I’d be happy to change it, but as it was working up until last week, I’d
rather not, as the appstore’s lead time at the moment is nearly 2 weeks,
and it’s something which has changed at FA’s end…

On 2 April 2015 at 22:54, Jon Free jon.free@wastesource.co.uk wrote:

Nic,

I’ve got it to work again, thankfully. You need to add the following two
lines to your code within UrlParsingSerializer.cs.

json = Remove(json, ““paid_value”:0”);
json = Remove(json, ““due_value”:0”);

I’m assuming you’ve had this issue before as this is what the rest of
the Remove functions in this section appear to do. I did try and do it the
proper way using DataAttributes and the ignore settings but rest sharp
doesn’t seem to support it quite as expected.

I’ve pencilled in an attempt to update it to use
the DataContractJsonSerializer which is all built into .net as this was
would support the Data Attributes correctly. I won’t be doing it today!

Dave, you must have tightened up something at your end as both of our
implementations would have been submitting paid_value and due_value all the
time.

Cheers

Jon

On 2 April 2015 at 09:08, David Jones david.jones@freeagent.com wrote:

Hi Nic, Jon,

Thanks for providing the JSON, I’ll try to find your request in the
logs and I’ll have a shot a reproducing the issue locally.
I’ll let you know what I find.

Thanks for your patience,
Dave J

On Thursday, 2 April 2015 06:09:18 UTC+1, Jon Free wrote:

Ha how did you know I was using the wrapper (thanks for making that,
it’s saved me a boat load of time!)?

And yes, exactly what you have just said is how I assume my code is
working as well (I didn’t actually get a chance to check).

I also couldn’t work out in the time I had where in the wrapper code
the modelled bills are transformed into Json. From past experience, and
depending on how you have done it, you can put DataAttributes over each
item that state what to do if no value if defined on a property ie don’t
transmit it at all!

On 1 April 2015 at 23:14, Nic Wise nicw@fastchicken.co.nz wrote:

And here’s the json I’m sending:

to: /v2/bills

{“bill”:{“project”:"/v2/projects/135061",“contact”:"/
v2/contacts/1904514",“category”:"/v2/categories/285"
,“reference”:“Hdjd”,“dated_on”:“2015-04-02”,“due_on”:“2015-
04-02”,“total_value”:22,“paid_value”:0,“due_value”:0,"
second_sales_tax_rate":0,“recurring”:"",“status”:null,"
rebill_type":null,“rebill_factor”:0,“comments”:"","
depreciation_schedule":null,“attachment”:null,“updated_at”:
“”,“created_at”:""}}

(normally I have an attachment, but… its too big to show :slight_smile: )

On 2 April 2015 at 10:55, Nic Wise nicw@fastchicken.co.nz wrote:

I’ve just had a look - and it also looks like Jon is using my .NET
wrapper :slight_smile:

I’m not setting paid_value in mobileAgent, so I suspect that it’s
coming thru in the JSON like this:

paid_value: 0

rather than being omitted completely. And only on bills apparently?

On 2 April 2015 at 10:46, Nic Wise nicw@fastchicken.co.nz wrote:

If it’s any consolation (it’s not) I have the same issue with
MobileAgent. Been working for a LONG time, but now:

: {“errors”:{“error”:{“message”:“unknown attribute:
paid_value”}}}

I’ll try to get the full json request out. This is something which
I’ve had 2 customers email me about in the past 24 hours.

On 2 April 2015 at 01:32, David Jones david.jones@freeagent.com wrote:

Hi Jon,

I’m not aware of our code validations being changed. I can dig
into that, but we haven’t had reports from anyone else on this, which I’d
have expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a
request where everything does seem valid and you’re still seeing an error.
We’ll then be able to tie that directly to a log and figure out precisely
what’s going on under the hood.

If you’re worried about posting this in public, you could
follow-up on the email you’ve sent to support@freeagent.com?

Thanks,
Dave

On 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as
I’m testing it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red
herring? Have you tightened up some code regarding updating bills and it’s
tolerance to this value being passed when obviously it shouldn’t be? As
that is what my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be
triggered if you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a
contact and project, but the supplied project doesn’t actually belong to
the contact you’ve specified.

Could you check to see whether this is the case with your
integration?
If not, would you be able to provide some specifics about the
POST request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/
vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following
error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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
.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the
sole use of the addressee/s. Access, copying, disclosure or re-use, in any
way, of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole
use of the addressee/s. Access, copying, disclosure or re-use, in any way,
of the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf |
@wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.


Nic Wise
t. +64 21 676 418 | @fastchicken
b. http://www.fastchicken.co.nz/


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.
For more options, visit https://groups.google.com/d/optout.


David Jones
Senior Support Engineer

FreeAgent

Hi Jon,

I’m not aware of our code validations being changed. I can dig into that,
but we haven’t had reports from anyone else on this, which I’d have
expected if something wide-reaching had changed.

In the meantime, please provide us with a specific example of a request
where everything does seem valid and you’re still seeing an error. We’ll
then be able to tie that directly to a log and figure out precisely what’s
going on under the hood.

If you’re worried about posting this in public, you could follow-up on the
email you’ve sent to support@freeagent.com?

Thanks,
DaveOn 1 April 2015 at 12:34, Jon Free jon.free@wastesource.co.uk wrote:

Dave,

It shouldn’t have anything to do with contacts and projects as I’m testing
it against many at my end and none of them work.

Surely the Paid_Value is part of the problem or is that a red herring?
Have you tightened up some code regarding updating bills and it’s tolerance
to this value being passed when obviously it shouldn’t be? As that is what
my code is doing.

Thanks

Jon

On 1 April 2015 at 12:26, David Jones david.jones@freeagent.com wrote:

Hi Jon,

Reading through the logs, it looks like that error can be triggered if
you send params that don’t quite make sense to the API.
The most common mistake is trying to create a bill against a contact and
project, but the supplied project doesn’t actually belong to the contact
you’ve specified.

Could you check to see whether this is the case with your integration?
If not, would you be able to provide some specifics about the POST
request you’re sending to trigger that error, please?
Useful debugging information is listed here.
https://groups.google.com/forum/#!topic/freeagent_api/vAA_bUlVnJU

Thanks,
Dave J

On Wednesday, 1 April 2015 09:32:13 UTC+1, Jon Free wrote:

For some reason this morning I am now receiving the following error.

[FreeAgentException: StatusCode=BadRequest, Response=RestSharp.RestResponse`1[FreeAgent.BillWrapper], Content={“errors”:{“error”:{“message”:“unknown attribute: paid_value”}}}]

I have made now changes to my code.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @
wastesource https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use
of the addressee/s. Access, copying, disclosure or re-use, in any way, of
the contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

Jon Free

WasteSource

07931 925257 | 0117 205 0259

wastesource.co.uk http://www.wastesource.co.uk/?footer=jf | @wastesource
https://twitter.com/#!/WasteSource

Loft 3, Tobacco Factory, Bristol, BS3 1TF

Information in this email is confidential and intended for the sole use of
the addressee/s. Access, copying, disclosure or re-use, in any way, of the
contents of this email by anyone other than the addressee/s is
unauthorised. I accept no legal responsibility for the content of the
message. If you have received this email in error, please return it to the
sender.


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.
For more options, visit https://groups.google.com/d/optout.

David Jones
Senior Support Engineer

FreeAgent