Foreign_gross_value is not a number

Hi,

Trying to create some expenses via the API and I’m hitting an error that
I’ve never had before.

foreign_gross_value is not a number. You never asked for this before and
it’s not in your documentation? I’m sending it and I’m still getting the
error so I’m about to look into the payload in more detail,

Can you tell me whether this is a bug or not? It’s not on your
documentation for creating an expense

Thanks,

Dan

Hi Dan,

Thanks for the private message. Looking at the request you’re submitting,
here’s the problem:

…“gross_value”:"-1,140.78"…

If you lose the comma in the value, this will just work. The
foreign_gross_value error you’re seeing is our internal field name for
gross_value (when dealing with foreign currency) leaking out, and I’ll file
a bug to have this fixed, as it’s obviously not very helpful.

Let me know if you still see the issue after trying again.

Cheers,

-J

Hi Dan,

I think I’ve actually found you in our logs, so taking a look at that now.

-JOn Thu, Oct 22, 2015 at 4:36 PM, Dan Jenkins dan@nimblea.pe wrote:

Is there any way I can send you a JSON file? Don’t mind sending you the
actual data as long as it’s not public and stays within freeagent.

Dan

On Thursday, 22 October 2015 15:55:55 UTC+1, Jonathan Barrett wrote:

Hi Dan,

Thanks for getting in touch. That’s an internal parameter that should be
getting abstracted away by the existing API interface. I wouldn’t expect
you to be seeing any reference to it in our error messages, which suggests
a problem at our end.

Can you send me a (sanitised) copy of the JSON you’re submitting so I can
dig in and try and replicate?

Thanks,

-J

On Thursday, 22 October 2015 11:13:31 UTC+1, Dan Jenkins wrote:

So as far as I can tell, I’m sending it, but because it’s a negative
number, when it gets sent as JSON, it’s a string?

Can you give me any more detail about this new field?

Dan

On Thursday, 22 October 2015 10:59:49 UTC+1, Dan Jenkins wrote:

Hi,

Trying to create some expenses via the API and I’m hitting an error
that I’ve never had before.

foreign_gross_value is not a number. You never asked for this before
and it’s not in your documentation? I’m sending it and I’m still getting
the error so I’m about to look into the payload in more detail,

Can you tell me whether this is a bug or not? It’s not on your
documentation for creating an expense

Thanks,

Dan


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.

Jonathan Barrett, Engineer

FreeAgent
+44 (0)131 543 3154
www.freeagent.com | @freeagent https://twitter.com/freeagent

One Edinburgh Quay, 133 Fountainbridge, Edinburgh, EH3 9QG
FreeAgent Central Ltd. Registered in sunny Scotland SC316774

Is there any way I can send you a JSON file? Don’t mind sending you the
actual data as long as it’s not public and stays within freeagent.

DanOn Thursday, 22 October 2015 15:55:55 UTC+1, Jonathan Barrett wrote:

Hi Dan,

Thanks for getting in touch. That’s an internal parameter that should be
getting abstracted away by the existing API interface. I wouldn’t expect
you to be seeing any reference to it in our error messages, which suggests
a problem at our end.

Can you send me a (sanitised) copy of the JSON you’re submitting so I can
dig in and try and replicate?

Thanks,

-J

On Thursday, 22 October 2015 11:13:31 UTC+1, Dan Jenkins wrote:

So as far as I can tell, I’m sending it, but because it’s a negative
number, when it gets sent as JSON, it’s a string?

Can you give me any more detail about this new field?

Dan

On Thursday, 22 October 2015 10:59:49 UTC+1, Dan Jenkins wrote:

Hi,

Trying to create some expenses via the API and I’m hitting an error that
I’ve never had before.

foreign_gross_value is not a number. You never asked for this before and
it’s not in your documentation? I’m sending it and I’m still getting the
error so I’m about to look into the payload in more detail,

Can you tell me whether this is a bug or not? It’s not on your
documentation for creating an expense

Thanks,

Dan

Sent a private reply with a fileOn Thursday, 22 October 2015 16:36:06 UTC+1, Dan Jenkins wrote:

Is there any way I can send you a JSON file? Don’t mind sending you the
actual data as long as it’s not public and stays within freeagent.

Dan

On Thursday, 22 October 2015 15:55:55 UTC+1, Jonathan Barrett wrote:

Hi Dan,

Thanks for getting in touch. That’s an internal parameter that should be
getting abstracted away by the existing API interface. I wouldn’t expect
you to be seeing any reference to it in our error messages, which suggests
a problem at our end.

Can you send me a (sanitised) copy of the JSON you’re submitting so I can
dig in and try and replicate?

Thanks,

-J

On Thursday, 22 October 2015 11:13:31 UTC+1, Dan Jenkins wrote:

So as far as I can tell, I’m sending it, but because it’s a negative
number, when it gets sent as JSON, it’s a string?

Can you give me any more detail about this new field?

Dan

On Thursday, 22 October 2015 10:59:49 UTC+1, Dan Jenkins wrote:

Hi,

Trying to create some expenses via the API and I’m hitting an error
that I’ve never had before.

foreign_gross_value is not a number. You never asked for this before
and it’s not in your documentation? I’m sending it and I’m still getting
the error so I’m about to look into the payload in more detail,

Can you tell me whether this is a bug or not? It’s not on your
documentation for creating an expense

Thanks,

Dan

So as far as I can tell, I’m sending it, but because it’s a negative
number, when it gets sent as JSON, it’s a string?

Can you give me any more detail about this new field?

DanOn Thursday, 22 October 2015 10:59:49 UTC+1, Dan Jenkins wrote:

Hi,

Trying to create some expenses via the API and I’m hitting an error that
I’ve never had before.

foreign_gross_value is not a number. You never asked for this before and
it’s not in your documentation? I’m sending it and I’m still getting the
error so I’m about to look into the payload in more detail,

Can you tell me whether this is a bug or not? It’s not on your
documentation for creating an expense

Thanks,

Dan

Oh that’s interesting. I’ve never had this issue before which means
something has definitely broken in my CSV parsing :slight_smile:

Thanks Jonathan!On Thursday, 22 October 2015 18:00:23 UTC+1, Jonathan Barrett wrote:

Hi Dan,

Thanks for the private message. Looking at the request you’re submitting,
here’s the problem:

…“gross_value”:"-1,140.78"…

If you lose the comma in the value, this will just work. The
foreign_gross_value error you’re seeing is our internal field name for
gross_value (when dealing with foreign currency) leaking out, and I’ll
file a bug to have this fixed, as it’s obviously not very helpful.

Let me know if you still see the issue after trying again.

Cheers,

-J

Hi Dan,

Thanks for getting in touch. That’s an internal parameter that should be
getting abstracted away by the existing API interface. I wouldn’t expect
you to be seeing any reference to it in our error messages, which suggests
a problem at our end.

Can you send me a (sanitised) copy of the JSON you’re submitting so I can
dig in and try and replicate?

Thanks,

-JOn Thursday, 22 October 2015 11:13:31 UTC+1, Dan Jenkins wrote:

So as far as I can tell, I’m sending it, but because it’s a negative
number, when it gets sent as JSON, it’s a string?

Can you give me any more detail about this new field?

Dan

On Thursday, 22 October 2015 10:59:49 UTC+1, Dan Jenkins wrote:

Hi,

Trying to create some expenses via the API and I’m hitting an error that
I’ve never had before.

foreign_gross_value is not a number. You never asked for this before and
it’s not in your documentation? I’m sending it and I’m still getting the
error so I’m about to look into the payload in more detail,

Can you tell me whether this is a bug or not? It’s not on your
documentation for creating an expense

Thanks,

Dan