Update an Estimate
PUT/api/estimates/{id}
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| id | Number | Estimate unique ID |
| client_id | number | optional Optional Client ID to update |
| estimate_date | string | optional Optional Estimate date to update |
| valid_until | string | optional Optional Valid until date to update |
| status | string | optional Optional Status to update |
| note | string | optional Optional Note to update |
| project_id | number | optional Optional Project ID to update |
| tax_id | number | optional Optional Tax ID to update |
| discount_amount | number | optional Optional Discount amount to update |
| items | Object[] | optional Optional replacement estimate lines, in the same shape GET /api/estimates/:id/items returns. When present the existing lines are replaced; when absent the lines are left untouched. An empty array is rejected with a 400 instead of clearing the estimate. |
| items.title | String | Mandatory line title. A description is accepted instead. |
| items.description | String | optional Optional line description |
| items.quantity | Number | Mandatory quantity, numeric |
| items.rate | Number | Mandatory unit rate, numeric |
| items.unit_type | String | optional Optional unit type, maximum 20 characters |
| items.sort | Number | optional Optional display order. Defaults to the array position. |
| items.item_id | Number | optional Optional items library ID |
curl -X PUT "https://yoursite.com/api/estimates/123" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "items.title": "...", "items.quantity": "...", "items.rate": "..." }' Success-Response:
HTTP/1.1 200 OK
{
"status": true,
"message": "Estimate Update Successful."
}