Skip to main content

Bundle Selections

Methods to work with Recharge bundle selections.

listBundleSelections v1.0.0 read subscriptions Types

Get a paginated list of bundle selections for the user.

import { listBundleSelections } from '@rechargeapps/storefront-client';
await listBundleSelections(session, {
limit: 25,
sort_by: 'id-asc',
});

getBundleSelection v1.0.0 read subscriptions Types

Get a bundle selection by id.

import { getBundleSelection } from '@rechargeapps/storefront-client';
await getBundleSelection(session, 123);

createBundleSelection v1.0.0 write subscriptions Types

Create a new bundle selection.

import { createBundleSelection } from '@rechargeapps/storefront-client';
await createBundleSelection(session, {
purchase_item_id: 106841871,
items: [
{
collection_id: '6948805869631',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 1,
},
{
collection_id: '6948806688831',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 2,
},
],
});

updateBundleSelection v1.0.0 write subscriptions Types

Update an existing bundle selection.

import { updateBundleSelection } from '@rechargeapps/storefront-client';
await updateBundleSelection(session, 123, {
purchase_item_id: 106841871,
items: [
{
collection_id: '6948805869631',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 2,
},
{
collection_id: '6948806688831',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 1,
},
],
});

deleteBundleSelection v1.0.0 write subscriptions Types

Delete a bundle selection.

import { deleteBundleSelection } from '@rechargeapps/storefront-client';
await deleteBundleSelection(session, 123);