Back to API docs

apiopenaddproposal browser flow requires login

POST /api/openaddproposal is not an API-key JSON endpoint. It is an authenticated admin/browser route for opening the proposal composer with client data prefilled.

Authentication

The user must already be logged in to the admin app. Send a normal browser form POST; no API key or CSRF token field is required for this route. The route stores sanitized fields in session flash and redirects to /addproposal.

Accepted fields

client, code, person, phone, email, address
strings, optional

Client information shown in the client block of the new proposal form.

vat, website, city
strings, optional

Extra client data. vat maps to the VAT code field and website maps to the website field. city is accepted for future/custom flow use.

name or title
string, optional

Proposal name. If only title is provided, it is used as name.

deadline, comment, template_id
optional

Deadline must be parseable as a date. template_id is currently stored only as a sanitized hint.

HTML form example

<form method="post" action="/api/openaddproposal">
  <input name="client" value="Example UAB">
  <input name="code" value="123456789">
  <input name="person" value="John Smith">
  <input name="email" value="john@example.com">
  <input name="name" value="New proposal for Example UAB">
  <button type="submit">Open proposal</button>
</form>

Flow