Update a Proposal

PUT/api/proposals/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Proposal unique ID
proposal_date string optional Optional Proposal 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
content string optional Optional Content to update
discount_amount number optional Optional Discount amount to update
items Object[] optional Optional replacement proposal lines, in the same shape GET /api/proposals/: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 proposal.
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/proposals/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": 200,
  "messages": {"success": "Proposal Update Successful."}
}
MethodPUT
Path/api/proposals/{id}
GroupProposals
Sincev1.0.0
Defined inRestApi/Controllers/ProposalsController.php