Invoices related to a contact

I’m trying to pull invoices related to a specific contact using the
following call:

GET https://api.freeagent.com/v2/invoices/contact=/contact/xxxxxx

It’s returning Resource Not Found. Is there an additional query I need to
give it?

Thanks Olly, confirmed as working.On Wednesday, May 23, 2012 12:50:33 PM UTC+1, Olly H wrote:

Hi everyone

Ok, to clarify, the correct method for filtering invoices by contact is:

GET /v2/invoices?contact=/v2/contact/:contact-id

It seems there was a bug related to this which has just been fixed, so
please can you verify that the above now works?

If you are using another approached as discussed in this thread, please
revert to this correct, documented form ASAP? Non-documented approaches
are not guaranteed to be supported. Thanks!

We are aware of a similar issue with bills and estimates which are being
worked on. Sorry for the trouble.

Thanks
Olly

On Thursday, May 17, 2012 11:54:17 AM UTC+1, Steven Easton wrote:

Thanks Olly, this works!

The solution posted by Ross (
https://api.sandbox.freeagent.com/v2/contacts/187/invoices ) also
returns the same results.

Steven

On Thursday, May 17, 2012 11:41:15 AM UTC+1, Olly H wrote:

Hi

I haven’t dug into this but there may well be a documentation issue.
I’ll need to clarify with Graeme and/or another engineer.

Could you try:

GET https://api.sandbox.freeagent.com/v2/invoices?contact_id=xxx

Olly

On Wednesday, May 16, 2012 5:16:07 PM UTC+1, Ross Grayton wrote:

On the Sandbox API at least, the following works for me:

GET https://api.sandbox.freeagent.com/v2/contacts/187/invoices

Thanks Olly, this works!

The solution posted by Ross (
https://api.sandbox.freeagent.com/v2/contacts/187/invoices ) also returns
the same results.

StevenOn Thursday, May 17, 2012 11:41:15 AM UTC+1, Olly H wrote:

Hi

I haven’t dug into this but there may well be a documentation issue. I’ll
need to clarify with Graeme and/or another engineer.

Could you try:

GET https://api.sandbox.freeagent.com/v2/invoices?contact_id=xxx

Olly

On Wednesday, May 16, 2012 5:16:07 PM UTC+1, Ross Grayton wrote:

On the Sandbox API at least, the following works for me:

GET https://api.sandbox.freeagent.com/v2/contacts/187/invoices

On the Sandbox API at least, the following works for me:

GET https://api.sandbox.freeagent.com/v2/contacts/187/invoices

Hi everyone

Ok, to clarify, the correct method for filtering invoices by contact is:

GET /v2/invoices?contact=/v2/contact/:contact-id

It seems there was a bug related to this which has just been fixed, so
please can you verify that the above now works?

If you are using another approached as discussed in this thread, please
revert to this correct, documented form ASAP? Non-documented approaches
are not guaranteed to be supported. Thanks!

We are aware of a similar issue with bills and estimates which are being
worked on. Sorry for the trouble.

Thanks
OllyOn Thursday, May 17, 2012 11:54:17 AM UTC+1, Steven Easton wrote:

Thanks Olly, this works!

The solution posted by Ross (
https://api.sandbox.freeagent.com/v2/contacts/187/invoices ) also returns
the same results.

Steven

On Thursday, May 17, 2012 11:41:15 AM UTC+1, Olly H wrote:

Hi

I haven’t dug into this but there may well be a documentation issue.
I’ll need to clarify with Graeme and/or another engineer.

Could you try:

GET https://api.sandbox.freeagent.com/v2/invoices?contact_id=xxx

Olly

On Wednesday, May 16, 2012 5:16:07 PM UTC+1, Ross Grayton wrote:

On the Sandbox API at least, the following works for me:

GET https://api.sandbox.freeagent.com/v2/contacts/187/invoices

Thanks Graeme,

No joy on contact as a query. Tried your suggestion as well as
contact=xxxxx, contact=contact/xxxxx etc…

They all correctly return invoices, just not filtered by contact.

StevenOn Thursday, May 10, 2012 5:23:31 PM UTC+1, Graeme Boyd wrote:

Hi Steven,

That would be an error in the docs. I think the correct way is to supply
the contact as a query parameter rather than a path parameter like so:

GET https://api.freeagent.com/v2/invoices?contact=/contact/xxxxxx

I will double check and fix up the documentation tomorrow.

Cheers,

Graeme

On 10 May 2012 17:16, Steven Easton steven@littleredletter.com wrote:

I’m trying to pull invoices related to a specific contact using the
following call:

GET https://api.freeagent.com/v2/invoices/contact=/contact/xxxxxx

It’s returning Resource Not Found. Is there an additional query I need
to give it?


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/freeagent_api/-/0fnRAXEz8usJ.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to
freeagent_api+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=en.


Graeme Boyd
Senior Software Engineer
FreeAgent Central Ltd
40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Hi Steven,

That would be an error in the docs. I think the correct way is to supply
the contact as a query parameter rather than a path parameter like so:

GET https://api.freeagent.com/v2/invoices?contact=/contact/xxxxxx

I will double check and fix up the documentation tomorrow.

Cheers,

Graeme

I’m trying to pull invoices related to a specific contact using the
following call:

GET https://api.freeagent.com/v2/invoices/contact=/contact/xxxxxx

It’s returning Resource Not Found. Is there an additional query I need to
give it?


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To view this discussion on the web visit
https://groups.google.com/d/msg/freeagent_api/-/0fnRAXEz8usJ.
To post to this group, send email to freeagent_api@googlegroups.com.
To unsubscribe from this group, send email to
freeagent_api+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/freeagent_api?hl=en.

Graeme Boyd
Senior Software Engineer
FreeAgent Central Ltd
40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Hi

I haven’t dug into this but there may well be a documentation issue. I’ll
need to clarify with Graeme and/or another engineer.

Could you try:

GET https://api.sandbox.freeagent.com/v2/invoices?contact_id=xxx

OllyOn Wednesday, May 16, 2012 5:16:07 PM UTC+1, Ross Grayton wrote:

On the Sandbox API at least, the following works for me:

GET https://api.sandbox.freeagent.com/v2/contacts/187/invoices