Add New Proposal

POST/api/proposals

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
client_id number Mandatory Client ID
proposal_date string Mandatory Proposal date (Y-m-d)
valid_until string Mandatory Valid until date (Y-m-d)
status string optional Optional Status (draft, sent, accepted, declined) default: draft
note string optional Optional Proposal note
content string optional Optional Proposal content
project_id number optional Optional Project ID
tax_id number optional Optional Tax ID
tax_id2 number optional Optional Second tax ID
discount_amount number optional Optional Discount amount
discount_amount_type string optional Optional Discount type (percentage, fixed_amount)
created_by number optional Optional RISE user ID. Default: 1. Use for proper attribution.
items Object[] optional Optional proposal lines, in the same shape GET /api/proposals/:id/items returns. Omit the key to keep the previous behaviour of creating a header with no lines. An empty array is rejected with a 400.
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 POST "https://yoursite.com/api/proposals" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "client_id": "...", "proposal_date": "...", "valid_until": "...", "items.title": "...", "items.quantity": "...", "items.rate": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Proposal add successful."
}
MethodPOST
Path/api/proposals
GroupProposals
Sincev1.0.0
Defined inRestApi/Controllers/ProposalsController.php