Run a price simulation
curl --request POST \
--url https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"services": [
{
"service": "<string>",
"selections": {}
}
],
"context": {}
}
'import requests
url = "https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations"
payload = {
"services": [
{
"service": "<string>",
"selections": {}
}
],
"context": {}
}
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({services: [{service: '<string>', selections: {}}], context: {}})
};
fetch('https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations', 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://your-kordless-instance.com/v1/accounts/{id}/quote-simulations",
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([
'services' => [
[
'service' => '<string>',
'selections' => [
]
]
],
'context' => [
]
]),
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://your-kordless-instance.com/v1/accounts/{id}/quote-simulations"
payload := strings.NewReader("{\n \"services\": [\n {\n \"service\": \"<string>\",\n \"selections\": {}\n }\n ],\n \"context\": {}\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://your-kordless-instance.com/v1/accounts/{id}/quote-simulations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"services\": [\n {\n \"service\": \"<string>\",\n \"selections\": {}\n }\n ],\n \"context\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations")
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 \"services\": [\n {\n \"service\": \"<string>\",\n \"selections\": {}\n }\n ],\n \"context\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "quote_simulation",
"book": {
"key": "<string>",
"version": 123,
"currency": "<string>",
"artifact_hash": "<string>"
},
"total": {
"low_cents": 123,
"high_cents": 123,
"currency": "<string>"
},
"line_items": [
{
"source": "<string>",
"label": "<string>",
"kind": "<string>",
"quantity": 123,
"total": {
"low_cents": 123,
"high_cents": 123
}
}
],
"missing_inputs": [
{}
],
"review_reasons": [
{
"code": "<string>",
"message": "<string>"
}
],
"inspection": {
"kind": "<string>",
"code": "<string>",
"prompt": "<string>"
},
"derivation": [
{
"kind": "<string>",
"label": "<string>"
}
],
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Quote simulations
Run a price simulation
Evaluates a request against the published Book without persisting it.
The response includes the decision, total, line items, derivation, and
any missing inputs or review reasons. Requires the simulations:write
scope.
POST
/
v1
/
accounts
/
{id}
/
quote-simulations
Run a price simulation
curl --request POST \
--url https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"services": [
{
"service": "<string>",
"selections": {}
}
],
"context": {}
}
'import requests
url = "https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations"
payload = {
"services": [
{
"service": "<string>",
"selections": {}
}
],
"context": {}
}
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({services: [{service: '<string>', selections: {}}], context: {}})
};
fetch('https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations', 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://your-kordless-instance.com/v1/accounts/{id}/quote-simulations",
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([
'services' => [
[
'service' => '<string>',
'selections' => [
]
]
],
'context' => [
]
]),
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://your-kordless-instance.com/v1/accounts/{id}/quote-simulations"
payload := strings.NewReader("{\n \"services\": [\n {\n \"service\": \"<string>\",\n \"selections\": {}\n }\n ],\n \"context\": {}\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://your-kordless-instance.com/v1/accounts/{id}/quote-simulations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"services\": [\n {\n \"service\": \"<string>\",\n \"selections\": {}\n }\n ],\n \"context\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-kordless-instance.com/v1/accounts/{id}/quote-simulations")
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 \"services\": [\n {\n \"service\": \"<string>\",\n \"selections\": {}\n }\n ],\n \"context\": {}\n}"
response = http.request(request)
puts response.read_body{
"object": "quote_simulation",
"book": {
"key": "<string>",
"version": 123,
"currency": "<string>",
"artifact_hash": "<string>"
},
"total": {
"low_cents": 123,
"high_cents": 123,
"currency": "<string>"
},
"line_items": [
{
"source": "<string>",
"label": "<string>",
"kind": "<string>",
"quantity": 123,
"total": {
"low_cents": 123,
"high_cents": 123
}
}
],
"missing_inputs": [
{}
],
"review_reasons": [
{
"code": "<string>",
"message": "<string>"
}
],
"inspection": {
"kind": "<string>",
"code": "<string>",
"prompt": "<string>"
},
"derivation": [
{
"kind": "<string>",
"label": "<string>"
}
],
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Authorizations
Pass your API key as a bearer token. Test keys start with sk_test_; Live keys start with sk_live_.
Path Parameters
The account ID.
Body
application/json
Response
The simulation result.
Available options:
quote_simulation The evaluator's decision.
Available options:
priced, needs_input, unavailable, failed Available options:
instant, quote, unavailable Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I