Build-a-Box & Bundles
Delete a Build-A-Box subscription bundle
Deletes a Build-A-Box by its numeric id. The call returns 204 with no body. Deleting is permanent.
Behavior:
- An
idthat isn’t one of your boxes returns400witherrorKeyunauthorized. - A box that any subscription was created from, cancelled subscriptions included, can’t be deleted. The call returns
400withDeleting Build-A-Box is not possible, N subscriptions found. You may deactivate the Build-A-Box., whereNis the count. To take such a box off the store, send it back withPUT /api/external/v2/build-a-boxandsubscriptionBundlingEnabledset tofalse. - A box with
thirdPartyRuleset totruebelongs to the Appstle Bundles app, which creates it again the next time the merchant saves it there. Change it in Bundles.
Authentication: Requires a valid X-API-Key header with a Read & Write key.
DELETE
/
api
/
external
/
v2
/
build-a-box
/
{id}
Delete a Build-A-Box subscription bundle
curl --request DELETE \
--url https://subscription-admin.appstle.com/api/external/v2/build-a-box/{id}import requests
url = "https://subscription-admin.appstle.com/api/external/v2/build-a-box/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://subscription-admin.appstle.com/api/external/v2/build-a-box/{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/build-a-box/{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/build-a-box/{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/build-a-box/{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/build-a-box/{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{
"entityName": "subscriptionBundling",
"errorKey": "unauthorized",
"message": "Unauthorized access or resource not found",
"params": "subscriptionBundling",
"status": 400,
"title": "Unauthorized access or resource not found",
"type": "https://appstle.com/problem/problem-with-message"
}⌘I
Delete a Build-A-Box subscription bundle
curl --request DELETE \
--url https://subscription-admin.appstle.com/api/external/v2/build-a-box/{id}import requests
url = "https://subscription-admin.appstle.com/api/external/v2/build-a-box/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://subscription-admin.appstle.com/api/external/v2/build-a-box/{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/build-a-box/{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/build-a-box/{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/build-a-box/{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/build-a-box/{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{
"entityName": "subscriptionBundling",
"errorKey": "unauthorized",
"message": "Unauthorized access or resource not found",
"params": "subscriptionBundling",
"status": 400,
"title": "Unauthorized access or resource not found",
"type": "https://appstle.com/problem/problem-with-message"
}