Back to API docs

apicreateproposalfromtemplate JSON request body template clone no product payload

POST /api/createproposalfromtemplate creates a new proposal by cloning another proposal and changing only the customer-facing details.

Scope

This endpoint does not accept products or entries. It copies entries from the template proposal, including linked products, line data, groups, child entries, and entry feature values. Proposal totals are recalculated after the clone is created.

Top-level JSON fields

key
string, required

Your API key.

template_id
integer, required

ID of the proposal to use as the template. The aliases proposal_id and id are also accepted.

name
string, required

Name for the new proposal. This replaces the template proposal name.

contact
integer or object, optional

Existing contact id or a contact object accepted by /api/createcontact. When provided, the new proposal gets client, code, and person from that contact.

client, code, person
string, optional

Direct client values for the new proposal. These are used only when contact is not provided.

author, owner
integer, optional

User IDs for the new proposal author and owner. If omitted, these values are copied from the template proposal.

Server-generated fields

Cloned data

Minimal request

{
  "key": "YOUR_API_KEY",
  "template_id": 125,
  "name": "Website redesign offer",
  "author": 3,
  "owner": 3,
  "client": "Example UAB",
  "code": "123456789",
  "person": "John Smith"
}

Request using an existing contact

{
  "key": "YOUR_API_KEY",
  "template_id": 125,
  "name": "Website redesign offer",
  "author": 3,
  "owner": 3,
  "contact": 42
}

Request creating/updating contact first

{
  "key": "YOUR_API_KEY",
  "template_id": 125,
  "name": "Website redesign offer",
  "contact": {
    "name": "Example UAB",
    "code": "123456789",
    "person": "John Smith",
    "email": "john@example.com",
    "phone": "+37060000000"
  }
}

Response

{
  "status": "ok",
  "data": {
    "proposal": { "id": 456, "name": "Website redesign offer", "type": 0 },
    "entries": [],
    "url": "https://example.com/offer/generated-url"
  }
}

Error responses