Invoice details
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/revshare/invoices/{public_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/revshare/invoices/{public_id}"
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/revshare/invoices/{public_id}', 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/revshare/invoices/{public_id}",
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/revshare/invoices/{public_id}"
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/revshare/invoices/{public_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/revshare/invoices/{public_id}")
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": {
"id": "<string>",
"account": {
"of_account_id": 123,
"username": "<string>"
},
"price": 123,
"your_price": 123,
"your_discount": 123,
"service_fee": 123,
"final_price": 123,
"date": "2023-11-07T05:31:56Z",
"date_ts": 123,
"related_campaigns": [
{
"campaign_id": "<string>",
"marketer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_base": 123
}
],
"transactions": [
{
"of_transaction_id": "<string>",
"of_user_id": 123,
"campaign_id": "<string>",
"marketer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_amount": 123,
"date": "2023-11-07T05:31:56Z"
}
],
"refunds": [
{
"of_transaction_id": "<string>",
"of_user_id": 123,
"campaign_id": "<string>",
"marketer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_amount": 123,
"date": "2023-11-07T05:31:56Z"
}
]
}
}{
"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
}RevShare
Invoice details
Pricing breakdown plus per-transaction trail and refunds for one invoice.
GET
/
revshare
/
invoices
/
{public_id}
Invoice details
curl --request GET \
--url https://studio-api.onlytraffic.com/api/external/v1/revshare/invoices/{public_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://studio-api.onlytraffic.com/api/external/v1/revshare/invoices/{public_id}"
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/revshare/invoices/{public_id}', 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/revshare/invoices/{public_id}",
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/revshare/invoices/{public_id}"
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/revshare/invoices/{public_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio-api.onlytraffic.com/api/external/v1/revshare/invoices/{public_id}")
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": {
"id": "<string>",
"account": {
"of_account_id": 123,
"username": "<string>"
},
"price": 123,
"your_price": 123,
"your_discount": 123,
"service_fee": 123,
"final_price": 123,
"date": "2023-11-07T05:31:56Z",
"date_ts": 123,
"related_campaigns": [
{
"campaign_id": "<string>",
"marketer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revenue_base": 123
}
],
"transactions": [
{
"of_transaction_id": "<string>",
"of_user_id": 123,
"campaign_id": "<string>",
"marketer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_amount": 123,
"date": "2023-11-07T05:31:56Z"
}
],
"refunds": [
{
"of_transaction_id": "<string>",
"of_user_id": 123,
"campaign_id": "<string>",
"marketer_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_amount": 123,
"date": "2023-11-07T05:31:56Z"
}
]
}
}{
"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
}Authorizations
Your API key from the Studio Dashboard
Path Parameters
Resource public id. Format varies by endpoint: cplo_xxxxxxx for CPL orders, cpco_xxxxxxx for CPC orders, swpo_xxxxxxx for swap orders, cpcr_xxxxxxx for CPC creatives, revi_xxxxxxx for RevShare invoices.
Pattern:
^[a-z0-9_]+$Was this page helpful?
⌘I