patch
https://roofrabbit.io/agreements/
Saves changes to a document's fields, options and line items in one request. A proposal or contract can only be changed while it is a draft; once it is sent it is locked. Estimates can be changed until they are voided.
Send the changes inside an agreement object:
title,description,termsandvalid_until.tax_rate, a percentage from 0 to 100. Leave it empty to use the company's sales tax rate.target_margin_pct, the margin the rep is aiming for, as a percentage below 100.agreement_options_attributes: one entry per option. Includeidto change an existing option (name,scope_description,recommended), omit it to add one, or send_destroy: trueto remove it.- Inside an option,
agreement_line_items_attributesworks the same way for its lines:description,category,quantity,product_unit_id,unit_price,unit_cost,product_idandposition. A blankunit_costmeans the cost is unknown, and the option's cost and margin are then left empty.
Totals and tax are recalculated on save. By default the response is empty; pass include=proposal (or include=contract) to get the saved document back with its recalculated totals. The token's role must be allowed to prepare estimates, and must either have access to all records or be the sales rep assigned to the deal.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
204The changes were saved. Nothing is returned.