Product
Storefront Product API endpoints
An API endpoint to get list of products with filtering options.
Query parameters
pageoptionalintegerPage number for pagination
per_pageoptionalintegerEntities per page
typeoptionalstringFilter by product type
Possible values: one_time, subscription.
ids[]optionalinteger[]Filter by product IDs
tags[]optionalinteger[]Filter by tag names
slugs[]optionalstring[]Filter by product slugs
digitaloptionalbooleanFilter by digital products
gift_cardoptionalbooleanFilter by gift card products
sort[field]optionalstringField to sort by
Possible values: id, name.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
Returnsobject
Products list response
curl https://api.subbly.co/storefront/v1/products \
-H 'X-API-KEY: <api-key>'Response
{
"pagination": {
"current_page": 1,
"last_page": 2,
"from": 1,
"to": 1,
"total": 20
},
"data": [
{
"id": 1,
"bundle_id": 1,
"bundle": {
"id": 1,
"name": "Bundle Name",
"slug": "Bundle slug",
"digital": false,
"delivery_info": "delivery_info",
"images": [
{}
],
"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": [
{}
],
"plans": [
{}
],
"preferences": [
{}
],
"filters": [
{}
],
"discounts": [
{}
],
"change_product_collection_id": 1,
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00"
},
"bundle_ruleset_id": 1,
"bundle_ruleset": {
"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"
},
"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": [
{
"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"
}
],
"metadata": [
{
"id": 1,
"name": "Color",
"slug": "color-red",
"description": "description",
"unit": "kg",
"data_type": "single_line_string",
"preset": true,
"multiple": true,
"variant": true,
"save_behavior": "customer",
"editable": true,
"values": [
{}
]
}
],
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00",
"gift_card": false,
"gift_card_expiration": null,
"variants": [
{
"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"
}
],
"options": [
{
"id": 1,
"name": "Size",
"values": [
"Medium"
]
}
]
}
]
}A detailed description of the product.
Path parameters
product_idRequiredintegerProduct ID
ReturnsOneTimeProduct | SubscriptionProduct
Product object response
curl https://api.subbly.co/storefront/v1/products/{product_id} \
-H 'X-API-KEY: <api-key>'Response
{
"id": 1,
"bundle_id": 1,
"bundle": {
"id": 1,
"name": "Bundle Name",
"slug": "Bundle slug",
"digital": false,
"delivery_info": "delivery_info",
"images": [
{}
],
"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": [
{}
],
"plans": [
{}
],
"preferences": [
{}
],
"filters": [
{}
],
"discounts": [
{}
],
"change_product_collection_id": 1,
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00"
},
"bundle_ruleset_id": 1,
"bundle_ruleset": {
"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"
},
"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": [
{
"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"
}
],
"metadata": [
{
"id": 1,
"name": "Color",
"slug": "color-red",
"description": "description",
"unit": "kg",
"data_type": "single_line_string",
"preset": true,
"multiple": true,
"variant": true,
"save_behavior": "customer",
"editable": true,
"values": [
{}
]
}
],
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00",
"gift_card": false,
"gift_card_expiration": null,
"variants": [
{
"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"
}
],
"options": [
{
"id": 1,
"name": "Size",
"values": [
"Medium"
]
}
]
}A detailed description of the variant or pricing.
Path parameters
variant_idRequiredintegerVariant or pricing ID
ReturnsVariant | Plan
Variant or pricing object response
curl https://api.subbly.co/storefront/v1/variants/{variant_id} \
-H 'X-API-KEY: <api-key>'Response
{
"id": 1,
"bundle_plan_id": 1,
"bundle_plan": {
"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"
},
"name": "Yellow T-shirt with pokemon print",
"description": "Yellow T-shirt with pokemon print",
"price": 799,
"price_schema": {
"i": 1,
"type": "flat_price",
"amount": 799,
"ranges": [
{}
],
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00"
},
"stock_count": 100,
"parent": {
"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": [
{}
]
},
"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": [
{}
]
},
"metadata": [
{
"id": 1,
"name": "Color",
"slug": "color-red",
"description": "description",
"unit": "kg",
"data_type": "single_line_string",
"preset": true,
"multiple": true,
"variant": true,
"save_behavior": "customer",
"editable": true,
"values": [
{}
]
}
],
"attributes": [
{
"id": 1,
"name": "Color",
"slug": "color-red",
"description": "description",
"unit": "kg",
"data_type": "single_line_string",
"preset": true,
"multiple": true,
"variant": true,
"save_behavior": "customer",
"editable": true,
"values": [
{}
]
}
],
"options": [
{
"id": 1,
"name": "Size",
"value": "Medium"
}
],
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00"
}A detailed description of the plan.
Path parameters
plan_idRequiredintegerPlan ID
ReturnsPlan
Plan object response
curl https://api.subbly.co/storefront/v1/plans/{plan_id} \
-H 'X-API-KEY: <api-key>'Response
{
"id": 1,
"parent": {
"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",
"pricings": [
{}
],
"plans": [
{}
],
"change_product_collection_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",
"pricings": [
{}
],
"plans": [
{}
],
"change_product_collection_id": 1
},
"bundle_plan_id": 1,
"bundle_plan": {
"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"
},
"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": {
"i": 1,
"type": "flat_price",
"amount": 799,
"ranges": [
{}
],
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00"
},
"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": [
{
"id": 1,
"shipping_at": "2022-04-01 00:00:00",
"add_count": 1,
"add_unit": "month",
"unit_day": 1,
"unit_offset": 0,
"created_at": "2022-04-01 00:00:00",
"updated_at": "2022-04-01 00:00:00"
}
],
"survey": {
"id": 1,
"title": "What is your favorite color?",
"questions": [
{}
],
"single_step": true,
"multiply_price_by_shipment_number": true,
"appearance_type": "after_checkout",
"customizations": {},
"created_at": "2023-03-30T15:00:00+00:00",
"updated_at": "2023-03-30T15:00:00+00:00"
},
"metadata": [
{
"id": 1,
"name": "Color",
"slug": "color-red",
"description": "description",
"unit": "kg",
"data_type": "single_line_string",
"preset": true,
"multiple": true,
"variant": true,
"save_behavior": "customer",
"editable": true,
"values": [
{}
]
}
],
"commitment_billing_count": 0,
"charges_limit": 0,
"created_at": "2022-04-01 00:00:00"
}