Hide subscriptions in bulk
Hides subscription contracts in bulk. Hiding is destructive and permanent: each contract is cancelled in Shopify (unless it’s already cancelled) and removed from Appstle. It no longer appears in the merchant portal or the customer portal, and it’s never billed again.
What Hiding Does to Each Contract:
- Cancels the contract in Shopify, unless it’s already cancelled
- Saves the contract’s previous status in the
appstle_hide_subscription_original_statuscustom attribute on the Shopify contract - Deletes the contract from Appstle, with its line items and its future queued and skipped billing attempts
- Updates the customer’s tags and metafields
The cancelled contract stays in Shopify. Appstle ignores later Shopify updates to contracts that carry the hide attribute, so hidden contracts aren’t imported again.
Not Reversible: There’s no API or admin action to unhide a contract. Contact Appstle support if a hidden contract must be restored. To stop billing but keep the contract in Appstle, cancel it instead.
Operation Modes:
- Specific Subscriptions: Pass the contract IDs in
subscriptionIds - All Subscriptions: Set allSubscriptions=true to hide every subscription contract in the store, whatever its status.
subscriptionIdsis ignored. Use with extreme caution.
Request Body Structure:
subscriptionIds is one string of comma-separated numeric contract IDs. Shopify GraphQL IDs (gid://shopify/SubscriptionContract/xxxxx) and JSON arrays are rejected.
{
"subscriptionIds": "123456,123457,123458"
}
How It Works:
- The request fails if a bulk hide is already running for your shop
- Every ID is checked. If any ID isn’t a subscription contract in your shop, the whole request fails and nothing is hidden
- The request fails if bulk operations are locked for your shop
- The job is queued and the endpoint returns 204 No Content
- Contracts are hidden in the background. If one contract fails, the error is recorded and the job continues with the rest
There’s no public endpoint for tracking the job’s progress.
Error Scenarios (400):
- Another bulk hide is running:
Bulk request for current shop is already in progress - An ID isn’t a subscription contract in your shop:
Contract does not exist subscriptionIdsis empty and allSubscriptions isn’t true:If All subs flag is false or empty, contractIds cannot be empty- Bulk operations are locked for your shop:
Bulk operations is locked. Please contact support to unlock this feature for your store.
Authentication: Requires valid api_key parameter (X-API-Key header support coming soon)
curl --request POST \
--url https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionIds": "<string>"
}
'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions"
payload = { "subscriptionIds": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({subscriptionIds: '<string>'})
};
fetch('https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({subscriptionIds: '<string>'})
};
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://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscriptionIds' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions"
payload := strings.NewReader("{\n \"subscriptionIds\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionIds\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodycurl --request POST \
--url https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions \
--header 'Content-Type: application/json' \
--data '
{
"subscriptionIds": "<string>"
}
'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions"
payload = { "subscriptionIds": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({subscriptionIds: '<string>'})
};
fetch('https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({subscriptionIds: '<string>'})
};
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://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subscriptionIds' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions"
payload := strings.NewReader("{\n \"subscriptionIds\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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://subscription-admin.appstle.com/api/external/v2/bulk-automations/hide-subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionIds\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body