Preview a pricing calculator without saving a quote
curl --request POST \
--url https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_values": {},
"selected_optional_products": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"optional_product_quantities": {}
}
'import requests
url = "https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview"
payload = {
"field_values": {},
"selected_optional_products": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"optional_product_quantities": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
field_values: {},
selected_optional_products: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
optional_product_quantities: {}
})
};
fetch('https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview', 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.journeybee.io/v1/pricing-calculators/{uuid}/preview",
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([
'field_values' => [
],
'selected_optional_products' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'optional_product_quantities' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.journeybee.io/v1/pricing-calculators/{uuid}/preview"
payload := strings.NewReader("{\n \"field_values\": {},\n \"selected_optional_products\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"optional_product_quantities\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.journeybee.io/v1/pricing-calculators/{uuid}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field_values\": {},\n \"selected_optional_products\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"optional_product_quantities\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"field_values\": {},\n \"selected_optional_products\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"optional_product_quantities\": {}\n}"
response = http.request(request)
puts response.read_body{
"line_items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "<string>",
"product_sku": "<string>",
"quantity": 123,
"unit_price": 123,
"subtotal": 123,
"billing_type": "one_time",
"billing_period": "monthly"
}
],
"selected_optional_products": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"subtotal": 123,
"adjustments": [
{
"name": "<string>",
"formula_id": "<string>",
"amount": 123,
"type": "discount",
"recurring_amount": 123,
"billing_type": "one_time",
"detail": {
"kind": "percentage",
"percentage": 123,
"base": 123,
"base_kind": "subtotal",
"amount": 123,
"signed_one_time_amount": 123,
"signed_recurring_amount": 123,
"presentation": {
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_label": "<string>",
"visibility": "visible",
"sort_order": 0,
"target_product_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"total": 123,
"recurring_total": 123
}Pricing Calculators
Preview a pricing calculator without saving a quote
POST
/
pricing-calculators
/
{uuid}
/
preview
Preview a pricing calculator without saving a quote
curl --request POST \
--url https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_values": {},
"selected_optional_products": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"optional_product_quantities": {}
}
'import requests
url = "https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview"
payload = {
"field_values": {},
"selected_optional_products": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"optional_product_quantities": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
field_values: {},
selected_optional_products: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
optional_product_quantities: {}
})
};
fetch('https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview', 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.journeybee.io/v1/pricing-calculators/{uuid}/preview",
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([
'field_values' => [
],
'selected_optional_products' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'optional_product_quantities' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.journeybee.io/v1/pricing-calculators/{uuid}/preview"
payload := strings.NewReader("{\n \"field_values\": {},\n \"selected_optional_products\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"optional_product_quantities\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.journeybee.io/v1/pricing-calculators/{uuid}/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field_values\": {},\n \"selected_optional_products\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"optional_product_quantities\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/pricing-calculators/{uuid}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"field_values\": {},\n \"selected_optional_products\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"optional_product_quantities\": {}\n}"
response = http.request(request)
puts response.read_body{
"line_items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "<string>",
"product_sku": "<string>",
"quantity": 123,
"unit_price": 123,
"subtotal": 123,
"billing_type": "one_time",
"billing_period": "monthly"
}
],
"selected_optional_products": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"subtotal": 123,
"adjustments": [
{
"name": "<string>",
"formula_id": "<string>",
"amount": 123,
"type": "discount",
"recurring_amount": 123,
"billing_type": "one_time",
"detail": {
"kind": "percentage",
"percentage": 123,
"base": 123,
"base_kind": "subtotal",
"amount": 123,
"signed_one_time_amount": 123,
"signed_recurring_amount": 123,
"presentation": {
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_label": "<string>",
"visibility": "visible",
"sort_order": 0,
"target_product_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"total": 123,
"recurring_total": 123
}Authorizations
API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
application/json
Inputs and optional calculator-product membership UUID selections used to preview a pricing calculator without saving a quote.
Inputs and optional calculator-product membership UUID selections used to preview a pricing calculator without saving a quote.
Show child attributes
Show child attributes
Maximum array length:
100Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes
Response
200 - application/json
Calculated totals, adjustments, and presentation for a pricing calculator preview. Product and formula references are public UUIDs.
Calculated totals, adjustments, and presentation for a pricing calculator preview. Product and formula references are public UUIDs.
Show child attributes
Show child attributes
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes