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>"
]
}
'import requests
url = "https://api.heffl.com/api/v2/quotations"
payload = {
"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>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>']
})
};
fetch('https://api.heffl.com/api/v2/quotations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.heffl.com/api/v2/quotations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.heffl.com/api/v2/quotations"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"templateId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"quotationProducts\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"price\": 123,\n \"productId\": \"<string>\",\n \"description\": \"<string>\",\n \"tax\": 123,\n \"taxRateId\": \"<string>\",\n \"discount\": 123,\n \"scope\": \"<string>\"\n }\n ],\n \"contactId\": \"<string>\",\n \"dealId\": \"<string>\",\n \"expiryDate\": \"2023-11-07T05:31:56Z\",\n \"subject\": \"<string>\",\n \"title\": \"<string>\",\n \"isInclusiveTax\": true,\n \"contentHtml\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"salesPersonId\": \"<string>\",\n \"currency\": \"<string>\",\n \"conversionRate\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.heffl.com/api/v2/quotations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"<string>\",\n \"templateId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"quotationProducts\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"price\": 123,\n \"productId\": \"<string>\",\n \"description\": \"<string>\",\n \"tax\": 123,\n \"taxRateId\": \"<string>\",\n \"discount\": 123,\n \"scope\": \"<string>\"\n }\n ],\n \"contactId\": \"<string>\",\n \"dealId\": \"<string>\",\n \"expiryDate\": \"2023-11-07T05:31:56Z\",\n \"subject\": \"<string>\",\n \"title\": \"<string>\",\n \"isInclusiveTax\": true,\n \"contentHtml\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"salesPersonId\": \"<string>\",\n \"currency\": \"<string>\",\n \"conversionRate\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v2/quotations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"<string>\",\n \"templateId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"quotationProducts\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"price\": 123,\n \"productId\": \"<string>\",\n \"description\": \"<string>\",\n \"tax\": 123,\n \"taxRateId\": \"<string>\",\n \"discount\": 123,\n \"scope\": \"<string>\"\n }\n ],\n \"contactId\": \"<string>\",\n \"dealId\": \"<string>\",\n \"expiryDate\": \"2023-11-07T05:31:56Z\",\n \"subject\": \"<string>\",\n \"title\": \"<string>\",\n \"isInclusiveTax\": true,\n \"contentHtml\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"salesPersonId\": \"<string>\",\n \"currency\": \"<string>\",\n \"conversionRate\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"number": "<string>",
"date": "2023-11-07T05:31:56Z",
"status": "DRAFT",
"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,
"discountType": "fixed",
"viewType": "LINE_ITEM",
"scope": "<string>"
}
],
"markedAcceptedOn": "2023-11-07T05:31:56Z",
"markedRejectedOn": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Quotations
Create quotation
Creates a new quotation with line items. Requires clientId (clt_) and templateId (tpl_). Custom field values use cf_* keys — see the Custom fields guide.
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>"
]
}
'import requests
url = "https://api.heffl.com/api/v2/quotations"
payload = {
"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>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>']
})
};
fetch('https://api.heffl.com/api/v2/quotations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.heffl.com/api/v2/quotations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.heffl.com/api/v2/quotations"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"templateId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"quotationProducts\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"price\": 123,\n \"productId\": \"<string>\",\n \"description\": \"<string>\",\n \"tax\": 123,\n \"taxRateId\": \"<string>\",\n \"discount\": 123,\n \"scope\": \"<string>\"\n }\n ],\n \"contactId\": \"<string>\",\n \"dealId\": \"<string>\",\n \"expiryDate\": \"2023-11-07T05:31:56Z\",\n \"subject\": \"<string>\",\n \"title\": \"<string>\",\n \"isInclusiveTax\": true,\n \"contentHtml\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"salesPersonId\": \"<string>\",\n \"currency\": \"<string>\",\n \"conversionRate\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.heffl.com/api/v2/quotations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"<string>\",\n \"templateId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"quotationProducts\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"price\": 123,\n \"productId\": \"<string>\",\n \"description\": \"<string>\",\n \"tax\": 123,\n \"taxRateId\": \"<string>\",\n \"discount\": 123,\n \"scope\": \"<string>\"\n }\n ],\n \"contactId\": \"<string>\",\n \"dealId\": \"<string>\",\n \"expiryDate\": \"2023-11-07T05:31:56Z\",\n \"subject\": \"<string>\",\n \"title\": \"<string>\",\n \"isInclusiveTax\": true,\n \"contentHtml\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"salesPersonId\": \"<string>\",\n \"currency\": \"<string>\",\n \"conversionRate\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v2/quotations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"<string>\",\n \"templateId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"quotationProducts\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 123,\n \"price\": 123,\n \"productId\": \"<string>\",\n \"description\": \"<string>\",\n \"tax\": 123,\n \"taxRateId\": \"<string>\",\n \"discount\": 123,\n \"scope\": \"<string>\"\n }\n ],\n \"contactId\": \"<string>\",\n \"dealId\": \"<string>\",\n \"expiryDate\": \"2023-11-07T05:31:56Z\",\n \"subject\": \"<string>\",\n \"title\": \"<string>\",\n \"isInclusiveTax\": true,\n \"contentHtml\": \"<string>\",\n \"internalNotes\": \"<string>\",\n \"salesPersonId\": \"<string>\",\n \"currency\": \"<string>\",\n \"conversionRate\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"number": "<string>",
"date": "2023-11-07T05:31:56Z",
"status": "DRAFT",
"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,
"discountType": "fixed",
"viewType": "LINE_ITEM",
"scope": "<string>"
}
],
"markedAcceptedOn": "2023-11-07T05:31:56Z",
"markedRejectedOn": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Body
application/json
Response
OK