Bundles
Read bundles, their items and groups, and price the items a customer picked.
Every method here takes an optional headers argument to price one call in
another currency, and every amount is a whole number in the minor unit; see
Currency and
Amounts and dates.
A typical flow: load the bundle for its plans and rules, loadItems for what
the customer can pick, quote to show the price, then subbly.cart.addItem to
buy it.
Gets a paginated list of the shop's bundles.
Method parameters
paramsRequiredBundleListParamsPaging and filters. Pass {} for the defaults โ the argument is required by
position even though every field inside it is optional.
headersoptionalBundleRequestHeadersExtra request headers.
ReturnsPromise<BundleListResponse>
One page of bundles.
List the bundles
List the configurable bundles with their plans
Gets one bundle with its plans, prices, discounts, rulesets, filters and preferences โ everything the picker needs except the items themselves.
Method parameters
bundleIdRequirednumberID of the bundle.
paramsoptionalBundleResourceParamsRelations to include.
headersoptionalBundleRequestHeadersExtra request headers.
x-currencyoptionalstringCurrency for the prices in the response.
ReturnsPromise<Bundle>
The bundle.
Load a bundle
Gets a paginated, filterable list of the products a customer can pick for the
bundle. Send the picks to quote and to subbly.cart.addItem as
{ productId, quantity }.
Method parameters
bundleIdRequirednumberID of the bundle.
paramsoptionalBundleItemsParamsPaging, filters and relations.
headersoptionalBundleRequestHeadersExtra request headers.
x-currencyoptionalstringCurrency for the prices in the response.
ReturnsPromise<BundleItemsResponse>
One page of bundle items.
Load the bundle items
Filter the items by an attribute
Gets the item groups of a bundle. A group gathers the variants of one product and sets its own minimum and maximum quantity, so a customer can be asked for, say, two coffees and one tea.
Method parameters
bundleIdRequirednumberID of the bundle.
paramsoptionalBundleGroupsParamsPaging and relations.
headersoptionalBundleRequestHeadersExtra request headers.
x-currencyoptionalstringCurrency for the prices in the response.
ReturnsPromise<BundleGroupsResponse>
One page of groups.
Load the bundle groups
Prices a bundle for the exact items and preferences a customer picked, before it goes in the cart. Use it to show a running total in the picker.
Method parameters
bundleIdRequirednumberID of the bundle.
payloadRequiredBundleQuotePayloadWhat the customer picked. items and preferences are both required; send
an empty array when the bundle has no preferences.
paramsoptionalBundleQuoteParamsRelations to include.
headersoptionalBundleRequestHeadersExtra request headers.
x-currencyoptionalstringCurrency for the prices in the response.
ReturnsPromise<BundleQuote>
The priced bundle, with a line for every picked item.
Quote a bundle