Handle Generate Proposal
A proposal computed from the contract's current terms.
Read-only: it returns the active template's slots filled from the
CRM, the line items, and why each blank is blank, and stores
nothing. Reached from a contract (contractId) or a deal (dealId,
resolved to its live contract). Refused with {code, message}, from
a deal, once the deal is closed; from a contract, while it is Draft
(CONTRACT_DRAFT), whatever its deal's status; and for a snapshot
or duplicate contract (400), an account with
no active proposal template (409), or a missing deal or contract
(404). The document comes from the compose action. A contract-scoped
Generate is refused 403 NOT_ENABLED for an account without
proposals from a contract.
Body·
Generate from a contract, or from a deal, which resolves to its live contract.
- Type: stringcontract
Id min length:1max length:50nullableContract ID
- Type: stringdeal
Id min length:1max length:50nullableDeal ID
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://crm.dreamhub.ai/api/v1/contracts/proposals/generate \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"contractId": "",
"dealId": ""
}'
{
"templateId": "string",
"versionId": "string",
"proposalName": "string",
"contractId": "string",
"dealId": "string",
"sections": [
{
"id": "string",
"title": "string"
}
],
"signaturePlaces": 1,
"slots": [
{
"id": "string",
"section": "string",
"label": "string",
"kind": "string",
"source": "string",
"record": "string",
"display": "string",
"readOnly": true,
"readOnlyNote": "string",
"multiline": true,
"maxLength": 1,
"boxes": [
{
"page": 1,
"x": 1,
"y": 1,
"width": 1,
"height": 1,
"fontSize": 1,
"padding": 1,
"font": "string",
"color": "string"
}
],
"value": "string",
"typedValue": "string",
"missing": {
"record": "string",
"recordId": "string",
"field": "string"
},
"needsInput": false,
"required": false
}
],
"lines": [
{
"additionalProperty": "string"
}
],
"document": {
"additionalProperty": null
},
"actions": [
{
"name": "string",
"uri": "string",
"method": "string"
}
]
}
