cURL
curl --request POST \
--url https://app.example.com/v1/admin/catalog/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"entityModule": "products",
"entityId": "prod_01h...",
"sourceKind": "<string>",
"sourceProvider": "<string>",
"sourceConnectionId": "<string>",
"sourceRef": "<string>",
"scope": {
"locale": "<string>",
"audience": "staff",
"market": "<string>",
"currency": "<string>"
},
"parameters": {},
"draft": {},
"ttlMs": 123
}'const response = await fetch("https://app.example.com/v1/admin/catalog/quote", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"entityModule": "products",
"entityId": "prod_01h...",
"sourceKind": "<string>",
"sourceProvider": "<string>",
"sourceConnectionId": "<string>",
"sourceRef": "<string>",
"scope": {
"locale": "<string>",
"audience": "staff",
"market": "<string>",
"currency": "<string>"
},
"parameters": {},
"draft": {},
"ttlMs": 123
}),
});
const data = await response.json();import requests
response = requests.post(
"https://app.example.com/v1/admin/catalog/quote",
headers={
"Authorization": "Bearer <token>"
},
json={
"entityModule": "products",
"entityId": "prod_01h...",
"sourceKind": "<string>",
"sourceProvider": "<string>",
"sourceConnectionId": "<string>",
"sourceRef": "<string>",
"scope": {
"locale": "<string>",
"audience": "staff",
"market": "<string>",
"currency": "<string>"
},
"parameters": {},
"draft": {},
"ttlMs": 123
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{operatorDomain}/v1/admin/catalog/quote",
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([
'entityModule' => 'products',
'entityId' => 'prod_01h...',
'sourceKind' => '<string>',
'sourceProvider' => '<string>',
'sourceConnectionId' => '<string>',
'sourceRef' => '<string>',
'scope' => [
'locale' => '<string>',
'market' => '<string>',
'currency' => '<string>'
],
'parameters' => [
],
'draft' => [
],
'ttlMs' => 123
]),
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://{operatorDomain}/v1/admin/catalog/quote"
payload := strings.NewReader("{\n \"entityModule\": \"products\",\n \"entityId\": \"prod_01h...\",\n \"sourceKind\": \"<string>\",\n \"sourceProvider\": \"<string>\",\n \"sourceConnectionId\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"scope\": {\n \"locale\": \"<string>\",\n \"market\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"parameters\": {},\n \"draft\": {},\n \"ttlMs\": 123\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://{operatorDomain}/v1/admin/catalog/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityModule\": \"products\",\n \"entityId\": \"prod_01h...\",\n \"sourceKind\": \"<string>\",\n \"sourceProvider\": \"<string>\",\n \"sourceConnectionId\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"scope\": {\n \"locale\": \"<string>\",\n \"market\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"parameters\": {},\n \"draft\": {},\n \"ttlMs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{operatorDomain}/v1/admin/catalog/quote")
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 \"entityModule\": \"products\",\n \"entityId\": \"prod_01h...\",\n \"sourceKind\": \"<string>\",\n \"sourceProvider\": \"<string>\",\n \"sourceConnectionId\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"scope\": {\n \"locale\": \"<string>\",\n \"market\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"parameters\": {},\n \"draft\": {},\n \"ttlMs\": 123\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "<string>",
"quotedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"available": true,
"invalidReason": "<string>",
"pricing": {
"currency": "<string>",
"lines": [
{}
],
"taxes": [
{}
],
"subtotal": 123,
"taxTotal": 123,
"total": 123
}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}Catalog
Quote a catalog entity
Price and validate a booking against a catalog entity (owned or sourced) before booking. Returns a time-boxed quote with a pricing breakdown.
POST
/
v1
/
admin
/
catalog
/
quote
cURL
curl --request POST \
--url https://app.example.com/v1/admin/catalog/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"entityModule": "products",
"entityId": "prod_01h...",
"sourceKind": "<string>",
"sourceProvider": "<string>",
"sourceConnectionId": "<string>",
"sourceRef": "<string>",
"scope": {
"locale": "<string>",
"audience": "staff",
"market": "<string>",
"currency": "<string>"
},
"parameters": {},
"draft": {},
"ttlMs": 123
}'const response = await fetch("https://app.example.com/v1/admin/catalog/quote", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"entityModule": "products",
"entityId": "prod_01h...",
"sourceKind": "<string>",
"sourceProvider": "<string>",
"sourceConnectionId": "<string>",
"sourceRef": "<string>",
"scope": {
"locale": "<string>",
"audience": "staff",
"market": "<string>",
"currency": "<string>"
},
"parameters": {},
"draft": {},
"ttlMs": 123
}),
});
const data = await response.json();import requests
response = requests.post(
"https://app.example.com/v1/admin/catalog/quote",
headers={
"Authorization": "Bearer <token>"
},
json={
"entityModule": "products",
"entityId": "prod_01h...",
"sourceKind": "<string>",
"sourceProvider": "<string>",
"sourceConnectionId": "<string>",
"sourceRef": "<string>",
"scope": {
"locale": "<string>",
"audience": "staff",
"market": "<string>",
"currency": "<string>"
},
"parameters": {},
"draft": {},
"ttlMs": 123
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{operatorDomain}/v1/admin/catalog/quote",
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([
'entityModule' => 'products',
'entityId' => 'prod_01h...',
'sourceKind' => '<string>',
'sourceProvider' => '<string>',
'sourceConnectionId' => '<string>',
'sourceRef' => '<string>',
'scope' => [
'locale' => '<string>',
'market' => '<string>',
'currency' => '<string>'
],
'parameters' => [
],
'draft' => [
],
'ttlMs' => 123
]),
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://{operatorDomain}/v1/admin/catalog/quote"
payload := strings.NewReader("{\n \"entityModule\": \"products\",\n \"entityId\": \"prod_01h...\",\n \"sourceKind\": \"<string>\",\n \"sourceProvider\": \"<string>\",\n \"sourceConnectionId\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"scope\": {\n \"locale\": \"<string>\",\n \"market\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"parameters\": {},\n \"draft\": {},\n \"ttlMs\": 123\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://{operatorDomain}/v1/admin/catalog/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityModule\": \"products\",\n \"entityId\": \"prod_01h...\",\n \"sourceKind\": \"<string>\",\n \"sourceProvider\": \"<string>\",\n \"sourceConnectionId\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"scope\": {\n \"locale\": \"<string>\",\n \"market\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"parameters\": {},\n \"draft\": {},\n \"ttlMs\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{operatorDomain}/v1/admin/catalog/quote")
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 \"entityModule\": \"products\",\n \"entityId\": \"prod_01h...\",\n \"sourceKind\": \"<string>\",\n \"sourceProvider\": \"<string>\",\n \"sourceConnectionId\": \"<string>\",\n \"sourceRef\": \"<string>\",\n \"scope\": {\n \"locale\": \"<string>\",\n \"market\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"parameters\": {},\n \"draft\": {},\n \"ttlMs\": 123\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "<string>",
"quotedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"available": true,
"invalidReason": "<string>",
"pricing": {
"currency": "<string>",
"lines": [
{}
],
"taxes": [
{}
],
"subtotal": 123,
"taxTotal": 123,
"total": 123
}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}Authorizations
Staff session or API token issued by your Voyant app.
Body
application/json
⌘I