Skip to main content
The workflows below are for draft quotes. Update line items before issuing the quote.

Update quote line items

To add, replace, or remove line items while updating other quote fields, call PATCH /receivables/{receivable_id}. The response for every quote line item includes a stable id; use that ID when replacing or removing an existing item. The line_items object can contain add, replace, and remove operations in the same request. Each item in add and replace[].data uses the complete line item shape accepted by the replace line items endpoint. A replace operation keeps the existing line item’s ID.
Include at least one operation. Do not use the same line item ID more than once or in both replace and remove. The final quote must contain at least one line item. Tesouro recalculates the totals from the resulting list and records the header and line-item changes in one history entry.

Replace all quote line items

To replace the entire list in a separate request, send a PUT request to the /receivables/{receivable_id}/line-items endpoint. In the request body, use the data field to specify the quote’s new line items. This endpoint is unchanged.
A successful request overwrites the quote’s existing line items and replaces them with the newly defined array of line item objects.