SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Storefront API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Bootstrap
    Get shop info and settings
Product
    Get list of productsGet product by IDGet variant or pricing by IDGet plan by ID
Bundle
    Get list of bundlesGet bundle by IDQuote bundleGet list of bundle group itemsGet list of bundle itemsGet the list of bundle items associated with multiple bundles
Survey
    Get survey by ID
Cart
    Init cartGet cart by IDUpdate cart by IDGet cart gifting datesGet cart start datesGet shipping methodsGet local pickupsValidate the cartAttach the customer to the cart
Cart Item
    Add cart itemUpdate cart itemDelete cart item
Checkout
    Make purchase from the cart
Auth
    LoginOtp LoginOtp GenerateSocial LoginRegisteredRegister
Customer
    Get the current customerGet the current customer referral infoUpdate customer
Address
    Get list of addressStore addressUpdate addressDelete address
Pickup Info
    Get list of pickup infosStore pickup infoUpdate pickup infoDelete pickup info
Wallet
    Store payment methodGet list of payment methodsStore payment methodDelete payment methodSet default payment method
Subscription
    Get list of subscriptionsShow subscriptionUpdate subscriptionUpdate subscription survey preferences by Subscription IDUpdate subscription bundle data by Subscription IDCancel a subscriptionUndo cancellationUpdate subscription payment methodGet shipping methodsGet local pickupsCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundle
Order
    Get list of ordersGet order by ID
Invoice
    Get list of invoicesGet invoice by ID
Payment Intent
    Confirm payment intentGet payment intent by ID
Funnels
    Get the current pre purchase funnel step by IDRefresh the funnel progressAccept the pre purchase funnel stepReject the pre purchase funnel stepGet the current mid purchase funnel step by IDRefresh the funnel progressAccept the mid purchase funnel stepReject the mid purchase funnel step
Countries
    Get list of countries
Out Of Stock
    Subscribe to the out of stock
Cancellation
    Get shop cancellation reasons
Metafield
    Get shop's metafields
Product Collection
    Get list of product collectionsGet product collection by IDGet list of collection groups with items
Lead
    Store the shop lead

Bundle

Storefront Bundle API endpoints

Endpoints
  • GET/bundles
  • GET/bundles/{bundle_id}
  • POST/bundles/{bundle_id}/quote
  • GET/bundles/{bundle}/groups
  • GET/bundles/{bundle_id}/items
  • GET/bundle/items

Get list of bundles

GET /bundles

An API endpoint to get list of bundles with filtering options.

Query parameters

pageoptionalinteger

Page number for pagination

per_pageoptionalinteger

Entities per page

ids[]optionalinteger[]

Filter by bundle IDs

tags[]optionalinteger[]

Filter by tag name

slugs[]optionalstring[]

Filter by bundle slugs

configurableoptionalboolean

Filter by configurable bundles

digitaloptionalboolean

Filter by digital bundles

sort[field]optionalstring

Field to sort by

Possible values: id, name.

sort[direction]optionalstring

Sort direction; defaults to asc.

Possible values: asc, desc.

Defaults to "asc".

Returnsobject

Bundles list response

curl https://api.subbly.co/storefront/v1/bundles \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "images": [ { "id": 1, "url": "https://www.example.com/image.jpg", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "configurable": true, "description": "description", "hidden_items": true, "searchable": false, "show_ruleset_name": false, "quantity_selectors": [ 1 ], "selection_type": "variant", "discount_type": "per_item", "price_type": "per_item", "ruleset_type": "total", "appearance_type": "one_step", "rulesets": [ { "id": 1, "name": "Ruleset Name", "products": [ {} ], "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "pricing": {}, "plan": {}, "variant": {}, "pricings": [ {} ], "variants": [ {} ], "prices": [ {} ], "discounts": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "preferences": [ { "id": 1, "attribute_id": 1, "metafield_id": 1, "title": "Do you want only vageterian dishes?", "values": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "filters": [ { "id": 1, "attribute_id": 1, "metafield_id": 1, "title": "Type of dish", "values": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "discounts": [ { "id": 1, "ruleset_id": 1, "plan_id": 1, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "change_product_collection_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Get bundle by ID

GET /bundles/{bundle_id}

A detailed description of the bundle

Path parameters

bundle_idRequiredinteger

Bundle ID

ReturnsBundle

Bundle object response

curl https://api.subbly.co/storefront/v1/bundles/{bundle_id} \ -H 'X-API-KEY: <api-key>'
Response
{ "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "images": [ { "id": 1, "url": "https://www.example.com/image.jpg", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "configurable": true, "description": "description", "hidden_items": true, "searchable": false, "show_ruleset_name": false, "quantity_selectors": [ 1 ], "selection_type": "variant", "discount_type": "per_item", "price_type": "per_item", "ruleset_type": "total", "appearance_type": "one_step", "rulesets": [ { "id": 1, "name": "Ruleset Name", "products": [ {} ], "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "pricing": {}, "plan": {}, "variant": {}, "pricings": [ {} ], "variants": [ {} ], "prices": [ {} ], "discounts": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "preferences": [ { "id": 1, "attribute_id": 1, "metafield_id": 1, "title": "Do you want only vageterian dishes?", "values": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "filters": [ { "id": 1, "attribute_id": 1, "metafield_id": 1, "title": "Type of dish", "values": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "discounts": [ { "id": 1, "ruleset_id": 1, "plan_id": 1, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "change_product_collection_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Quote bundle

POST /bundles/{bundle_id}/quote

An api call to calculate bundle price.

Path parameters

bundle_idRequiredinteger

Request body

product_idoptionalinteger

Variant or Pricing ID attached to the ruleset

quantityoptionalinteger
itemsoptionalQuoteBundleItemBody[]
preferencesoptionalQuoteBundlePreferenceBody[]

ReturnsBundleQuote

Bundle quote response

curl -X POST https://api.subbly.co/storefront/v1/bundles/{bundle_id}/quote \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "product_id": 1, "quantity": 1, "items": [ { "product_id": 1, "quantity": 1 } ], "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ 1 ] } ] }'
Response
{ "product_id": 1, "product": { "id": 1, "parent": {}, "product": {}, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "pricing_name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "stock_count": 100, "trial_price": null, "trial_length": null, "trial_single_order": true, "charge_immediately": true, "ship_immediately": true, "rebilling_start_at": "2022-04-01", "cut_off_at": "2022-04-01", "cut_off_time": "00:00", "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "survey": {}, "metadata": [ {} ], "commitment_billing_count": 0, "charges_limit": 0, "created_at": "2022-04-01 00:00:00" }, "quantity": 2, "price": 799, "total": 1458, "sub_total": 1458, "tax_amount": 160, "tax_rate": 0.01, "tax_inclusive": false, "discount": 300, "preferences": [ { "attribute_id": 1, "metafield_id": 1, "values": [ 1 ] } ], "items": [ { "product_id": 1, "product": {}, "quantity": 2, "price": 799, "total": 1458, "sub_total": 1458, "tax_amount": 160, "tax_rate": 0.01, "tax_inclusive": false, "discount": 300 } ] }

Get list of bundle group items

GET /bundles/{bundle}/groups

An API endpoint to get list of bundle group items.

Path parameters

bundleRequiredinteger

Bundle ID

Query parameters

pageoptionalinteger

Page

per_pageoptionalinteger

Entities per page

expandoptionalstring[]

Expand related resources

Returnsobject

Bundle group items list response

curl https://api.subbly.co/storefront/v1/bundles/{bundle}/groups \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "product_id": 1, "product": { "id": 1, "bundle_id": 1, "bundle": {}, "bundle_ruleset_id": 1, "bundle_ruleset": {}, "slug": "yellow-t-shirt-with-pokemon-print", "type": "one_time", "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "delivery_info": "Free shipping on orders over $100", "collect_shipping_address": true, "gifting_enabled": true, "digital": false, "images": [ {} ], "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "variants": [ {} ], "options": [ {} ] }, "min_quantity": 1, "max_quantity": 5, "items": [ { "id": 1, "product_id": 1, "bundle_id": 1, "product": {}, "variant_id": 1, "variant": {}, "settings": [ {} ], "stock_quantity": 1, "quantity": 1, "extra_price": 1, "position": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Get list of bundle items

GET /bundles/{bundle_id}/items

An API endpoint to get list of bundle items.

Path parameters

bundle_idRequiredinteger

Bundle ID

Query parameters

pageoptionalinteger

Page

per_pageoptionalinteger

Entities per page

queryoptionalstring | null

Search entities by the query

product_ids[]optionalinteger[]Deprecated

Product IDs (deprecated - use variant_ids instead)

variant_ids[]optionalinteger[]

Filter by variant IDs

filters[]optionalobject

Filter object

Returnsobject

Bundle items list response

curl https://api.subbly.co/storefront/v1/bundles/{bundle_id}/items \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "product_id": 1, "bundle_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "variant_id": 1, "variant": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "settings": [ { "id": 1, "ruleset_id": 1, "max_quantity": 3, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "stock_quantity": 1, "quantity": 1, "extra_price": 1, "position": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Get the list of bundle items associated with multiple bundles

GET /bundle/items

An API endpoint to get the list of bundle items associated with multiple bundles.

Query parameters

bundle_ids[]Requiredinteger[]

Bundle IDs

pageoptionalinteger

Page

per_pageoptionalinteger

Entities per page

queryoptionalstring | null

Search entities by the query

product_ids[]optionalinteger[]

Product IDs

filters[]optionalobject

Filter object

Returnsobject

Bundle items list response

curl https://api.subbly.co/storefront/v1/bundle/items \ -H 'X-API-KEY: <api-key>'
Response
{ "pagination": { "current_page": 1, "last_page": 2, "from": 1, "to": 1, "total": 20 }, "data": [ { "id": 1, "product_id": 1, "bundle_id": 1, "product": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "variant_id": 1, "variant": { "id": 1, "bundle_plan_id": 1, "bundle_plan": {}, "name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": {}, "stock_count": 100, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "settings": [ { "id": 1, "ruleset_id": 1, "max_quantity": 3, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "stock_quantity": 1, "quantity": 1, "extra_price": 1, "position": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }
paginationobject
dataBundle[]
idinteger
namestring
slugstring
digitalboolean
delivery_infostring | null
imagesProductImage[]
configurableboolean
descriptionstring | null
hidden_itemsboolean
searchableboolean
show_ruleset_nameboolean
quantity_selectorsinteger[]
selection_typestring | null

Possible values: variant, product, single_product.

discount_typestring | null

Possible values: per_item, total, percentage.

price_typestring | null

Possible values: per_item, total.

ruleset_typestring

Possible values: total, quantity.

appearance_typestring

Possible values: one_step, two_step, without_ruleset, after_checkout.

rulesetsBundleRuleset[]
plansBundlePlan[]
preferencesBundlePreference[]
filtersBundleFilter[]
discountsBundleDiscount[]
change_product_collection_idinteger | null

ID of the product collection used for cross-product plan switching.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

product_idoptionalinteger

Variant ID

quantityoptionalinteger
attribute_idoptionalintegerDeprecated
metafield_idoptionalinteger
valuesoptionalinteger[]
product_idinteger
productPlan | Variant | null

Expandable link to the variant or pricing.

quantityinteger
priceinteger
totalinteger
sub_totalinteger
tax_amountinteger
tax_ratenumber
tax_inclusiveboolean

Defaults to false.

discountinteger
preferencesBundleQuotePreference[]
itemsBundleQuoteItem[]
paginationobject
dataBundleGroupItem[]
attribute_idoptionalintegerDeprecated
metafield_idoptionalinteger
valuesoptionalinteger[]
paginationobject
dataBundleItem[]
attribute_idoptionalintegerDeprecated
metafield_idoptionalinteger
valuesoptionalinteger[]
paginationobject
dataBundleItem[]