Order API
TypeProduct2
Represents a single product available on the store.
| Kind | Type |
|---|---|
| Used in | EstimateAccrual1, UpdateOrders4, UpdateProducts3 |
Properties
-
idstring requiredID of the product in the ecommerce system
This is the primary identifier used by the ecommerce system.
In case of Shopify, this is just a number without
gid://shopify/Product/prefix. If your system gives similar fixed prefixes to products, we recommend that you strip them as well. -
slugstring optionalsecondary, URL-friendly identifier of the product in the ecommerce system
This is a highly optional field only relevant to a minority of ecommerce systems, those that sometimes need to identify products by slug.
-
skustring optionalStock Keeping Unit identifier for inventory management
Providing SKUs is optional for most loyalty programs. If you only have one identifier, send it as an
id.The SKU is a unique identifier typically used by merchants to track inventory and manage product catalogs. Unlike the product ID, which is system-assigned, SKUs are merchant-defined codes.
When updating products, an empty string preserves the existing SKU. Pass a non-empty string to update it.
-
titlestring required when creating/updatingA user-visible name of the product
Should be specified in all cases, except when you're merely referencing an existing product by ID (in which case you'll only specify a single field,
id). -
descriptionstring optionalA user-visible description of the product
An optional field for those cases when just the title is not enough for your specific loyalty program.
When updating products, an empty string preserves the existing description. Pass a non-empty string to update it.
-
inactiveboolean optionalWhether the product is unavailable
Set to true if the product is no longer (or not yet) present on the store and should not be selectable anywhere.
-
tagsarray of string optionalArbitrary tags to associate with the product
Can be used to set up conditions or discounts. This is a weird partially supported feature, and you should prefer collections in most cases.
-
Time when the product has been added to the ecommerce system
Can be used to set up conditions or discounts.
-
Time when the product has been last updated in the ecommerce system
Bubblehouse may use the last update time when pulling product updates. Irrelevant for most API users, but still good to specify if known.
-
Collections this product belongs to
You can pass collection objects to both associate the product with collections and create/update those collections.
Pass objects with just
idfield to reference existing collections, or include other fields to update them.This field replaces ALL collection associations for this product - any collections not listed will have this product removed from them.
Use
collection_idsinstead if you just want to reference existing collections by ID. -
collection_idsarray of string optionalCollection IDs this product belongs to
Lists all collections this product should belong to by their external IDs. Collections that don't exist will be created with minimal data.
This field replaces ALL collection associations for this product - any collections not listed will have this product removed from them.
This is the preferred way to manage product-collection associations when you already have the collection IDs.
-
A list of variants the product has
You do not have to provide variants; a default variant will be created automatically if the product has no variants.
-
Market-specific product content for multi-region stores
Allows specifying different titles, descriptions, and alternate titles for different markets.
Most loyalty programs do not need to send this information, because normally Bubblehouse does not display product or variant titles to the customers.
When updating products:
null(or omitted) preserves all existing localizations- Empty array
[]clears all localizations - Non-empty array replaces the full set of localizations - any markets not included will be removed
Within each localization, empty/omitted fields preserve existing values, enabling partial updates.
-
deletedboolean optionalSet to true to delete this product in our system
Bubblehouse does not have deletion APIs for most objects; instead, pass
deleted: truewhen updating an object. Note that we won't delete the data immediately, in case there are other objects referencing this one.