Buddi SEO Documentation
Home
Return to Buddi.io
Home
Return to Buddi.io
  • Getting Started

    • Installation Guide
  • Functions

    • Store Selection
    • Single Product
    • All Products
    • Products by Category
    • Products by Categories
    • Featured Promotions
    • Collections
    • Store Info
    • Add to Cart
    • Content Management System
  • Modules

    • Shopping Cart Module
    • Customer Profile
  • Advanced Functions

    • Dynamic object syncing
    • Cart
    • Customer
    • Login Customer
    • Logout Customer
    • Register Customer
    • Update Customer
  • Events
  • FAQ
  • Exceptions Handling
  • Caching
  • Deploying
  • Example Templates

Products by Categories

These methods are used to return a list of products with a given category or multiple categories,

getProductsByCategories

The method returns the retailer products filtered by the list of passed categories. We cache the retailer products on the backend for 5 mins and clear the cache in some cases(when promotions, inventory get updated, etc).

NOTE: you can pass category_slug(from product request) to the method


Params:

categories - an array of the categories to filter


Example:

Buddi.getProductsByCategories(['vape']);
Buddi.getProductsByCategories(['flower', 'pre-roll'], true);

Events: products:loaded, products:loading-error

All Categories

Flower Pre-Roll Beverage Capsules Concentrate Disposable Vape Edible Infused-Flower Infused-Pre-Roll Milled-Flower Oil Plants Seeds Spray Topical Vape


Returns:

(Same as the Buddi.getProducts() method)

[ShortProduct,ShortProduct, ...]

ShortProduct Format

{
    id: 1,
    name: 'Pink Kush',
    brand: {id: 1, name: 'Canna Farms'}, //null if the brand doesn't exist
    images: ['https://buddi.io/pink-kush.png'],	//returns a single image
    strain: 'Blend',
    category: 'flower',
    category_slug: 'flower',	//category slug for URL
    subcategory: null,
    overall_terpene_percent: 20,
    slug: 'canna-farms-pink-kush-flower-1',
    terpenes: [{title: 'Alpha-Bisabolol', percent: 1}, ...],
    province: 'BC',
    options: [ProductOption, ProductOption, ...]
}

ProductOption Format

{
    ri_id: 123,	//retailer inventory ID, use it to add the product option to cart
    qty_in_pack: null,
    pack_item_weight: null,
    display_title: '1.5g',
    discounted_price: null, //discounted price - if exists
    price: 123,
    upc: '675136000165',
    variant: null,
    weight: 1.5,
    in_stock: true,
    special_message: {txt: 'Hello there', bg_color: '#fff', txt_color: '#000'},	//null - if doesn't exist
    cannabinoids: [{label: 'thc', value: '1.00%'}...]
}

getProductsByCategory

The method returns the retailer products filtered by the passed category. We cache the retailer products on the backend for 5 mins and clear the cache in some cases(when promotions, inventory get updated, etc).

NOTE: you can pass category_slug(from product request) to the method


Params:

cateogry - category to filter


Example:

Buddi.getProductsByCategory('vape');
Buddi.getProductsByCategory('flower');
Buddi.getProductsByCategory('pre-roll');

Events: products:loaded, products:loading-error


Returns:

(Same as the Buddi.getProducts() method)

[ShortProduct,ShortProduct, ...]

ShortProduct Format

{
    id: 1,
    name: 'Pink Kush',
    brand: {id: 1, name: 'Canna Farms'}, //null if the brand doesn't exist
    images: ['https://buddi.io/pink-kush.png'],	//returns a single image
    strain: 'Blend',
    category: 'flower',
    category_slug: 'flower',	//category slug for URL
    subcategory: null,
    overall_terpene_percent: 20,
    slug: 'canna-farms-pink-kush-flower-1',
    terpenes: [{title: 'Alpha-Bisabolol', percent: 1}, ...],
    province: 'BC',
    options: [ProductOption, ProductOption, ...]
}

ProductOption Format

{
    ri_id: 123,	//retailer inventory ID, use it to add the product option to cart
    qty_in_pack: null,
    pack_item_weight: null,
    display_title: '1.5g',
    discounted_price: null, //discounted price - if exists
    price: 123,
    upc: '675136000165',
    variant: null,
    weight: 1.5,
    in_stock: true,
    special_message: {txt: 'Hello there', bg_color: '#fff', txt_color: '#000'},	//null - if doesn't exist
    cannabinoids: [{label: 'thc', value: '1.00%'}...]
}
All Categories

Flower Pre-Roll Beverage Capsules Concentrate Disposable Vape Edible Infused-Flower Infused-Pre-Roll Milled-Flower Oil Plants Seeds Spray Topical Vape

Last Updated: 10/15/25, 9:24 PM
Contributors: jesseleejohnston
Prev
Products by Category
Next
Featured Promotions