Skip to main content
GET
/
subscriptions
/
cp
/
api
/
campaigns
/
applicable
List applicable customer portal campaigns
curl --request GET \
  --url https://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable
import requests

url = "https://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const url = 'https://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable';
const options = {method: 'GET'};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://www.myshop.com/apps/subscriptions/cp/api/campaigns/applicable")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "bannerDesktopUrl": "<string>",
    "bannerMobileUrl": "<string>",
    "body": "<string>",
    "buttonLabel": "<string>",
    "declineMessage": "<string>",
    "defaultCampaignLabel": "<string>",
    "id": 123,
    "offerConfig": {
      "discountCode": "<string>",
      "discountType": "<string>",
      "discountValue": 123,
      "productVariantIds": [
        "<string>"
      ],
      "properties": {},
      "sellingPlanId": "<string>",
      "variantSwapMap": {}
    },
    "priority": 123,
    "successMessage": "<string>",
    "title": "<string>",
    "translatedCampaignLabel": "<string>"
  }
]

Query Parameters

contractId
integer<int64>
locale
string

Response

200 - */*

OK

bannerDesktopUrl
string
bannerMobileUrl
string
body
string
buttonLabel
string
campaignType
enum<string>
Available options:
UPSELL_CROSSSELL,
RECOVER_FAILED_PAYMENT,
WINBACK,
RESUME,
SWAP,
ORDER_NOW,
LOGIN,
UPGRADE,
REVIVE_EXPIRED,
MYSTERY_REWARD
declineMessage
string
defaultCampaignLabel
string
id
integer<int64>
offerConfig
object
priority
integer<int32>
successMessage
string
title
string
translatedCampaignLabel
string