Skip to main content
POST
/
quotations
Create quotation
curl --request POST \
  --url https://api.heffl.com/api/v2/quotations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "clientId": "<string>",
  "templateId": "<string>",
  "date": "2023-11-07T05:31:56Z",
  "quotationProducts": [
    {
      "name": "<string>",
      "quantity": 123,
      "price": 123,
      "productId": "<string>",
      "description": "<string>",
      "tax": 123,
      "taxRateId": "<string>",
      "discount": 123,
      "scope": "<string>"
    }
  ],
  "contactId": "<string>",
  "dealId": "<string>",
  "expiryDate": "2023-11-07T05:31:56Z",
  "subject": "<string>",
  "title": "<string>",
  "isInclusiveTax": true,
  "contentHtml": "<string>",
  "internalNotes": "<string>",
  "salesPersonId": "<string>",
  "currency": "<string>",
  "conversionRate": 123,
  "tags": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "number": "<string>",
  "date": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "subject": "<string>",
  "expiryDate": "2023-11-07T05:31:56Z",
  "conversionRate": 123,
  "isInclusiveTax": true,
  "clientId": "<string>",
  "contactId": "<string>",
  "dealId": "<string>",
  "salesPersonId": "<string>",
  "templateId": "<string>",
  "contentHtml": "<string>",
  "internalNotes": "<string>",
  "totalAmount": 123,
  "subtotalAmount": 123,
  "totalTaxAmount": 123,
  "totalDiscountAmount": 123,
  "tagIds": [
    "<string>"
  ],
  "lineItems": [
    {
      "name": "<string>",
      "quantity": 123,
      "price": 123,
      "productId": "<string>",
      "description": "<string>",
      "tax": 123,
      "taxRateId": "<string>",
      "discount": 123,
      "scope": "<string>"
    }
  ],
  "markedAcceptedOn": "2023-11-07T05:31:56Z",
  "markedRejectedOn": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at app.heffl.com/settings/developers

Body

application/json
clientId
string
required

Contact or company ID (clt_ prefix)

templateId
string
required

Document template ID (tpl_ prefix)

date
string<date-time>
required

Quotation date

quotationProducts
object[]
required

Line items

Minimum array length: 1
contactId
string

Optional contact person ID (clt_ prefix) when clientId is a company

dealId
string

Deal ID (dl_ prefix)

expiryDate
string<date-time>

Expiry date

subject
string

Subject

title
string

Internal title

status
enum<string>

Initial status (defaults to DRAFT)

Available options:
DRAFT,
SENT,
ACCEPTED,
REJECTED
isInclusiveTax
boolean

Whether prices include tax

contentHtml
string

Document HTML (defaults from template when omitted)

internalNotes
string

Internal notes

salesPersonId
string

Sales person user ID (usr_ prefix)

currency
string

ISO 4217 currency code

conversionRate
number

Quotation currency to team currency rate

tags
string[]

Tag IDs (tag_ prefix)

{key}
any

Custom field values using cf_* keys

Response

OK

id
string
required

Quotation ID (qtn_ prefix)

number
string
required

Auto-generated quotation number

date
string<date-time>
required

Quotation date

status
enum<string>
required

Quotation status

Available options:
DRAFT,
SENT,
ACCEPTED,
REJECTED
currency
string
required

ISO 4217 currency code

createdAt
string<date-time>
required
subject
string | null

Subject

expiryDate
string<date-time> | null

Expiry date

conversionRate
number

Quotation currency to team currency rate

isInclusiveTax
boolean

Whether prices include tax

clientId
string | null

Contact or company ID (clt_ prefix)

contactId
string | null

Optional contact person ID (clt_ prefix) when clientId is a company

dealId
string | null

Deal ID (dl_ prefix)

salesPersonId
string | null

Sales person user ID (usr_ prefix)

templateId
string | null

Document template ID (tpl_ prefix)

contentHtml
string | null

Rendered document HTML

internalNotes
string | null

Internal notes

totalAmount
number

Total including tax

subtotalAmount
number

Subtotal before tax

totalTaxAmount
number

Total tax amount

totalDiscountAmount
number

Total discount amount

tagIds
string[]

Tag IDs (tag_ prefix)

lineItems
object[]

Line items (included on get; empty on list)

markedAcceptedOn
string<date-time> | null

When the quotation was accepted

markedRejectedOn
string<date-time> | null

When the quotation was rejected

updatedAt
string<date-time> | null
{key}
any

Custom field values using cf_* keys