Subscription Plans
List all selling plans available to the customer
GET
/
subscriptions
/
cp
/
api
/
subscription-groups
/
all-selling-plans
List all selling plans available to the customer
curl --request GET \
--url https://www.myshop.com/apps/subscriptions/cp/api/subscription-groups/all-selling-plansimport requests
url = "https://www.myshop.com/apps/subscriptions/cp/api/subscription-groups/all-selling-plans"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.myshop.com/apps/subscriptions/cp/api/subscription-groups/all-selling-plans', 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/subscription-groups/all-selling-plans';
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/subscription-groups/all-selling-plans",
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/subscription-groups/all-selling-plans"
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/subscription-groups/all-selling-plans")
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[
{
"afterCycle1": 123,
"afterCycle2": 123,
"appstleCycles": [
{
"afterCycle": 3,
"discountType": "PERCENTAGE",
"freeProductHandle": "free-gift-product",
"freeProductImage": "https://cdn.shopify.com/s/files/1/0000/0000/products/mug.jpg",
"freeProductTitle": "Ceramic Mug",
"freeProducts": [
{
"freeProductHandle": "free-gift-product",
"freeProductImage": "https://cdn.shopify.com/s/files/1/0000/0000/products/mug.jpg",
"freeProductTitle": "Ceramic Mug",
"freeVariantId": 42549172011164
}
],
"freeVariantId": 42549172011164,
"preventDuplicationFreeProduct": true,
"repeatingCycle": true,
"repeatingNumberOfCycle": 6,
"restrictFreeProductQuantity": true,
"tierRole": "<string>",
"value": 10
}
],
"billingFrequencyCount": 123,
"billingFrequencyInterval": "DAY",
"cutOff": 123,
"defaultSelectedPlan": true,
"deliveryPolicyPreAnchorBehavior": "ASAP",
"discountEnabled": true,
"discountEnabled2": true,
"discountEnabled2Masked": true,
"discountEnabledMasked": true,
"discountOffer": 123,
"discountOffer2": 123,
"discountType": "PERCENTAGE",
"discountType2": "PERCENTAGE",
"fixedBillingDates": [
{
"day": 123,
"month": 123
}
],
"formFieldJson": "<string>",
"freeTrialCount": 123,
"freeTrialEnabled": true,
"freeTrialInterval": "DAY",
"frequencyCount": 123,
"frequencyDescription": "<string>",
"frequencyInterval": "DAY",
"frequencyName": "<string>",
"frequencyNameTranslations": {},
"frequencySequence": 123,
"frequencyType": "ON_PURCHASE_DAY",
"groupId": 123,
"groupName": "<string>",
"id": "<string>",
"idNew": "<string>",
"inventoryPolicyReserve": "ON_FULFILLMENT",
"keepOriginalNextBillingDateAfterTrial": true,
"maxCycles": 123,
"memberExclusiveTags": "<string>",
"memberInclusiveTags": "<string>",
"memberOnly": true,
"minCycles": 123,
"minQuantity": 123,
"nonMemberOnly": true,
"payAsYouGoPrepaidBillingFrequencyCount": 123,
"planType": "PAY_AS_YOU_GO",
"prepaidFlag": "<string>",
"repeatingCycle": true,
"repeatingNumberOfCycle": 123,
"specificDayEnabled": true,
"specificDayValue": 123,
"specificMonthValue": 123,
"upcomingOrderEmailBuffer": 123
}
]Response
200 - */*
OK
Show child attributes
Show child attributes
Available options:
DAY, WEEK, MONTH, YEAR Available options:
ASAP, NEXT, $UNKNOWN Available options:
PERCENTAGE, FIXED, PRICE Available options:
PERCENTAGE, FIXED, PRICE Show child attributes
Show child attributes
Available options:
DAY, WEEK, MONTH, YEAR Available options:
DAY, WEEK, MONTH, YEAR Show child attributes
Show child attributes
Available options:
ON_PURCHASE_DAY, ON_SPECIFIC_DAY, ON_FIXED_DATES Available options:
ON_FULFILLMENT, ON_SALE, $UNKNOWN Available options:
PAY_AS_YOU_GO, PREPAID, ADVANCED_PREPAID, PAY_AS_YOU_GO_PREPAID ⌘I
List all selling plans available to the customer
curl --request GET \
--url https://www.myshop.com/apps/subscriptions/cp/api/subscription-groups/all-selling-plansimport requests
url = "https://www.myshop.com/apps/subscriptions/cp/api/subscription-groups/all-selling-plans"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.myshop.com/apps/subscriptions/cp/api/subscription-groups/all-selling-plans', 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/subscription-groups/all-selling-plans';
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/subscription-groups/all-selling-plans",
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/subscription-groups/all-selling-plans"
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/subscription-groups/all-selling-plans")
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[
{
"afterCycle1": 123,
"afterCycle2": 123,
"appstleCycles": [
{
"afterCycle": 3,
"discountType": "PERCENTAGE",
"freeProductHandle": "free-gift-product",
"freeProductImage": "https://cdn.shopify.com/s/files/1/0000/0000/products/mug.jpg",
"freeProductTitle": "Ceramic Mug",
"freeProducts": [
{
"freeProductHandle": "free-gift-product",
"freeProductImage": "https://cdn.shopify.com/s/files/1/0000/0000/products/mug.jpg",
"freeProductTitle": "Ceramic Mug",
"freeVariantId": 42549172011164
}
],
"freeVariantId": 42549172011164,
"preventDuplicationFreeProduct": true,
"repeatingCycle": true,
"repeatingNumberOfCycle": 6,
"restrictFreeProductQuantity": true,
"tierRole": "<string>",
"value": 10
}
],
"billingFrequencyCount": 123,
"billingFrequencyInterval": "DAY",
"cutOff": 123,
"defaultSelectedPlan": true,
"deliveryPolicyPreAnchorBehavior": "ASAP",
"discountEnabled": true,
"discountEnabled2": true,
"discountEnabled2Masked": true,
"discountEnabledMasked": true,
"discountOffer": 123,
"discountOffer2": 123,
"discountType": "PERCENTAGE",
"discountType2": "PERCENTAGE",
"fixedBillingDates": [
{
"day": 123,
"month": 123
}
],
"formFieldJson": "<string>",
"freeTrialCount": 123,
"freeTrialEnabled": true,
"freeTrialInterval": "DAY",
"frequencyCount": 123,
"frequencyDescription": "<string>",
"frequencyInterval": "DAY",
"frequencyName": "<string>",
"frequencyNameTranslations": {},
"frequencySequence": 123,
"frequencyType": "ON_PURCHASE_DAY",
"groupId": 123,
"groupName": "<string>",
"id": "<string>",
"idNew": "<string>",
"inventoryPolicyReserve": "ON_FULFILLMENT",
"keepOriginalNextBillingDateAfterTrial": true,
"maxCycles": 123,
"memberExclusiveTags": "<string>",
"memberInclusiveTags": "<string>",
"memberOnly": true,
"minCycles": 123,
"minQuantity": 123,
"nonMemberOnly": true,
"payAsYouGoPrepaidBillingFrequencyCount": 123,
"planType": "PAY_AS_YOU_GO",
"prepaidFlag": "<string>",
"repeatingCycle": true,
"repeatingNumberOfCycle": 123,
"specificDayEnabled": true,
"specificDayValue": 123,
"specificMonthValue": 123,
"upcomingOrderEmailBuffer": 123
}
]