Skip to main content

I want to add items from multiple sources to QuickBooks and send the invoice weekly. I’m able to create the first line-items in QuickBooks, but when I add the next items using update invoice trigger it deletes the items that were in the invoice before. I have a workaround planned but just wanted to know if this is really how it works.

 

 

 

 

Hi @Santeri 

Good question.

You’d first need to find the invoice to get the existing Invoice Line Items, then use logic to combine the new line items with the existing line items before updating so that all line items (old + new) are sent as part of the update.

 

QBO API - Full Update An Invoice

https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#full-update-an-invoice

Use this operation to update any of the writable fields of an existing invoice object. The request body must include all writable fields of the existing object as returned in a read response. Writable fields omitted from the request body are set to NULL. The ID of the object to update is specified in the request body.

Hi @Santeri 

Good question.

You’d first need to find the invoice to get the existing Invoice Line Items, then use logic to combine the new line items with the existing line items before updating so that all line items (old + new) are sent as part of the update.

 

QBO API - Full Update An Invoice

https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice#full-update-an-invoice

Use this operation to update any of the writable fields of an existing invoice object. The request body must include all writable fields of the existing object as returned in a read response. Writable fields omitted from the request body are set to NULL. The ID of the object to update is specified in the request body.

Thanks Troy, this is a great approach.


So pleased to see Troy was able to help get you pointed in the right direction here, @Santeri! 😁

Have you got everything set up now? If you’re running into any issues on that at all please do let us know!


Reply