Product Catalog
Delete a product swap automation
deprecated
Permanently deletes a product swap automation configuration. Once deleted, the swap will no longer be applied to any subscription orders. Existing subscriptions that have already had products swapped are not affected.
Deletion Behavior:
- Permanently removes the swap automation
- Does not reverse past swaps that have already occurred
- Future orders will not have this swap applied
- Cannot be undone - swap configuration must be recreated if needed
Impact on Subscriptions:
- Active Subscriptions: Will continue with current products (no automatic reversion)
- Future Orders: Swap will not be applied
- Past Orders: Already swapped products remain unchanged
- Queued Swaps: Pending swaps for this automation are cancelled
When to Delete:
- Discontinuing a seasonal product rotation
- Removing outdated swap rules
- Cleaning up test or experimental swaps
- Product lines being discontinued
- Correcting misconfigured swaps
Important Notes:
- This operation is permanent and cannot be undone
- Consider deactivating instead of deleting if you might reuse the configuration
- Activity logs for past swaps are retained
- Customers are not automatically notified of swap deletion
Best Practices:
- Review affected subscriptions before deletion
- Consider communicating changes to affected customers
- Export swap configuration if you might need it later
- Use deactivation for temporary pauses instead of deletion
Authentication: Requires valid X-API-Key header
DELETE
/
api
/
external
/
v2
/
product-swaps
/
{id}
Delete a product swap automation
curl --request DELETE \
--url https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}import requests
url = "https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}', 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/product-swaps/{id}';
const options = {method: 'DELETE'};
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/product-swaps/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}"
req, _ := http.NewRequest("DELETE", 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://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"detail": "Product swap does not belong to this shop or ID is invalid",
"status": 400,
"title": "Invalid id",
"type": "https://example.com/errors/bad-request"
}{
"detail": "Valid X-API-Key header is required",
"status": 401,
"title": "Authentication required",
"type": "https://example.com/errors/unauthorized"
}{
"detail": "API key does not have permission to delete product swaps",
"status": 403,
"title": "Insufficient permissions",
"type": "https://example.com/errors/forbidden"
}{
"detail": "Product swap with ID 10782 not found",
"status": 404,
"title": "Resource not found",
"type": "https://example.com/errors/not-found"
}⌘I
Delete a product swap automation
curl --request DELETE \
--url https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}import requests
url = "https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}', 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/product-swaps/{id}';
const options = {method: 'DELETE'};
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/product-swaps/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}"
req, _ := http.NewRequest("DELETE", 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://subscription-admin.appstle.com/api/external/v2/product-swaps/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"detail": "Product swap does not belong to this shop or ID is invalid",
"status": 400,
"title": "Invalid id",
"type": "https://example.com/errors/bad-request"
}{
"detail": "Valid X-API-Key header is required",
"status": 401,
"title": "Authentication required",
"type": "https://example.com/errors/unauthorized"
}{
"detail": "API key does not have permission to delete product swaps",
"status": 403,
"title": "Insufficient permissions",
"type": "https://example.com/errors/forbidden"
}{
"detail": "Product swap with ID 10782 not found",
"status": 404,
"title": "Resource not found",
"type": "https://example.com/errors/not-found"
}