curl --request GET \
--url https://app.levanta.io/api/creator/v1/cpc/{campaign_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.levanta.io/api/creator/v1/cpc/{campaign_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.levanta.io/api/creator/v1/cpc/{campaign_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://app.levanta.io/api/creator/v1/cpc/{campaign_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 => [
"Authorization: Bearer <token>"
],
]);
$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://app.levanta.io/api/creator/v1/cpc/{campaign_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.levanta.io/api/creator/v1/cpc/{campaign_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.levanta.io/api/creator/v1/cpc/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "<string>",
"endDate": "<string>",
"cancellationDate": "<string>",
"product": {
"asin": "<string>",
"marketplace": "amazon.com",
"title": "<string>"
},
"brandId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"costPerClick": 123,
"clicks": 123,
"clicksRemaining": 123,
"reached": true
},
"membership": {
"earnings": {
"clicks": 123,
"amount": 123,
"currency": "USD"
},
"joinDate": "<string>",
"removed": true
}
}{
"status": 401,
"message": "Unauthorized"
}{
"status": 403,
"message": "You do not have access to CPC APIs"
}{
"status": 404,
"message": "CPC Campaign Not Found"
}{
"status": 422,
"message": "Input Validation Failed"
}Get Campaign by ID
Get a Cost-Per-Click campaign by its ID
curl --request GET \
--url https://app.levanta.io/api/creator/v1/cpc/{campaign_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.levanta.io/api/creator/v1/cpc/{campaign_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.levanta.io/api/creator/v1/cpc/{campaign_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://app.levanta.io/api/creator/v1/cpc/{campaign_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 => [
"Authorization: Bearer <token>"
],
]);
$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://app.levanta.io/api/creator/v1/cpc/{campaign_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.levanta.io/api/creator/v1/cpc/{campaign_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.levanta.io/api/creator/v1/cpc/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "<string>",
"endDate": "<string>",
"cancellationDate": "<string>",
"product": {
"asin": "<string>",
"marketplace": "amazon.com",
"title": "<string>"
},
"brandId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"costPerClick": 123,
"clicks": 123,
"clicksRemaining": 123,
"reached": true
},
"membership": {
"earnings": {
"clicks": 123,
"amount": 123,
"currency": "USD"
},
"joinDate": "<string>",
"removed": true
}
}{
"status": 401,
"message": "Unauthorized"
}{
"status": 403,
"message": "You do not have access to CPC APIs"
}{
"status": 404,
"message": "CPC Campaign Not Found"
}{
"status": 422,
"message": "Input Validation Failed"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the campaign to get
Response
Success
The ID of the campaign
The start date of the campaign, format: 'YYYY-MM-DD'
The end date of the campaign, format: 'YYYY-MM-DD'. If null, the campaign will continue indefinitely (until budget is reached, or canceled).
The cancellation date of the campaign, format: 'YYYY-MM-DD'. If null, the campaign has not been canceled.
Show child attributes
Show child attributes
Information about the campaign's budget, including the amount of clicks remaining, and whether or not the budget has been reached
Show child attributes
Show child attributes
Information about your membership in this campaign. If null, you have not joined the campaign
Show child attributes
Show child attributes