Skip to main content
GET
/
api
/
external
/
v2
/
build-a-box
/
{id}
Retrieve a Build-A-Box bundle by ID
curl --request GET \
  --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.get(url)

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

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: '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/{id}",
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/{id}"

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/{id}")

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
{
  "active": true,
  "allowOneTimePurchase": true,
  "availableProducts": [
    {
      "available": true,
      "imageUrl": "https://cdn.shopify.com/coffee-medium.jpg",
      "price": "14.99",
      "productId": 111111,
      "title": "Medium Roast Coffee - 12oz",
      "variantId": 222222
    },
    {
      "available": true,
      "imageUrl": "https://cdn.shopify.com/coffee-dark.jpg",
      "price": "15.99",
      "productId": 111111,
      "title": "Dark Roast Coffee - 12oz",
      "variantId": 333333
    }
  ],
  "buildABoxType": "SINGLE_PRODUCT",
  "buildBoxVersion": "V2",
  "bundleHandle": "premium-coffee-selection",
  "bundleName": "Premium Coffee Selection",
  "chooseProductsText": "Build Your Perfect Coffee Box",
  "createdAt": "2024-03-15T10:30:00Z",
  "description": "Choose your favorite coffee blends for monthly delivery",
  "discount": 10,
  "discountType": "PERCENTAGE",
  "frequencies": [
    {
      "displayName": "Monthly",
      "interval": "MONTH",
      "intervalCount": 1
    },
    {
      "displayName": "Bi-Weekly",
      "interval": "WEEK",
      "intervalCount": 2
    }
  ],
  "id": 45678,
  "maxProductCount": 5,
  "minOrderAmount": 25,
  "minProductCount": 2,
  "pricingType": "PER_PRODUCT",
  "proceedToCheckoutButtonText": "Complete Your Subscription",
  "productViewStyle": "GRID",
  "shop": "example-shop.myshopify.com",
  "thirdPartyRule": false,
  "trackInventory": true,
  "uniqueRef": "bab_abc123xyz",
  "updatedAt": "2024-03-20T14:45:00Z"
}
{
"detail": "Valid X-API-Key header or api_key parameter is required",
"status": 401,
"title": "Authentication required",
"type": "https://example.com/errors/unauthorized"
}
{
"detail": "No Build-A-Box bundle found with ID 45678 for your shop",
"status": 404,
"title": "Bundle not found",
"type": "https://example.com/errors/not-found"
}
{
"detail": "An unexpected error occurred while retrieving the Build-A-Box bundle",
"status": 500,
"title": "Internal server error",
"type": "https://example.com/errors/internal-server-error"
}

Headers

X-API-Key
string

Path Parameters

id
integer<int64>
required

Query Parameters

api_key
string

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

Response

Build-A-Box bundle successfully retrieved

shop
string
required
allowOneTimePurchase
boolean
appliesOn
enum<string>
Available options:
PRODUCT,
COLLECTION,
BOTH,
ONE_TIME,
SUBSCRIPTION
buildABoxType
enum<string>
Available options:
CLASSIC,
SINGLE_PRODUCT,
MIX_AND_MATCH,
INFINITE,
CUSTOMIZE_BUNDLE,
CLASSIC_BUILD_A_BOX,
SINGLE_PRODUCT_BUILD_A_BOX,
VOLUME_DISCOUNT,
DISCOUNTED_PRICING,
SHIPPING_DISCOUNT,
BUY_X_GET_Y,
SECTIONED_BUNDLE
bundleBottomHtml
string
bundleRedirect
enum<string>
Available options:
CART,
CHECKOUT,
CUSTOM,
NONE
bundleTopHtml
string
chooseProductsText
string
collectionData
string
customRedirectURL
string
discount
number<double>
discountedVariants
string
groupName
string
id
integer<int64>
maxProductCount
integer<int32>
minOrderAmount
number<double>
minProductCount
integer<int32>
minUniqueProductCheck
boolean
name
string
proceedToCheckoutButtonText
string
productDiscountType
enum<string>
Available options:
SELECTED_PRODUCT,
EACH_PRODUCT
productSelectionType
enum<string>
Available options:
PRODUCT,
COLLECTION
productViewStyle
enum<string>
Available options:
QUICK_ADD,
VIEW_DETAILS
sections
string
selectionType
enum<string>
Available options:
FIXED,
FLEXIBLE
sellingPlanIds
string
singleProductSettings
string
subscriptionBundlingEnabled
boolean
subscriptionGroup
string
subscriptionId
integer<int64>
thirdPartyRule
boolean
tieredDiscount
string
trackInventory
boolean
uniqueRef
string
variants
string