SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Private API reference
Docs
Information
    Base URLAuthenticationPaginationErrors
Customer
    Get list of customersCreate a customerGet customer by IDUpdate a customerDelete a customerCredit a customer's store credit balanceCreate a customer noteUpdate a customer noteDelete a customer noteCreate a customer addressUpdate a customer addressDelete a customer addressGet list of customer pickup infoCreate customer pickup infoUpdate customer pickup infoDelete customer pickup infoCreate a customer payment methodDelete a customer payment method
Subscription
    Get list of subscriptionsCreate a subscriptionGet subscription by IDCancel a subscriptionUndo cancellationCreate a subscription itemShow a subscription itemUpdate a subscription itemRemove a subscription itemUpdate a subscription item's preferencesUpdate a subscription item's bundleApply a discount to a subscriptionRemove a subscription discount
Invoice
    Get list of invoicesGet invoice by IDSchedule the next payment for invoiceVoid an invoiceForgive an invoiceMark an invoice as paid
Order
    Get list of ordersGet order by IDUpdate an orderShip an orderCancel an orderMark an order as pendingArchive an orderMark an order as a future shipmentSync order shipping items
Payment Method
    Get payment method by ID
Transaction
    Get list of transactionsGet transaction by ID
Cancellation
    Get shop cancellation reasons
Product
    Get list of productsGet product by IDGet variant by IDUpdate variantGet plan by IDUpdate planCreate subscription productUpdate subscription productPublish subscription productUnpublish subscription productArchive subscription productSync subscription product metadataCreate one-time productUpdate one-time productPublish one-time productUnpublish one-time productArchive one-time productSync one-time product metadataCreate variantArchive variantBatch create/update/archive variantsCreate planArchive plan
Survey
    Get survey by IDGet list of surveys
Bundle
    Get list of bundlesCreate a new bundleGet bundle by IDUpdate a bundleGet list of bundle itemsCreate a bundle itemBatch create bundle itemsGet bundle item by IDUpdate a bundle itemDelete a bundle itemGet list of bundle groupsPublish a bundleUnpublish a bundleArchive a bundleSync bundle metadataCreate a bundle planGet bundle plan by IDUpdate a bundle planArchive a bundle plan
Tag
    Get list of tags
Metafield
    Get shop's metafieldsCreate a new metadataUpdate the metadata
Funnel
    Get list of funnelsGet funnel by ID
Option
    Get list of options
Country
    Get list of countries
Inventory
    Get list of inventory itemsCreate a new inventory itemGet inventory item by IDUpdate an inventory itemArchive an inventory itemGet list of inventory groupsCreate a new inventory groupGet inventory group by IDUpdate an inventory group
Coupon
    Get list of couponsCreate a couponGet coupon by IDUpdate a couponArchive a coupon
Product Collection
    Get list of product collectionsCreate a product collectionGet product collection by IDUpdate a product collectionPublish a product collectionUnpublish a product collectionArchive a product collectionGet list of collection groups with itemsSync collection items

Product

Private Product API endpoints

Endpoints
  • GET/products
  • GET/products/{product_id}
  • GET/variants/{variant_id}
  • PUT/variants/{variant_id}
  • GET/plans/{plan_id}
  • PUT/plans/{plan_id}
  • POST/products/subscription
  • PUT/products/subscription/{product_id}
  • POST/products/subscription/{product_id}/publish
  • POST/products/subscription/{product_id}/unpublish
  • POST/products/subscription/{product_id}/archive
  • POST/products/subscription/{product_id}/metadata
  • POST/products/one_time
  • PUT/products/one_time/{product_id}
  • POST/products/one_time/{product_id}/publish
  • POST/products/one_time/{product_id}/unpublish
  • POST/products/one_time/{product_id}/archive
  • POST/products/one_time/{product_id}/metadata
  • POST/variants
  • POST/variants/{variant_id}/archive
  • POST/variants/batch
  • POST/plans
  • POST/plans/{plan_id}/archive

Get list of products

GET /products

An API endpoint to get list of products. The private API can access both published and unpublished products. Archived products and products that belong to a bundle are never returned, so bundle_id and bundle are always null here. Child records (variants and plans) are excluded as well; fetch those with expand[]. Results are ordered by id descending unless sort is supplied.

Query parameters

pageoptionalinteger

Page number for pagination

Defaults to 1.

per_pageoptionalinteger

Items per page

Defaults to 10.

typeoptionalstring

Filter by product type

Possible values: one_time, subscription.

ids[]optionalinteger[]

Filter by product IDs. Values must be unique.

tags[]optionalstring[]

Filter by tags. Values must be unique.

slugs[]optionalstring[]

Filter by product slugs. Values must be unique.

publishedoptionalboolean

Filter by published status

digitaloptionalboolean

Filter by digital products

gift_cardoptionalboolean

Filter by gift card products

expand[]optionalstring[]

Relations to expand. Accepted values: variants (one-time products), plans and pricings (subscription products), and bundle. Dot notation expands nested relations of those, for example variants.bundle_plan or plans.parent. images, tags, options and metadata are always included and need not be requested. Unknown values are ignored.

sort[field]optionalstring

Field to sort by. Required whenever any sort[...] key is present, so sending sort[direction] on its own returns 422. Send sort as an object (sort[field]=name), never as a scalar. When sort is omitted the list is ordered by id descending.

Possible values: id, name.

sort[direction]optionalstring

Sort direction; defaults to asc.

Possible values: asc, desc.

Defaults to "asc".

Returnsobject

Products list response

curl https://api.subbly.co/private/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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] } ] }

Get product by ID

GET /products/{product_id}

A detailed description of the product. The private API can access both published and unpublished products.

Path parameters

product_idRequiredinteger

Product ID

Query parameters

expand[]optionalstring[]

Relations to expand. Accepted values: variants (one-time products), plans and pricings (subscription products), and bundle. Dot notation expands nested relations of those, for example variants.bundle_plan or plans.parent. images, tags, options and metadata are always included and need not be requested. Unknown values are ignored.

ReturnsOneTimeProduct | SubscriptionProduct

Product object response

Error responses

403object

The product belongs to another shop, or is archived.

404object

No product exists with this ID, or the ID belongs to a variant or plan rather than a parent product.

curl https://api.subbly.co/private/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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Get variant by ID

GET /variants/{variant_id}

Get a specific variant by ID. This endpoint is only for one-time product variants. Accepted expand values are parent, product and bundle_plan; without them those fields are null. options, attributes, metadata, stock_count and price_schema are always included and need no expand. Unrecognised expand values are ignored.

Path parameters

variant_idRequiredinteger

Variant ID

Query parameters

expand[]optionalstring[]

List of relations to expand in the response.

ReturnsVariant

Variant object response

curl https://api.subbly.co/private/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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Update variant

PUT /variants/{variant_id}

Path parameters

variant_idRequiredinteger

Variant ID

Request body

nameoptionalstring | null

Required when the parent product is a gift card and the variant has no name yet.

priceoptionalinteger
descriptionoptionalstring | null
inventory_item_idoptionalinteger | null

Prohibited for gift card products.

optionsoptionalobject | null

Prohibited for gift card products. A product cannot have more than 3 distinct option types in total, counting option types already used by its variants.

ReturnsVariant

Variant object response

curl -X PUT https://api.subbly.co/private/v1/variants/{variant_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "price": 0, "description": "description", "inventory_item_id": 1, "options": { "create": [ { "name": "name", "value": "value" } ], "update": [ { "id": 1, "value": "value" } ] } }'
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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Get plan by ID

GET /plans/{plan_id}

Get a specific plan by ID. This endpoint is only for subscription product plans that are not part of a bundle; use GET /bundles/{bundle_id}/plans/{plan_id} for those. Archived plans are not returned. Expandable relations: parent, product and bundle_plan. Shippings, survey, stock_count, metadata and price_schema are always included.

Path parameters

plan_idRequiredinteger

Plan ID

Query parameters

expand[]optionalstring[]

List of relations to expand in the response.

ReturnsPlan

Plan object response

curl https://api.subbly.co/private/v1/plans/{plan_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", "pricing_name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "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", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "survey": { "id": 1, "title": "What is your favorite color?", "questions": [ {} ], "single_step": true, "multiply_price_by_shipment_number": true, "appearance_type": "before_cart", "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Update plan

PUT /plans/{plan_id}

Path parameters

plan_idRequiredinteger

Plan ID

Request body

nameoptionalstring | null
priceoptionalinteger

Price in cents. Cannot be changed if the plan has active subscriptions.

cut_off_daysoptionalinteger | null

Required when the plan's shipment schedule is anchored (entries with unit_day), and prohibited when it is not. If shipment_schedule is sent in the same request, that value decides; otherwise the stored schedule does.

cut_off_timeoptionalstring | null

Format HH:mm. Defaults to "23:59" when cut_off_days is sent without it. Rejected for digital products, for non-anchored shipment schedules, and when the shop's subscription plan does not include the cut-off-time feature.

charge_immediatelyoptionalinteger

Prohibited for digital products. Must be 1 when the plan is ad-hoc (no rebilling_day, rebilling_day_of_month or rebilling_day_of_week stored). Required whenever ship_immediately is sent.

Possible values: 0, 1.

ship_immediatelyoptionalinteger

Required whenever charge_immediately is sent. Cannot be 1 while charge_immediately is 0, and cannot be set to 0 while the plan has buffer_days; send buffer_days as null in the same request to clear it.

Possible values: 0, 1.

buffer_daysoptionalinteger | null

Only settable when the plan has exactly one shipment schedule entry, counted from shipment_schedule if sent in the same request, otherwise from the plan's stored schedule.

trial_priceoptionalinteger | null

Prohibited when the parent product has a pre-order end date, and prohibited for anchored plans (plans with a stored rebilling_day* value).

trial_length_daysoptionalinteger | null

Prohibited when the parent product has a pre-order end date, and prohibited for anchored plans (plans with a stored rebilling_day* value).

trial_single_orderoptionalinteger

Prohibited for digital products. Setting it to 1 also requires an ad-hoc plan with a trial length (sent or already stored) and no pre-order end date.

Possible values: 0, 1.

commitment_billing_countoptionalinteger | null

Only available when the shop's subscription plan includes commitment billing.

charges_limitoptionalinteger | null
shipment_scheduleoptionalobject[]

Prohibited for digital products. All entries must use the same format, and each entry must supply exactly one of the two pairs: buffered (add_unit + add_count) or anchored (unit_day + unit_offset). The buffered pair is prohibited while the plan's schedule is anchored.

survey_idoptionalinteger | null

ID of a survey belonging to the authenticated shop.

ReturnsPlan

Plan object response

curl -X PUT https://api.subbly.co/private/v1/plans/{plan_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "price": 0, "cut_off_days": 0, "cut_off_time": "23:59", "charge_immediately": 0, "ship_immediately": 0, "buffer_days": 0, "trial_price": 0, "trial_length_days": 0, "trial_single_order": 0, "commitment_billing_count": 1, "charges_limit": 1, "shipment_schedule": [ { "add_unit": "day", "add_count": 1, "unit_day": 1, "unit_offset": 1 } ], "survey_id": 1 }'
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", "pricing_name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "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", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "survey": { "id": 1, "title": "What is your favorite color?", "questions": [ {} ], "single_step": true, "multiply_price_by_shipment_number": true, "appearance_type": "before_cart", "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Create subscription product

POST /products/subscription

Request body

nameRequiredstring
slugRequiredstring

Letters, digits, dashes and underscores only. Must be unique among the shop's products; a duplicate slug is rejected with 422.

digitaloptionalinteger

Possible values: 0, 1.

descriptionoptionalstring | null
delivery_infooptionalstring | null
gifting_enabledoptionalinteger | null

Not available for digital products: when digital is 1 the only accepted value is 0. Defaults to 0 when omitted.

Possible values: 0, 1.

pre_order_end_atoptionalstring | null

Date in Y-m-d form; must be today or later. Must be omitted when digital is 1; pre-order is not available for digital products.

Format: date.

setup_feeoptionalinteger | null
pause_enabledoptionalinteger

Disabling pause (0) requires the optional-pause feature on the shop's plan. Shops without it may only send 1. Defaults to 1 when omitted.

Possible values: 0, 1.

collect_shipping_addressoptionalinteger | null

Only digital products (digital: 1) may send 0. For physical products the only accepted value is 1. Defaults to 1 for physical products and 0 for digital ones when omitted.

Possible values: 0, 1.

tax_product_codeoptionalstring | null

US-based shops only. Sending a non-empty value from a shop in any other country is rejected with 422.

inventory_item_idoptionalinteger | null

Must reference a non-archived inventory item belonging to the shop.

funnel_idoptionalinteger | null

Must reference a non-deleted funnel belonging to the shop.

tagsoptionalobject
imagesoptionalobject | null

ReturnsSubscriptionProduct

Subscription product created

curl -X POST https://api.subbly.co/private/v1/products/subscription \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "slug": "slug", "digital": 0, "description": "description", "delivery_info": "delivery_info", "gifting_enabled": 0, "pre_order_end_at": "2026-06-01", "setup_fee": 0, "pause_enabled": 0, "collect_shipping_address": 0, "tax_product_code": "tax_product_code", "inventory_item_id": 1, "funnel_id": 1, "tags": { "create": [ { "value": "value" } ] }, "images": { "create": [ { "url": "url", "order": 0 } ] } }'
Response
{ "id": 1, "bundle_id": 1, "bundle": { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Update subscription product

PUT /products/subscription/{product_id}

Path parameters

product_idRequiredinteger

Product ID

Request body

nameoptionalstring
slugoptionalstring

Letters, digits, dashes and underscores only. Must be unique among the shop's other products; a duplicate slug is rejected with 422.

descriptionoptionalstring | null
delivery_infooptionalstring | null
gifting_enabledoptionalinteger

Must be omitted for digital products; sending any value, including 0, on a digital product is rejected with 422.

Possible values: 0, 1.

pre_order_end_atoptionalstring | null

Date in Y-m-d form; must be today or later. Must be omitted for digital products. Rejected with 422 when any active plan of this product has a trial; remove the trial first, or send null to clear the pre-order date.

Format: date.

setup_feeoptionalinteger | null
pause_enabledoptionalinteger

Disabling pause (0) requires the optional-pause feature on the shop's plan. Shops without it may only send 1.

Possible values: 0, 1.

collect_shipping_addressoptionalinteger

Only accepted as 0 when the product is digital. For a physical product the only accepted value is 1.

Possible values: 0, 1.

tax_product_codeoptionalstring | null

US-based shops only. Sending a non-empty value from a shop in any other country is rejected with 422.

inventory_item_idoptionalinteger | null

Must reference a non-archived inventory item belonging to the shop.

funnel_idoptionalinteger | null

Must reference a non-deleted funnel belonging to the shop.

change_product_collection_idoptionalinteger | null

ID of the product collection used for cross-product plan switching. Must be a non-archived collection of the shop whose type is 'subscription' or unset.

tagsoptionalobject
imagesoptionalobject

ReturnsSubscriptionProduct

Subscription product updated

curl -X PUT https://api.subbly.co/private/v1/products/subscription/{product_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "slug": "slug", "description": "description", "delivery_info": "delivery_info", "gifting_enabled": 0, "pre_order_end_at": "2026-06-01", "setup_fee": 0, "pause_enabled": 0, "collect_shipping_address": 0, "tax_product_code": "tax_product_code", "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tags": { "create": [ { "value": "value" } ], "delete": [ { "id": 1 } ] }, "images": { "create": [ { "url": "url", "order": 0 } ], "update": [ { "id": 1, "order": 0 } ], "delete": [ { "id": 1 } ] } }'
Response
{ "id": 1, "bundle_id": 1, "bundle": { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Publish subscription product

POST /products/subscription/{product_id}/publish

Fails with 400 when the product is archived or part of a bundle, when name or slug is missing, when it has no active plans, or when a physical product has a plan without shipping options.

Path parameters

product_idRequiredinteger

Product ID

ReturnsSubscriptionProduct

Subscription product published

curl -X POST https://api.subbly.co/private/v1/products/subscription/{product_id}/publish \ -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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Unpublish subscription product

POST /products/subscription/{product_id}/unpublish

Fails with 400 when the product is archived or part of a bundle.

Path parameters

product_idRequiredinteger

Product ID

ReturnsSubscriptionProduct

Subscription product unpublished

curl -X POST https://api.subbly.co/private/v1/products/subscription/{product_id}/unpublish \ -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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Archive subscription product

POST /products/subscription/{product_id}/archive

Fails with 400 when the product is already archived, is part of a bundle, or still has active subscriptions.

Path parameters

product_idRequiredinteger

Product ID

ReturnsSubscriptionProduct

Subscription product archived

curl -X POST https://api.subbly.co/private/v1/products/subscription/{product_id}/archive \ -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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Sync subscription product metadata

POST /products/subscription/{product_id}/metadata

Attaches and detaches metadata on the product. The product must not be archived and must not belong to a bundle; either case returns 400 (entity_archived, product_in_bundle). Values attached to or detached from a parent product are also applied to all of its active variants.

Path parameters

product_idRequiredinteger

Product ID

Request body

Metadata sync request body

metadataRequiredobject

ReturnsSubscriptionProduct

Subscription product metadata synced

curl -X POST https://api.subbly.co/private/v1/products/subscription/{product_id}/metadata \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "metadata": { "create": [ { "name": "name", "description": "description", "values": [ "values" ] } ], "delete": [ { "attribute_id": 1, "values": [ 1 ] } ] } }'
Response
{ "id": 1, "bundle_id": 1, "bundle": { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "plans": [ { "id": 1, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "setup_fee": null, "pre_order_end_at": "2022-04-01", "shippings": [ {} ], "metadata": [ {} ], "survey": {}, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Create one-time product

POST /products/one_time

Request body

nameRequiredstring
slugRequiredstring

Letters, digits, dashes and underscores only. Must be unique among the shop's products.

gift_cardoptionalinteger

Possible values: 0, 1.

digitaloptionalinteger

Must be omitted when gift_card is 1; gift cards are always digital. Sending both fields returns a validation error.

Possible values: 0, 1.

descriptionoptionalstring | null
delivery_infooptionalstring | null

Must be omitted when digital or gift_card is 1; delivery info is not available for digital products.

gift_card_expirationoptionalinteger | null

Gift card expiration in months. Only allowed when gift_card is 1; sending it for a non-gift-card product returns a validation error.

gifting_enabledoptionalinteger

Must be omitted when digital or gift_card is 1; gifting is not available for digital products. Null is not accepted. Defaults to 0.

Possible values: 0, 1.

collect_shipping_addressoptionalinteger | null

Only digital products (digital or gift_card = 1) may send 0. For physical products the only accepted value is 1. Defaults to 1 for physical products and 0 for digital ones.

Possible values: 0, 1.

funnel_idoptionalinteger | null
tax_product_codeoptionalstring | null

Only available for US-based shops. Shops in any other country must omit this field entirely.

tagsoptionalobject
imagesoptionalobject | null

ReturnsOneTimeProduct

One-time product created

curl -X POST https://api.subbly.co/private/v1/products/one_time \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "slug": "slug", "gift_card": 0, "digital": 0, "description": "description", "delivery_info": "delivery_info", "gift_card_expiration": 1, "gifting_enabled": 0, "collect_shipping_address": 0, "funnel_id": 1, "tax_product_code": "tax_product_code", "tags": { "create": [ { "value": "value" } ] }, "images": { "create": [ { "url": "url", "order": 0 } ] } }'
Response
{ "id": 1, "bundle_id": 1, "bundle": { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Update one-time product

PUT /products/one_time/{product_id}

Returns 400 when the product is already archived (entity_archived) or belongs to a bundle (product_in_bundle). The id must refer to a one-time product owned by the authenticated shop.

Path parameters

product_idRequiredinteger

Product ID

Request body

nameoptionalstring
slugoptionalstring

Letters, digits, dashes and underscores only. Must be unique among the shop's products (this product excluded).

descriptionoptionalstring | null
delivery_infooptionalstring | null

Must be omitted when the stored product is digital (digital = true in the response).

gift_card_expirationoptionalinteger | null

Gift card expiration in months. Only allowed when the stored product is a gift card (gift_card = true in the response).

gifting_enabledoptionalinteger

Must be omitted when the stored product is digital (digital = true in the response).

Possible values: 0, 1.

collect_shipping_addressoptionalinteger

0 is accepted only when the stored product is digital (digital = true in the response). For physical products the only accepted value is 1.

Possible values: 0, 1.

positionoptionalinteger
funnel_idoptionalinteger | null
tax_product_codeoptionalstring | null

Only available for US-based shops. Shops in any other country must omit this field entirely.

tagsoptionalobject
imagesoptionalobject

ReturnsOneTimeProduct

One-time product updated

curl -X PUT https://api.subbly.co/private/v1/products/one_time/{product_id} \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "name": "name", "slug": "slug", "description": "description", "delivery_info": "delivery_info", "gift_card_expiration": 1, "gifting_enabled": 0, "collect_shipping_address": 0, "position": 1, "funnel_id": 1, "tax_product_code": "tax_product_code", "tags": { "create": [ { "value": "value" } ], "delete": [ { "id": 1 } ] }, "images": { "create": [ { "url": "url", "order": 0 } ], "update": [ { "id": 1, "order": 0 } ], "delete": [ { "id": 1 } ] } }'
Response
{ "id": 1, "bundle_id": 1, "bundle": { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Publish one-time product

POST /products/one_time/{product_id}/publish

Preconditions, each returning 400: the product must have a name and a slug (missing_required_fields), it must have at least one non-archived variant (no_active_children), it must not be archived (entity_archived) and it must not belong to a bundle (product_in_bundle). Gift card products also require the gift_cards feature on the shop.

Path parameters

product_idRequiredinteger

Product ID

ReturnsOneTimeProduct

One-time product published

curl -X POST https://api.subbly.co/private/v1/products/one_time/{product_id}/publish \ -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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Unpublish one-time product

POST /products/one_time/{product_id}/unpublish

Returns 400 when the product is already archived (entity_archived) or belongs to a bundle (product_in_bundle). The id must refer to a one-time product owned by the authenticated shop.

Path parameters

product_idRequiredinteger

Product ID

ReturnsOneTimeProduct

One-time product unpublished

curl -X POST https://api.subbly.co/private/v1/products/one_time/{product_id}/unpublish \ -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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Archive one-time product

POST /products/one_time/{product_id}/archive

Returns 400 when the product is already archived (entity_archived, so archive is not idempotent) or belongs to a bundle (product_in_bundle). The id must refer to a one-time product owned by the authenticated shop.

Path parameters

product_idRequiredinteger

Product ID

ReturnsOneTimeProduct

One-time product archived

curl -X POST https://api.subbly.co/private/v1/products/one_time/{product_id}/archive \ -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", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Sync one-time product metadata

POST /products/one_time/{product_id}/metadata

Attaches and detaches metadata on the product. The product must not be archived and must not belong to a bundle; either case returns 400 (entity_archived, product_in_bundle). Values attached to or detached from a parent product are also applied to all of its active variants.

Path parameters

product_idRequiredinteger

Product ID

Request body

Metadata sync request body

metadataRequiredobject

ReturnsOneTimeProduct

One-time product metadata synced

curl -X POST https://api.subbly.co/private/v1/products/one_time/{product_id}/metadata \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "metadata": { "create": [ { "name": "name", "description": "description", "values": [ "values" ] } ], "delete": [ { "attribute_id": 1, "values": [ 1 ] } ] } }'
Response
{ "id": 1, "bundle_id": 1, "bundle": { "id": 1, "name": "Bundle Name", "slug": "Bundle slug", "digital": false, "delivery_info": "delivery_info", "configurable": true, "images": [ {} ], "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": [ {} ], "prices": [ {} ], "tags": [ "new", "bundle" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "bundle" } ], "setup_fee": 500, "gifting_enabled": false, "pause_enabled": false, "pre_order_end_at": "2024-12-31", "funnel_id": 1, "change_product_collection_id": 1, "collect_shipping_address": true, "published": true, "items_count": 5, "plans_count": 2, "rulesets_count": 1, "metadata": [ {} ], "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", "min_quantity": 1, "max_quantity": 2, "cta_text": "Add to cart", "products": [ {} ], "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://cdn.filestackcontent.com/security=p:<policy>,s:<signature>/resize=w:1000,h:1000,fit:max/output=format:png/quality=v:70/AaBbCcDdEeFf", "order": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ { "id": 1, "name": "Color", "slug": "color-red", "description": "description", "unit": "kg", "data_type": "single_line_string", "preset": true, "multiple": true, "variant": true, "access_level": "storefront", "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, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": {}, "price_scheme": {}, "parent": {}, "product": {}, "metadata": [ {} ], "attributes": [ {} ], "options": [ {} ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "options": [ { "id": 1, "name": "Size", "values": [ "Medium" ] } ] }

Create variant

POST /variants

Creates a variant on a one-time product. The parent product must not be archived. A product is limited to 125 variants. Only one variant without options is allowed per product, so once a product has any variant, further variants must supply options.create (gift card products are exempt).

Request body

product_idRequiredinteger

Parent one-time product ID

nameoptionalstring | null

Required when product is a gift card or when no options are provided.

priceRequiredinteger

Price in cents

descriptionoptionalstring | null
inventory_item_idoptionalinteger | null

Prohibited for gift card products.

optionsoptionalobject | null

Prohibited for gift card products. A product cannot have more than 3 distinct option types in total, counting option types already used by its variants.

ReturnsVariant

Variant object response

curl -X POST https://api.subbly.co/private/v1/variants \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "product_id": 1, "name": "name", "price": 0, "description": "description", "inventory_item_id": 1, "options": { "create": [ { "name": "name", "value": "value" } ] } }'
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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Archive variant

POST /variants/{variant_id}/archive

Archives a one-time product variant. Fails if the variant is already archived, or if it is the parent product's last non-archived variant, because a product must keep at least one active variant.

Path parameters

variant_idRequiredinteger

Variant ID

ReturnsVariant

Variant object response

curl -X POST https://api.subbly.co/private/v1/variants/{variant_id}/archive \ -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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Batch create/update/archive variants

POST /variants/batch

Creates, updates and archives variants of a one-time product in one call. Not available for gift card products, and the product must not be archived. The maxItems: 100 cap applies per list; in addition, the product's variant count after the batch (existing + created - archived) must not exceed 125.

Request body

product_idRequiredinteger
generate_inventoryoptionalboolean

Defaults to false.

inventory_group_idoptionalinteger | null

Must be a non-deleted inventory item group belonging to your shop.

inventory_stock_countoptionalinteger

Defaults to 0.

createoptionalobject[]

Every entry must use the same set of option names, and that set must match the option names already used by the product's existing variants (case-insensitive). A product cannot have more than 3 distinct option types in total. An entry with no options.create must supply name.

updateoptionalobject[]

Within each entry, options.create[].name must already be an option type on the product, since new option types cannot be introduced here, and options.update[].id must be an option that belongs to the product.

archiveoptionalobject[]

Returnsobject

Batch operation result

curl -X POST https://api.subbly.co/private/v1/variants/batch \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "product_id": 1, "generate_inventory": false, "inventory_group_id": 1, "inventory_stock_count": 0, "create": [ { "name": "name", "description": "description", "price": 0, "inventory_item_id": 1, "options": { "create": [ { "name": "name", "value": "value" } ] } } ], "update": [ { "id": 1, "name": "name", "description": "description", "price": 0, "inventory_item_id": 1, "options": { "create": [ { "name": "name", "value": "value" } ], "update": [ { "id": 1, "value": "value" } ] } } ], "archive": [ { "id": 1 } ] }'
Response
{ "create": [ { "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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "update": [ { "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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ], "delete": [ { "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": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "gift_card": false, "gift_card_expiration": null, "funnel_id": 1, "tax_product_code": "tax_product_code", "variants_count": 3, "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, "access_level": "storefront", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "options": [ { "id": 1, "name": "Size", "value": "Medium" } ], "stock_count": 100, "published": true, "inventory_item_id": 1, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" } ] }

Create plan

POST /plans

Request body

product_idRequiredinteger

Parent subscription product ID

frequency_unitRequiredstring

Possible values: day, week, month.

frequency_countRequiredinteger

Minimum 1, but minimum 2 when rebilling_day is set together with frequency_unit=day.

nameoptionalstring | null
priceoptionalinteger

Price in cents

anchor_dateoptionalstring | null

Accepts a date (Y-m-d) or the string "today", which resolves to the current date. Only allowed for non-digital products whose shipment_schedule uses the anchored format (entries with unit_day). Required when a rebilling_day* field is set and frequency_unit=day.

Format: date.

rebilling_dayoptionalinteger

Only the value 1 is accepted. Allowed for non-digital products with frequency_unit=day only. Mutually exclusive with rebilling_day_of_week and rebilling_day_of_month. Do not send null; omit the field instead.

Possible values: 1.

rebilling_day_of_monthoptionalinteger

Mutually exclusive with the other two rebilling_day* fields. Requires a non-digital product and frequency_unit=month, and must agree with anchor_date when one is supplied. Do not send null; omit the field instead.

rebilling_day_of_weekoptionalinteger

Mutually exclusive with the other two rebilling_day* fields. Requires a non-digital product and frequency_unit=week, and must agree with anchor_date when one is supplied. Do not send null; omit the field instead.

cut_off_daysoptionalinteger | null

Only allowed when shipment_schedule uses the anchored format (entries with unit_day). Required when a rebilling_day* field is set.

cut_off_timeoptionalstring | null

Format HH:mm. Defaults to "23:59" when cut_off_days is sent without it. Rejected for digital products, for non-anchored shipment schedules, and when the shop's subscription plan does not include the cut-off-time feature.

charge_immediatelyoptionalinteger

Prohibited for digital products. Must be 1 for ad-hoc plans (plans with no rebilling_day, rebilling_day_of_month or rebilling_day_of_week). Required whenever ship_immediately is sent. Defaults to 1 when omitted.

Possible values: 0, 1.

ship_immediatelyoptionalinteger

Required whenever charge_immediately is sent, and cannot be 1 while charge_immediately is 0. Defaults to 0 when omitted.

Possible values: 0, 1.

buffer_daysoptionalinteger | null
trial_priceoptionalinteger | null

Prohibited when the parent product has a pre-order end date, and prohibited for anchored plans (plans that set any rebilling_day* field).

trial_length_daysoptionalinteger | null

Prohibited when the parent product has a pre-order end date, and prohibited for anchored plans (plans that set any rebilling_day* field).

trial_single_orderoptionalinteger

Prohibited for digital products. Setting it to 1 also requires an ad-hoc plan with trial_length_days set and no pre-order end date on the parent product.

Possible values: 0, 1.

commitment_billing_countoptionalinteger | null

Only available when the shop's subscription plan includes commitment billing; otherwise the request is rejected.

charges_limitoptionalinteger | null
shipment_scheduleoptionalobject[]

Required when the parent product is not digital, and prohibited when it is digital. All entries must use the same format: either every entry is buffered (add_unit + add_count) or every entry is anchored (unit_day + unit_offset). Mixing formats is rejected.

survey_idoptionalinteger | null

ID of a survey belonging to the authenticated shop.

ReturnsPlan

Plan object response

curl -X POST https://api.subbly.co/private/v1/plans \ -H 'X-API-KEY: <api-key>' \ -H 'Content-Type: application/json' \ -d '{ "product_id": 1, "frequency_unit": "day", "frequency_count": 1, "name": "name", "price": 0, "anchor_date": "2026-01-15", "rebilling_day": 1, "rebilling_day_of_month": 1, "rebilling_day_of_week": 1, "cut_off_days": 0, "cut_off_time": "23:59", "charge_immediately": 0, "ship_immediately": 0, "buffer_days": 0, "trial_price": 0, "trial_length_days": 0, "trial_single_order": 0, "commitment_billing_count": 1, "charges_limit": 1, "shipment_schedule": [ { "add_unit": "day", "add_count": 1, "unit_day": 1, "unit_offset": 1 } ], "survey_id": 1 }'
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", "pricing_name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "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", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "survey": { "id": 1, "title": "What is your favorite color?", "questions": [ {} ], "single_step": true, "multiply_price_by_shipment_number": true, "appearance_type": "before_cart", "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }

Archive plan

POST /plans/{plan_id}/archive

Archive a subscription product plan. The plan must belong to a subscription product that is not part of a bundle (use POST /bundles/{bundle_id}/plans/{plan_id}/archive for those), must not already be archived, must not be the parent product's last active plan, and must have no active subscriptions attached.

Path parameters

plan_idRequiredinteger

Plan ID

ReturnsPlan

Plan object response

curl -X POST https://api.subbly.co/private/v1/plans/{plan_id}/archive \ -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", "pricing_name": "Yellow T-shirt with pokemon print", "description": "Yellow T-shirt with pokemon print", "price": 799, "price_schema": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "price_scheme": { "id": 1, "type": "flat_price", "amount": 799, "ranges": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "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": [ {} ], "tags": [ "new", "featured" ], "tags_meta": [ { "id": 1, "value": "new" }, { "id": 2, "value": "featured" } ], "published": true, "metadata": [ {} ], "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00", "setup_fee": 1, "pre_order_end_at": "2024-06-01", "pause_enabled": true, "inventory_item_id": 1, "funnel_id": 1, "change_product_collection_id": 1, "tax_product_code": "tax_product_code", "plans_count": 3, "pricings": [ {} ], "plans": [ {} ] }, "frequency_unit": "month", "frequency_count": 1, "anchored": true, "anchor_date": "2022-04-01", "rebilling_day": 1, "rebilling_day_of_week": 1, "rebilling_day_of_month": 1, "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": "23:59", "cut_off_days": 0, "buffer_days": 0, "stock_count": 100, "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", "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, "access_level": "storefront", "save_behavior": "customer", "editable": true, "values": [ {} ] } ], "survey": { "id": 1, "title": "What is your favorite color?", "questions": [ {} ], "single_step": true, "multiply_price_by_shipment_number": true, "appearance_type": "before_cart", "customizations": {}, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }, "commitment_billing_count": 0, "charges_limit": 0, "plan_hash": "a1b2c3d4", "published": true, "created_at": "2022-04-01 00:00:00", "updated_at": "2022-04-01 00:00:00" }
paginationobject
data(OneTimeProduct | SubscriptionProduct)[]
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentOneTimeProduct | null

Expandable link to the parent product.

productOneTimeProduct | null

Expandable link to the parent product (alias for parent).

metadataEntityMetadata[] | null
attributesEntityMetadata[]Deprecated
optionsProductOption[]
stock_countinteger | null
publishedboolean
inventory_item_idinteger | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

createoptionalobject[]

Each name must already be an option type on the parent product; new option types cannot be introduced here.

updateoptionalobject[]

Each id must be an option that already belongs to this variant.

idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentOneTimeProduct | null

Expandable link to the parent product.

productOneTimeProduct | null

Expandable link to the parent product (alias for parent).

metadataEntityMetadata[] | null
attributesEntityMetadata[]Deprecated
optionsProductOption[]
stock_countinteger | null
publishedboolean
inventory_item_idinteger | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
pricing_namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentSubscriptionProduct | null

Expandable link to the parent product.

productSubscriptionProduct | null

Expandable link to the parent product (alias for parent).

frequency_unitstring

Possible values: day, week, month.

frequency_countinteger
anchoredboolean
anchor_datestring | null

Format: date.

rebilling_dayinteger | null
rebilling_day_of_weekinteger | null
rebilling_day_of_monthinteger | null
trial_priceinteger | null
trial_lengthinteger | null
trial_single_orderboolean
charge_immediatelyboolean
ship_immediatelyboolean
rebilling_start_atstring | null

Format: date.

cut_off_atstring | null

Format: date.

cut_off_timestring | null

Time in HH:mm format

cut_off_daysinteger | null
buffer_daysinteger | null
stock_countinteger | null
setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

shippingsProductShipping[]
metadataEntityMetadata[] | null
surveySurvey | null
commitment_billing_countinteger | null
charges_limitinteger | null
plan_hashstring | null

Hash identifying the plan's billing and shipping configuration.

publishedboolean
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

add_unitoptionalstring | null

Possible values: day, week, month.

add_countoptionalinteger | null
unit_dayoptionalinteger | null
unit_offsetoptionalinteger | null
idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
pricing_namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentSubscriptionProduct | null

Expandable link to the parent product.

productSubscriptionProduct | null

Expandable link to the parent product (alias for parent).

frequency_unitstring

Possible values: day, week, month.

frequency_countinteger
anchoredboolean
anchor_datestring | null

Format: date.

rebilling_dayinteger | null
rebilling_day_of_weekinteger | null
rebilling_day_of_monthinteger | null
trial_priceinteger | null
trial_lengthinteger | null
trial_single_orderboolean
charge_immediatelyboolean
ship_immediatelyboolean
rebilling_start_atstring | null

Format: date.

cut_off_atstring | null

Format: date.

cut_off_timestring | null

Time in HH:mm format

cut_off_daysinteger | null
buffer_daysinteger | null
stock_countinteger | null
setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

shippingsProductShipping[]
metadataEntityMetadata[] | null
surveySurvey | null
commitment_billing_countinteger | null
charges_limitinteger | null
plan_hashstring | null

Hash identifying the plan's billing and shipping configuration.

publishedboolean
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

createoptionalobject[]
createoptionalobject[]
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

createoptionalobject[]
deleteoptionalobject[]
createoptionalobject[]
updateoptionalobject[]
deleteoptionalobject[]
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

createoptionalobject[] | null
deleteoptionalobject[] | null
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

pause_enabledboolean
inventory_item_idinteger | null
funnel_idinteger | null
change_product_collection_idinteger | null

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

tax_product_codestring | null
plans_countinteger
pricingsPlan[] | nullDeprecated

Expandable list of pricings representing unique subscription plans. Deprecated - use 'plans' instead.

plansPlan[] | null

Expandable list of plans representing unique subscription plans.

createoptionalobject[]
createoptionalobject[]
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

createoptionalobject[]
deleteoptionalobject[]
createoptionalobject[]
updateoptionalobject[]
deleteoptionalobject[]
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

createoptionalobject[] | null
deleteoptionalobject[] | null
idinteger
bundle_idinteger | null
bundleBundle | null

Expandable link to the bundle.

bundle_ruleset_idinteger | null
bundle_rulesetBundleRuleset | null

Expandable link to the bundle ruleset.

slugstring
typestring

Possible values: one_time, subscription.

namestring
descriptionstring | null
delivery_infostring | null
collect_shipping_addressboolean
gifting_enabledboolean
digitalboolean
imagesProductImage[]
tagsstring[]
tags_metaobject[]
publishedboolean
metadataEntityMetadata[] | null

Expandable list of metadata for the product.

created_atstring

Format: date-time.

updated_atstring

Format: date-time.

gift_cardboolean
gift_card_expirationinteger | null
funnel_idinteger | null
tax_product_codestring | null
variants_countinteger
variantsVariant[] | null

Expandable list of variants representing unique variations of the product. Each variant is a combination of one or more options. For example, Size and Color.

optionsProductOptionGroup[] | null

List of all available options for this product.

createoptionalobject[]

If the product already has variants, the set of option names here must exactly match the option names those variants use (case-insensitive), with no extra and no missing option types.

idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentOneTimeProduct | null

Expandable link to the parent product.

productOneTimeProduct | null

Expandable link to the parent product (alias for parent).

metadataEntityMetadata[] | null
attributesEntityMetadata[]Deprecated
optionsProductOption[]
stock_countinteger | null
publishedboolean
inventory_item_idinteger | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentOneTimeProduct | null

Expandable link to the parent product.

productOneTimeProduct | null

Expandable link to the parent product (alias for parent).

metadataEntityMetadata[] | null
attributesEntityMetadata[]Deprecated
optionsProductOption[]
stock_countinteger | null
publishedboolean
inventory_item_idinteger | null
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

nameoptionalstring | null
descriptionoptionalstring | null
priceRequiredinteger
inventory_item_idoptionalinteger | null

Must be a non-archived inventory item belonging to your shop.

optionsRequiredobject
idRequiredinteger

Must be a variant of the product given in product_id.

nameoptionalstring | null
descriptionoptionalstring | null
priceoptionalinteger | null
inventory_item_idoptionalinteger | null

Must be a non-archived inventory item belonging to your shop.

optionsoptionalobject | null
idRequiredinteger

Must be a variant of the product given in product_id.

createVariant[]
updateVariant[]
deleteVariant[]
add_unitoptionalstring

Possible values: day, week, month.

add_countoptionalinteger
unit_dayoptionalinteger
unit_offsetoptionalinteger
idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
pricing_namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentSubscriptionProduct | null

Expandable link to the parent product.

productSubscriptionProduct | null

Expandable link to the parent product (alias for parent).

frequency_unitstring

Possible values: day, week, month.

frequency_countinteger
anchoredboolean
anchor_datestring | null

Format: date.

rebilling_dayinteger | null
rebilling_day_of_weekinteger | null
rebilling_day_of_monthinteger | null
trial_priceinteger | null
trial_lengthinteger | null
trial_single_orderboolean
charge_immediatelyboolean
ship_immediatelyboolean
rebilling_start_atstring | null

Format: date.

cut_off_atstring | null

Format: date.

cut_off_timestring | null

Time in HH:mm format

cut_off_daysinteger | null
buffer_daysinteger | null
stock_countinteger | null
setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

shippingsProductShipping[]
metadataEntityMetadata[] | null
surveySurvey | null
commitment_billing_countinteger | null
charges_limitinteger | null
plan_hashstring | null

Hash identifying the plan's billing and shipping configuration.

publishedboolean
created_atstring

Format: date-time.

updated_atstring

Format: date-time.

idinteger
bundle_plan_idinteger | null
bundle_planBundlePlan
namestring
pricing_namestring
descriptionstring | null
priceinteger
price_schemaPriceSchema
price_schemePriceSchemaDeprecated

Deprecated. Use price_schema instead.

parentSubscriptionProduct | null

Expandable link to the parent product.

productSubscriptionProduct | null

Expandable link to the parent product (alias for parent).

frequency_unitstring

Possible values: day, week, month.

frequency_countinteger
anchoredboolean
anchor_datestring | null

Format: date.

rebilling_dayinteger | null
rebilling_day_of_weekinteger | null
rebilling_day_of_monthinteger | null
trial_priceinteger | null
trial_lengthinteger | null
trial_single_orderboolean
charge_immediatelyboolean
ship_immediatelyboolean
rebilling_start_atstring | null

Format: date.

cut_off_atstring | null

Format: date.

cut_off_timestring | null

Time in HH:mm format

cut_off_daysinteger | null
buffer_daysinteger | null
stock_countinteger | null
setup_feeinteger | null
pre_order_end_atstring | null

Format: date.

shippingsProductShipping[]
metadataEntityMetadata[] | null
surveySurvey | null
commitment_billing_countinteger | null
charges_limitinteger | null
plan_hashstring | null

Hash identifying the plan's billing and shipping configuration.

publishedboolean
created_atstring

Format: date-time.

updated_atstring

Format: date-time.