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.
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
keyYour API key.
template_idID of the proposal to use as the template. The aliases proposal_id and id are also accepted.
nameName for the new proposal. This replaces the template proposal name.
contactExisting 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, personDirect client values for the new proposal. These are used only when contact is not provided.
author, ownerUser IDs for the new proposal author and owner. If omitted, these values are copied from the template proposal.
Server-generated fields
typeis always set to0.nris always generated by the server.urlis always generated by the server.createddefaults to today anddeadlinedefaults from the configured offer expiry days.- Integration lock/link fields such as
scoro,zohod,bitrix,bitrixlead,bitrixdeal, andlockedare reset for the new proposal.
Cloned data
- Template entries are cloned exactly, including groups, child entries, linked products, amounts, prices, units, notes, entry feature values, and child-entry selection fields such as
selectableandaccepted.selectableon children is the per-child toggle; parent SELECT! visibility still follows the clonedselectoffsetting. - Proposal settings are copied from the template proposal (including
selectoff/showgroup).tuncis a company setting and is not cloned as a proposal setting. - Additional proposal fields stored in the
fieldstable are copied to the new proposal.
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
{"status":"error","data":"api disabled"}{"status":"error","data":"no key"}{"status":"error","data":"wrong key"}{"status":"error","data":"template_id required"}{"status":"error","data":"template not found"}{"status":"error","data":"name required"}{"status":"error","data":"contact not found"}