500 error when creating an estimate item

I am posting the following:
{
“estimate_item”: {
“description”: “Testing”,
“quantity”: 2,
“price”: 12.5,
“second_sales_tax_rate”: 0,
“sales_tax_rate”: 20,
“item_type”: “-no unit-”,
“category”: “https://api.freeagent.com/v2/categories/002
},
“estimate”: “https://api.freeagent.com/v2/estimates/406077
}

to https://api.freeagent.com/v2/estimate_items, but getting a 500 error
back. The JSON is valid.

Any ideas?

Hi Mark,

I’m afraid setting the category on the estimate_item in this call is
causing the request to fail. This is a problem on our end that we need to
fix.
The category can be set fine when updating the original estimate though, so
a workaround would be to update the estimate with the new estimate item:

PUT https://api.freeagent.com/v2/estimates/406077

{ “estimate”:
{
“estimate_items”: [
{
“description”: “Testing”,
“quantity”: 2,
“price”: 12.5,
“second_sales_tax_rate”: 0,
“sales_tax_rate”: 20,
“item_type”: “-no unit-”,
“category”: “https://api.freeagent.com/v2/categories/002
}
]
}
}

This will add an estimate item to the existing estimate 406077.

I’m sorry about this. Would the workaround work for you?

Regards,
T.J.On 30 September 2013 15:49, T.J. Sheehy tj@freeagent.com wrote:

Hi Mark,

Sorry for the delay. I’m looking into this now.

Regards,
T.J.

On 27 September 2013 01:56, Mark Brown mark@itpoint.co.uk wrote:

I am posting the following:
{
“estimate_item”: {
“description”: “Testing”,
“quantity”: 2,
“price”: 12.5,
“second_sales_tax_rate”: 0,
“sales_tax_rate”: 20,
“item_type”: “-no unit-”,
“category”: “https://api.freeagent.com/v2/categories/002
},
“estimate”: “https://api.freeagent.com/v2/estimates/406077
}

to https://api.freeagent.com/v2/estimate_items, but getting a 500 error
back. The JSON is valid.

Any ideas?


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/groups/opt_out.


T.J. Sheehy
Senior Software Engineer
FreeAgent
0131 543 3184

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

T.J. Sheehy
Senior Software Engineer
FreeAgent
0131 543 3184

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

Thanks, that worked. That’s actually the way we do it for invoice items,
so that’s fine.

Regards,
MarkOn Tuesday, 1 October 2013 11:47:48 UTC+1, T.J. Sheehy wrote:

Hi Mark,

I’m afraid setting the category on the estimate_item in this call is
causing the request to fail. This is a problem on our end that we need to
fix.
The category can be set fine when updating the original estimate though,
so a workaround would be to update the estimate with the new estimate item:

PUT https://api.freeagent.com/v2/estimates/406077

{ “estimate”:
{
“estimate_items”: [
{
“description”: “Testing”,
“quantity”: 2,
“price”: 12.5,
“second_sales_tax_rate”: 0,
“sales_tax_rate”: 20,
“item_type”: “-no unit-”,
“category”: “https://api.freeagent.com/v2/categories/002
}
]
}
}

This will add an estimate item to the existing estimate 406077.

I’m sorry about this. Would the workaround work for you?

Regards,
T.J.

On 30 September 2013 15:49, T.J. Sheehy <t...@freeagent.com <javascript:>>wrote:

Hi Mark,

Sorry for the delay. I’m looking into this now.

Regards,
T.J.

On 27 September 2013 01:56, Mark Brown <ma...@itpoint.co.uk <javascript:> wrote:

I am posting the following:
{
“estimate_item”: {
“description”: “Testing”,
“quantity”: 2,
“price”: 12.5,
“second_sales_tax_rate”: 0,
“sales_tax_rate”: 20,
“item_type”: “-no unit-”,
“category”: “https://api.freeagent.com/v2/categories/002
},
“estimate”: “https://api.freeagent.com/v2/estimates/406077
}

to https://api.freeagent.com/v2/estimate_items, but getting a 500 error
back. The JSON is valid.

Any ideas?


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_ap...@googlegroups.com <javascript:>.
To post to this group, send email to freeag...@googlegroups.com<javascript:>
.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/groups/opt_out.


T.J. Sheehy
Senior Software Engineer
FreeAgent
0131 543 3184

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp


T.J. Sheehy
Senior Software Engineer
FreeAgent
0131 543 3184

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp

Hi Mark,

Sorry for the delay. I’m looking into this now.

Regards,
T.J.On 27 September 2013 01:56, Mark Brown mark@itpoint.co.uk wrote:

I am posting the following:
{
“estimate_item”: {
“description”: “Testing”,
“quantity”: 2,
“price”: 12.5,
“second_sales_tax_rate”: 0,
“sales_tax_rate”: 20,
“item_type”: “-no unit-”,
“category”: “https://api.freeagent.com/v2/categories/002
},
“estimate”: “https://api.freeagent.com/v2/estimates/406077
}

to https://api.freeagent.com/v2/estimate_items, but getting a 500 error
back. The JSON is valid.

Any ideas?


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/groups/opt_out.

T.J. Sheehy
Senior Software Engineer
FreeAgent
0131 543 3184

Web. freeagent.com http://www.freeagent.com/
Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent
Facebook. facebook.com/freeagentapp