Skip to main content
GET
/
api
/
external
/
v2
/
build-a-box
/
{handle}
Retrieve Build-A-Box bundle details by handle for customer storefront
curl --request GET \
  --url https://subscription-admin.appstle.com/api/external/v2/build-a-box/{handle}
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/build-a-box/{handle}"

response = requests.get(url)

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

fetch('https://subscription-admin.appstle.com/api/external/v2/build-a-box/{handle}', 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/{handle}';
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://subscription-admin.appstle.com/api/external/v2/build-a-box/{handle}",
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://subscription-admin.appstle.com/api/external/v2/build-a-box/{handle}"

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://subscription-admin.appstle.com/api/external/v2/build-a-box/{handle}")

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
{
  "bundle": {
    "active": true,
    "allowOneTimePurchase": true,
    "buildABoxType": "SINGLE_PRODUCT",
    "buildBoxVersion": "V2",
    "bundleHandle": "premium-coffee-selection",
    "bundleName": "Premium Coffee Selection",
    "description": "Choose your favorite coffee blends for monthly delivery",
    "discount": 10,
    "discountType": "PERCENTAGE",
    "id": 45678,
    "maxProductCount": 5,
    "minProductCount": 2,
    "products": [
      {
        "imageUrl": "https://cdn.shopify.com/coffee-medium.jpg",
        "price": "14.99",
        "productId": 111111,
        "title": "Medium Roast Coffee - 12oz",
        "variantId": 222222
      }
    ],
    "shop": "example-shop.myshopify.com",
    "uniqueRef": "bab_abc123xyz"
  },
  "createdAt": "2024-03-15T10:30:00Z",
  "subscription": {
    "deliveryPolicy": {
      "anchors": [],
      "type": "RECURRING"
    },
    "frequencies": [
      {
        "displayName": "Deliver every month",
        "interval": "MONTH",
        "intervalCount": 1
      },
      {
        "displayName": "Deliver every 2 weeks",
        "interval": "WEEK",
        "intervalCount": 2
      }
    ],
    "sellingPlanGroupId": "gid://shopify/SellingPlanGroup/123456",
    "subscriptionPlanId": 98765
  },
  "updatedAt": "2024-03-20T14:45:00Z"
}

Headers

X-API-Key
string

Path Parameters

handle
string
required

Bundle Handle

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Response

Bundle and subscription details successfully retrieved

bundle
object
products
object[]
subscription
object
subscriptionGroupPlans
object[]
subscriptionPlanProductInfoMap
object
subscriptionPlanVariantMap
object
variants
string[]