Can't Delete Estimate via API

I am trying to delete an estimate via a Google Apps Script. The Docs say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from the
API so I am assuming that I just replace the url from the above with the
url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http 409
error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.

Hi guys,

We have estimate state transitions documented in the API docs. What you
want is “mark as draft” here:

https://dev.freeagent.com/docs/estimates#mark-estimate-as-draft

Hope this helps!

-JOn Thu, Feb 13, 2014 at 12:11 PM, chrisb brain2006@gmail.com wrote:

And should I be able to do this by sending the following PUT:
{“estimate”: {“status”: “Draft”}}

To the estimate url?

On Thursday, 13 February 2014 12:55:14 UTC+1, Darren wrote:

Hi,
I’m Chris’ colleague, at the moment we’ve got a number of estimates that
are ‘marked as sent’ but have not been approved or invoiced and need
deleting.

From what you’re saying do we need to change the status from ‘marked as
sent’ to ‘draft’ before deleting them?

If so, change we change the status using the API?

Thanks,
Darren

On Thursday, February 13, 2014 11:08:48 AM UTC, chrisb wrote:

I am trying to delete an estimate via a Google Apps Script. The Docs say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from
the API so I am assuming that I just replace the url from the above with
the url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http
409 error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.


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.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

And should I be able to do this by sending the following PUT:
{“estimate”: {“status”: “Draft”}}

To the estimate url?On Thursday, 13 February 2014 12:55:14 UTC+1, Darren wrote:

Hi,
I’m Chris’ colleague, at the moment we’ve got a number of estimates that
are ‘marked as sent’ but have not been approved or invoiced and need
deleting.

From what you’re saying do we need to change the status from ‘marked as
sent’ to ‘draft’ before deleting them?

If so, change we change the status using the API?

Thanks,
Darren

On Thursday, February 13, 2014 11:08:48 AM UTC, chrisb wrote:

I am trying to delete an estimate via a Google Apps Script. The Docs say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from
the API so I am assuming that I just replace the url from the above with
the url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http 409
error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.

Great - Thanks!On 13 February 2014 13:21, Jonathan Barrett jonathan@freeagent.com wrote:

Hi guys,

We have estimate state transitions documented in the API docs. What you
want is “mark as draft” here:

https://dev.freeagent.com/docs/estimates#mark-estimate-as-draft

Hope this helps!

-J

On Thu, Feb 13, 2014 at 12:11 PM, chrisb brain2006@gmail.com wrote:

And should I be able to do this by sending the following PUT:
{“estimate”: {“status”: “Draft”}}

To the estimate url?

On Thursday, 13 February 2014 12:55:14 UTC+1, Darren wrote:

Hi,
I’m Chris’ colleague, at the moment we’ve got a number of estimates that
are ‘marked as sent’ but have not been approved or invoiced and need
deleting.

From what you’re saying do we need to change the status from ‘marked as
sent’ to ‘draft’ before deleting them?

If so, change we change the status using the API?

Thanks,
Darren

On Thursday, February 13, 2014 11:08:48 AM UTC, chrisb wrote:

I am trying to delete an estimate via a Google Apps Script. The Docs
say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from
the API so I am assuming that I just replace the url from the above with
the url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http
409 error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.


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.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to a topic in the
Google Groups “FreeAgent API” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/freeagent_api/uUnt-OZqbjM/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Hi Chris,

You can only delete an estimate if it’s a draft estimate that has not been
invoiced. Would this explain the problem?

Regards,
Harry MillsOn Thu, Feb 13, 2014 at 11:08 AM, chrisb brain2006@gmail.com wrote:

I am trying to delete an estimate via a Google Apps Script. The Docs say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from
the API so I am assuming that I just replace the url from the above with
the url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http 409
error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.


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.

Yes I think it would - thanks!On Thursday, 13 February 2014 12:13:34 UTC+1, Harry wrote:

Hi Chris,

You can only delete an estimate if it’s a draft estimate that has not been
invoiced. Would this explain the problem?


Regards,
Harry Mills

On Thu, Feb 13, 2014 at 11:08 AM, chrisb <brai...@gmail.com <javascript:>>wrote:

I am trying to delete an estimate via a Google Apps Script. The Docs say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from
the API so I am assuming that I just replace the url from the above with
the url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http 409
error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.


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.

Hi,
I’m Chris’ colleague, at the moment we’ve got a number of estimates that
are ‘marked as sent’ but have not been approved or invoiced and need
deleting.

From what you’re saying do we need to change the status from ‘marked as
sent’ to ‘draft’ before deleting them?

If so, change we change the status using the API?

Thanks,
DarrenOn Thursday, February 13, 2014 11:08:48 AM UTC, chrisb wrote:

I am trying to delete an estimate via a Google Apps Script. The Docs say:

DELETE https://api.freeagent.com/v2/estimate_items/:id

I can’t see a mention of an id returned when listing the estimates from
the API so I am assuming that I just replace the url from the above with
the url propery for the estimate, e.g.:

https://api.freeagent.com/v2/estimates/123456

And send a http DELETE to this URL. However, I am just getting a http 409
error and I am not sure why.

Is the above correct and do you have any ideas? Listing and creating
estimates is working fine so I am confident the authentication is working
OK.