Jump to content

Sales invoice update


 Share

Recommended Posts

Hello,

I want to update invoice by adding new lines to it and I want rest of the data in the invoice to remain the same. To do that, is it enough to just specify "invoice_lines" field in the update request that will contain both existing and new lines? Do I need to specify all other invoice fields if I don't want to change their values?

Thanks in advance.

Link to comment
Share on other sites

HI,

Thank you for your question. 

You would need to send all item lines that you need to keep along with their associated values including any analysis_types that they may be associated with.

If you sent only the invoice_line that you wish to add/change the invoice would then only have a single invoice_line. 

Have you created a trial account to develop against and test your code?

Thanks

Mark
 

Link to comment
Share on other sites

Hi Mark,

Thanks for answering. I have created trial account and tested. I read the part about updating invoice with invoice lines from documentation and I think that I understand the part about updating invoice_lines in the invoice.

I couldn't find the part about whether update of invoice behaves as sparse or full update. I am wondering if I need to also specify all other fields of the invoice when I want to just update the invoice_lines, such as date, invoice_number, due_date, reference, address, etc. From what I've tested, it seems that it is enough to just specify updated invoice_lines (if I omit all other invoice fields, they will stay the same and won't be overriden). I would like to confirm if that truly is case?

Thanks

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...