Work out a quote's totals
curl --request POST \
--url https://eu.sequencehq.com/api/quotes/total \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"preliminaryBillingStartDate": "2026-01-01",
"phases": [
{
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
},
"prices": [
{
"temporaryId": "price-1",
"structure": {
"price": "12000",
"pricingType": "FIXED"
},
"billingFrequency": "YEARLY",
"billingType": "IN_ADVANCE"
}
],
"discounts": [
{
"restrictToPrices": [
"price-1"
],
"type": "PERCENTAGE",
"amount": "10"
}
],
"minimums": []
}
]
}
'import requests
url = "https://eu.sequencehq.com/api/quotes/total"
payload = {
"currency": "USD",
"preliminaryBillingStartDate": "2026-01-01",
"phases": [
{
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
},
"prices": [
{
"temporaryId": "price-1",
"structure": {
"price": "12000",
"pricingType": "FIXED"
},
"billingFrequency": "YEARLY",
"billingType": "IN_ADVANCE"
}
],
"discounts": [
{
"restrictToPrices": ["price-1"],
"type": "PERCENTAGE",
"amount": "10"
}
],
"minimums": []
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'USD',
preliminaryBillingStartDate: '2026-01-01',
phases: [
{
duration: {days: 0, weeks: 0, months: 0, years: 1},
prices: [
{
temporaryId: 'price-1',
structure: {price: '12000', pricingType: 'FIXED'},
billingFrequency: 'YEARLY',
billingType: 'IN_ADVANCE'
}
],
discounts: [{restrictToPrices: ['price-1'], type: 'PERCENTAGE', amount: '10'}],
minimums: []
}
]
})
};
fetch('https://eu.sequencehq.com/api/quotes/total', 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://eu.sequencehq.com/api/quotes/total",
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([
'currency' => 'USD',
'preliminaryBillingStartDate' => '2026-01-01',
'phases' => [
[
'duration' => [
'days' => 0,
'weeks' => 0,
'months' => 0,
'years' => 1
],
'prices' => [
[
'temporaryId' => 'price-1',
'structure' => [
'price' => '12000',
'pricingType' => 'FIXED'
],
'billingFrequency' => 'YEARLY',
'billingType' => 'IN_ADVANCE'
]
],
'discounts' => [
[
'restrictToPrices' => [
'price-1'
],
'type' => 'PERCENTAGE',
'amount' => '10'
]
],
'minimums' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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://eu.sequencehq.com/api/quotes/total"
payload := strings.NewReader("{\n \"currency\": \"USD\",\n \"preliminaryBillingStartDate\": \"2026-01-01\",\n \"phases\": [\n {\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 0,\n \"years\": 1\n },\n \"prices\": [\n {\n \"temporaryId\": \"price-1\",\n \"structure\": {\n \"price\": \"12000\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"YEARLY\",\n \"billingType\": \"IN_ADVANCE\"\n }\n ],\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"price-1\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"10\"\n }\n ],\n \"minimums\": []\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://eu.sequencehq.com/api/quotes/total")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"preliminaryBillingStartDate\": \"2026-01-01\",\n \"phases\": [\n {\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 0,\n \"years\": 1\n },\n \"prices\": [\n {\n \"temporaryId\": \"price-1\",\n \"structure\": {\n \"price\": \"12000\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"YEARLY\",\n \"billingType\": \"IN_ADVANCE\"\n }\n ],\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"price-1\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"10\"\n }\n ],\n \"minimums\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/quotes/total")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"USD\",\n \"preliminaryBillingStartDate\": \"2026-01-01\",\n \"phases\": [\n {\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 0,\n \"years\": 1\n },\n \"prices\": [\n {\n \"temporaryId\": \"price-1\",\n \"structure\": {\n \"price\": \"12000\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"YEARLY\",\n \"billingType\": \"IN_ADVANCE\"\n }\n ],\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"price-1\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"10\"\n }\n ],\n \"minimums\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"total": {
"contractValue": "10800",
"discountValue": "1200",
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
}
}
}This response has no body data.This response has no body data.This response has no body data.Quotes
Work out a quote's totals
Work out the total contract value, discount value and duration of a quote’s pricing, without saving a quote. The body uses the same field names as the quote update body, so that body can be sent as it is. A discount or minimum pointing at a price ID that isn’t in its phase is rejected.
POST
/
quotes
/
total
Work out a quote's totals
curl --request POST \
--url https://eu.sequencehq.com/api/quotes/total \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"preliminaryBillingStartDate": "2026-01-01",
"phases": [
{
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
},
"prices": [
{
"temporaryId": "price-1",
"structure": {
"price": "12000",
"pricingType": "FIXED"
},
"billingFrequency": "YEARLY",
"billingType": "IN_ADVANCE"
}
],
"discounts": [
{
"restrictToPrices": [
"price-1"
],
"type": "PERCENTAGE",
"amount": "10"
}
],
"minimums": []
}
]
}
'import requests
url = "https://eu.sequencehq.com/api/quotes/total"
payload = {
"currency": "USD",
"preliminaryBillingStartDate": "2026-01-01",
"phases": [
{
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
},
"prices": [
{
"temporaryId": "price-1",
"structure": {
"price": "12000",
"pricingType": "FIXED"
},
"billingFrequency": "YEARLY",
"billingType": "IN_ADVANCE"
}
],
"discounts": [
{
"restrictToPrices": ["price-1"],
"type": "PERCENTAGE",
"amount": "10"
}
],
"minimums": []
}
]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'USD',
preliminaryBillingStartDate: '2026-01-01',
phases: [
{
duration: {days: 0, weeks: 0, months: 0, years: 1},
prices: [
{
temporaryId: 'price-1',
structure: {price: '12000', pricingType: 'FIXED'},
billingFrequency: 'YEARLY',
billingType: 'IN_ADVANCE'
}
],
discounts: [{restrictToPrices: ['price-1'], type: 'PERCENTAGE', amount: '10'}],
minimums: []
}
]
})
};
fetch('https://eu.sequencehq.com/api/quotes/total', 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://eu.sequencehq.com/api/quotes/total",
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([
'currency' => 'USD',
'preliminaryBillingStartDate' => '2026-01-01',
'phases' => [
[
'duration' => [
'days' => 0,
'weeks' => 0,
'months' => 0,
'years' => 1
],
'prices' => [
[
'temporaryId' => 'price-1',
'structure' => [
'price' => '12000',
'pricingType' => 'FIXED'
],
'billingFrequency' => 'YEARLY',
'billingType' => 'IN_ADVANCE'
]
],
'discounts' => [
[
'restrictToPrices' => [
'price-1'
],
'type' => 'PERCENTAGE',
'amount' => '10'
]
],
'minimums' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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://eu.sequencehq.com/api/quotes/total"
payload := strings.NewReader("{\n \"currency\": \"USD\",\n \"preliminaryBillingStartDate\": \"2026-01-01\",\n \"phases\": [\n {\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 0,\n \"years\": 1\n },\n \"prices\": [\n {\n \"temporaryId\": \"price-1\",\n \"structure\": {\n \"price\": \"12000\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"YEARLY\",\n \"billingType\": \"IN_ADVANCE\"\n }\n ],\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"price-1\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"10\"\n }\n ],\n \"minimums\": []\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://eu.sequencehq.com/api/quotes/total")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"preliminaryBillingStartDate\": \"2026-01-01\",\n \"phases\": [\n {\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 0,\n \"years\": 1\n },\n \"prices\": [\n {\n \"temporaryId\": \"price-1\",\n \"structure\": {\n \"price\": \"12000\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"YEARLY\",\n \"billingType\": \"IN_ADVANCE\"\n }\n ],\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"price-1\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"10\"\n }\n ],\n \"minimums\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/quotes/total")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"USD\",\n \"preliminaryBillingStartDate\": \"2026-01-01\",\n \"phases\": [\n {\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 0,\n \"years\": 1\n },\n \"prices\": [\n {\n \"temporaryId\": \"price-1\",\n \"structure\": {\n \"price\": \"12000\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"YEARLY\",\n \"billingType\": \"IN_ADVANCE\"\n }\n ],\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"price-1\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"10\"\n }\n ],\n \"minimums\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"total": {
"contractValue": "10800",
"discountValue": "1200",
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
}
}
}This response has no body data.This response has no body data.This response has no body data.Headers
Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
Available options:
2024-07-30 Body
application/json
The currency the quote is priced in
Available options:
AED, ARS, AUD, BRL, BGN, CAD, CHF, CLP, CNY, COP, CZK, DKK, EGP, EUR, GBP, HKD, ILS, INR, ISK, JPY, KRW, MXN, NOK, NZD, PLN, SAR, SEK, SGD, THB, USD, UYU, ZAR Example:
"GBP"
The quote's phases, in order
Show child attributes
Show child attributes
Example:
[
{
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
},
"prices": [
{
"temporaryId": "price-1",
"structure": { "price": "12000", "pricingType": "FIXED" },
"billingFrequency": "YEARLY",
"billingType": "IN_ADVANCE"
}
],
"discounts": [
{
"restrictToPrices": ["price-1"],
"type": "PERCENTAGE",
"amount": "10"
}
],
"minimums": []
}
]
The date billing would start on. Leave it out if it isn't known yet.
Example:
"2026-01-01"
Response
OK
The quote's totals
Show child attributes
Show child attributes
Example:
{
"contractValue": "10800",
"discountValue": "1200",
"duration": {
"days": 0,
"weeks": 0,
"months": 0,
"years": 1
}
}