curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body"{ \"object\": \"Campaign\", \"id\": \"CampaignsTest\", \"vid\": \"0d5ea80c7792156ec92364e30d18d19ab6b4032a\", \"name\": \"SUMMER50\", \"description\": \"Campaign test from REST post\", \"state\": \"Active\", \"offer_start_date\": \"2021-01-17T08:00:00+00:00\", \"offer_end_date\": \"2023-01-16T08:00:00+00:00\", \"type\": \"Coupon\", \"percentage_discount\": 50, \"apply_discount_per_item\": false, \"number_of_periods\": 5, \"max_redemptions\": 1, \"coupon_code_quantity\": 10, \"coupon_code_prefix\": \"HOT\", \"coupon_code_separator\": \"-\", \"coupon_code_requires_activation\": true, \"on_demand_codes_allowed\": true, \"stackability\": \"Stackable\", \"total_code_marked_used\": 0 }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Activate a Specific Campaign.
Activates a specific Campaign.
curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/campaigns/{campaign}/actions/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body"{ \"object\": \"Campaign\", \"id\": \"CampaignsTest\", \"vid\": \"0d5ea80c7792156ec92364e30d18d19ab6b4032a\", \"name\": \"SUMMER50\", \"description\": \"Campaign test from REST post\", \"state\": \"Active\", \"offer_start_date\": \"2021-01-17T08:00:00+00:00\", \"offer_end_date\": \"2023-01-16T08:00:00+00:00\", \"type\": \"Coupon\", \"percentage_discount\": 50, \"apply_discount_per_item\": false, \"number_of_periods\": 5, \"max_redemptions\": 1, \"coupon_code_quantity\": 10, \"coupon_code_prefix\": \"HOT\", \"coupon_code_separator\": \"-\", \"coupon_code_requires_activation\": true, \"on_demand_codes_allowed\": true, \"stackability\": \"Stackable\", \"total_code_marked_used\": 0 }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The id or the vid of the campaign to activate.
Response
JSON A full Campaigns object.
Value is “Campaign”
A merchant-specified unique identifier. If not specified, this object can be identified by its vid
A Globally Unique Identifier (GUID) for this object. Assigned by CashBox
128Name of campaign.
Description of campaign.
Can be Active, Canceled, Complete, Inactive, MatchAnyState, Pending, Undefined
Active, Canceled, Complete, Inactive, MatchAnyState, Undefined, Pending The first date on which the offers may be redeemed.
The last date on which the offers may be redeemed.
specifies what type of campaign this is Coupon, Promotion, Undefined.
Defines the discount as a percentage of the original Product price. Note:- flat_amount_discounts and percentage_discount are mutually exclusive. It can be either or but not both
Zero or more eligible Products eligible for this Campaign
Show child attributes
Show child attributes
Zero or more eligible BillingPlans eligible for this Campaign
Show child attributes
Show child attributes
If true, Campaign offer only applies to new subscriptions, not existing ones
Expiration date of a “Fixed” Campaign. “Rolling” Campaigns should leave this blank
Number of times the promotion repeats, e.g. if you want to discount 3 cycles of a biweekly subscription, this would be 3
The redemption code associated with the Promotion
An array of alternative redemption codes for the Promotion. Note:- Setting this array will replace any existing list of aliases; it will not add new values to an existing list.
Show child attributes
Show child attributes
Specifies the discounting method either Compounded or Direct. Only supported for Stackable Discounts.
If true, discounts on items will be multiplied by the item quantity. Only supported for Stackable Discounts.
Name to be placed on ItemDiscounts generated for this Campaign. Only supported for Stackable Discounts.
Maximum number of Campaign redemptions for any given customer account. Only supported for Stackable Discounts.
Maximum number of Campaign redemptions for any given subscription. Only supported for Stackable Discounts.
Defines constraint on stackability (concurrent usage) of Campaigns. Defaults to Stackable. Only supported for Stackable Discounts.
Unspecified, Stackable, Unstackable Count of all coupon codes that are marked as used for the underlying campaign.

