Handle Compose Proposal Draft

​

A draft proposal composed into its template's PDF.

Read-only: the editor sends what Generate returned plus what the rep typed, and gets the PDF back, with the DRAFT watermark and a marker in every empty box. The preview refresh and the download both call it.

Two headers report what the document could not show as given, so the editor can flag the slot: X-Proposal-Unsupported-Slots lists slots holding characters the document's font cannot draw, and X-Proposal-Cut-Slots what was cut with "…": slots whose text would have run past the page's bottom edge, and line-item table cells whose text did not fit their row. Each is a comma-separated list, sent only when not empty.

Body·

required
application/json

What the editor sends to have a draft composed: everything Generate returned for the proposal, plus what the rep typed. Values are already formatted for display. The keys inside values (slot ids) and inside each line (line source keys, such as line.name) are passed as they are, not camel-cased.

  • Names the downloaded file

  • Template version ID (dtv-)

  • For a flowing (v2) template, the rep's choice for each optional block, by block id; a block left out takes its default

    Properties: 1
  • The fee table's rows, in order, by line source key; a bundle's rows also carry row.type

    Properties: 1
  • Each slot's value, by slot id

    Properties: 1

Responses

  • application/pdf
  • application/json
  • application/json
Request Example for post/proposals/compose
curl https://crm.dreamhub.ai/api/v1/contracts/proposals/compose \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "templateVersionId": "",
  "proposalName": "",
  "values": {
    "additionalProperty": ""
  },
  "lines": [
    {
      "additionalProperty": ""
    }
  ],
  "included": {
    "additionalProperty": true
  }
}'
No Body