Preview a CPC order.
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/cpc/orders/quote \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/cpc/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/cpc/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/cpc/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/cpc/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/cpc/orders/quote")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/cpc/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>"
],
"pricing": {
"price_per_click": 123,
"min_price_per_click": 123,
"original_price_per_click": 123,
"total_cost": 123,
"client_discount_percent": 123
},
"balance": {
"current": 123,
"sufficient": true
},
"offer": {
"id": 123,
"min_quantity": 123,
"max_quantity": 123
},
"creative": {
"public_id": "<string>",
"of_account_id": 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
}CPC
Quote Order
Preview a CPC order without placing it.
GET
/
cpc
/
orders
/
quote
Preview a CPC order.
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/cpc/orders/quote \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/cpc/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/cpc/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/cpc/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/cpc/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/cpc/orders/quote")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/cpc/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>"
],
"pricing": {
"price_per_click": 123,
"min_price_per_click": 123,
"original_price_per_click": 123,
"total_cost": 123,
"client_discount_percent": 123
},
"balance": {
"current": 123,
"sufficient": true
},
"offer": {
"id": 123,
"min_quantity": 123,
"max_quantity": 123
},
"creative": {
"public_id": "<string>",
"of_account_id": 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 /cpc/orders validation matrix without committing. Surfaces the server-computed price-per-click floor and total cost, the balance check, and a list of eligibility errors.
eligible: true means the same body would succeed against POST /cpc/orders.Authorizations
Your API key from the Studio Dashboard
Query Parameters
Required range:
x >= 1Example:
"cpcr_xxxxxxx"
Required range:
x >= 1Optional. When omitted, the floor is used.
Required range:
x >= 0Was this page helpful?
⌘I