Preview a CPL order.
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote', 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://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"eligible": true,
"errors": [
"<string>"
],
"warnings": [
"<string>"
],
"pricing": {
"price_per_fan": 123,
"total_cost": 123,
"client_discount_percent": 123
},
"balance": {
"current": 123,
"sufficient": true
},
"unpaid_invoices": {
"count": 123,
"total": 123,
"oldest_date_ts": 123
},
"pay_as_you_go": {
"enabled": true,
"deposit_percent": 123
},
"offer": {
"id": 123,
"min_quantity": 123,
"max_quantity": 123,
"campaign_types": [
"<string>"
],
"trial_days_available": [
123
]
},
"model": {
"of_account_id": 123,
"username": "<string>",
"session_status": "<string>",
"subscribe_price": 123
},
"content_channels": {
"available": [
"<string>"
],
"selected": [
"<string>"
]
},
"queue": {
"position": 123,
"estimated_days": 123
}
}
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}CPL
Quote Order
Preview a CPL order without placing it.
GET
/
cpl
/
orders
/
quote
Preview a CPL order.
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote', 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://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/cpl/orders/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"eligible": true,
"errors": [
"<string>"
],
"warnings": [
"<string>"
],
"pricing": {
"price_per_fan": 123,
"total_cost": 123,
"client_discount_percent": 123
},
"balance": {
"current": 123,
"sufficient": true
},
"unpaid_invoices": {
"count": 123,
"total": 123,
"oldest_date_ts": 123
},
"pay_as_you_go": {
"enabled": true,
"deposit_percent": 123
},
"offer": {
"id": 123,
"min_quantity": 123,
"max_quantity": 123,
"campaign_types": [
"<string>"
],
"trial_days_available": [
123
]
},
"model": {
"of_account_id": 123,
"username": "<string>",
"session_status": "<string>",
"subscribe_price": 123
},
"content_channels": {
"available": [
"<string>"
],
"selected": [
"<string>"
]
},
"queue": {
"position": 123,
"estimated_days": 123
}
}
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}{
"success": false,
"error": "validation_failed",
"message": "<string>",
"details": {},
"retry_after": 123
}Runs the full
POST /cpl/orders validation matrix without committing. Surfaces server-computed pricing, the balance check, and a list of eligibility errors.
eligible: true means the same body would succeed against POST /cpl/orders.Authorizations
Your API key from the Studio Dashboard
Query Parameters
Required range:
x >= 1Required range:
x >= 1Required range:
x >= 1Available options:
free, paid, paid_trial Required when campaign_type=paid_trial.
Available options:
1, 3, 7, 14, 30, 90, 180, 360 Optional filter. When omitted, every live channel on the model is used. When set, the order uses only the listed channels (intersected with the live ones).
Available options:
lifestyle, tiktok, lingerie, light_nudes, nudes Was this page helpful?
⌘I