# Update Invoice

**URL:** <https://api-discuss.freeagent.com/t/update-invoice/525>\
**Category:** Uncategorized\
**Created:** [20 December 2013 00:54 UTC](https://api-discuss.freeagent.com/t/update-invoice/525 "2013-12-20T00:54:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Bibb](https://api-discuss.freeagent.com/letter_avatar_proxy/v4/letter/t/3be4f8/32.png) [@Thomas\_Bibb](https://api-discuss.freeagent.com/u/Thomas_Bibb)\
**Post date:** [20 December 2013 00:54 UTC](https://api-discuss.freeagent.com/t/update-invoice/525/1 "2013-12-20T00:54:09Z")

</div>

Hi,

I’m trying to update an Invoice however when I _PUT_ the update to the  
applicable invoice all the invoice items are duplicated.

I notice the documentation denotes I may need to specify an `id` to delete  
an Invoice item but I want to update a specific line…

Also I don’t want to delete all the lines then recreate as that would mean  
two API calls…

Hopefully you can help.

Tom

---

<div class="post-metadata">

**Author:** ![Graeme\_Boyd1](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/graeme_boyd1/32/1114_2.png) [@Graeme\_Boyd1](https://api-discuss.freeagent.com/u/Graeme_Boyd1)\
**Post date:** [20 December 2013 11:17 UTC](https://api-discuss.freeagent.com/t/update-invoice/525/2 "2013-12-20T11:17:07Z")

</div>

Hi Thomas,

I’ve raised a bug for this. The url for the nested invoice items is not  
being passed through so new ones are being created rather than updated.  
The invoice items resource can be used directly for editing and deleting  
invoice items (use PUT and DELETE HTTP calls) but only for one invoice item  
at a time.

Kind regards,

GraemeOn 20 December 2013 00:54, Thomas Bibb [hello@thomasbibb.co.uk](mailto:hello@thomasbibb.co.uk) wrote:

> Hi,
> 
> I’m trying to update an Invoice however when I _PUT_ the update to the  
> applicable invoice all the invoice items are duplicated.
> 
> I notice the documentation denotes I may need to specify an `id` to  
> delete an Invoice item but I want to update a specific line…
> 
> Also I don’t want to delete all the lines then recreate as that would mean  
> two API calls…
> 
> Hopefully you can help.
> 
> Tom
> 
> –  
> 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](mailto:freeagent_api+unsubscribe@googlegroups.com).  
> To post to this group, send email to [freeagent\_api@googlegroups.com](mailto:freeagent_api@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/freeagent\_api](http://groups.google.com/group/freeagent_api).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

Graeme Boyd  
Senior Software Engineer

Web. [freeagent.com](http://freeagent.com) [http://www.freeagent.com/](http://www.freeagent.com/) Blog. [The FreeAgent Blog - FreeAgent](http://freeagent.com/blog)  
Twitter. @freeagent [https://twitter.com/#!/freeagent](https://twitter.com/#!/freeagent) Facebook.  
[FreeAgent | Edinburgh](http://facebook.com/freeagentapp)

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