Order API
TypeProductVariant2
Represents a particular product variant (color / size / etc) in the ecommerce system.
The assumption is that product variants are what actually gets added to the cart when shopping.
| Kind | Type |
|---|---|
| Used in | EstimateAccrual1, ListProducts1, UpdateOrders4, UpdateProducts3 |
Properties
-
idstring requiredID of the product variant in the ecommerce system
In case of Shopify, this is just a number without
gid://shopify/ProductVariant/prefix. If your system gives similar fixed prefixes to products, we recommend that you strip them as well. -
titlestring required when creating/updatingA user-visible name of the variant
Should be specified in all cases, except when you're merely referencing an existing variant by ID (in which case you'll only specify a single field,
id). -
descriptionstring optionalA user-visible description of the variant
An optional field for those cases when just the title is not enough for your specific loyalty program.
When updating variants, an empty string preserves the existing description. Pass a non-empty string to update it.
-
skustring optionalStock Keeping Unit identifier for this variant
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 at the variant level. Variants often have different SKUs for each size, color, or other attribute combination.
When updating variants, an empty string preserves the existing SKU. Pass a non-empty string to update it.
-
The price of this variant of the product
If the price is zero, you need to set
price_knowntotruefor it to be accepted. -
price_knownboolean optionalA flag required to accept a zero price
-
in_stocktristate optionalWhether this variant is currently in stock
Accepts three values:
true(in stock),false(out of stock), ornull(unknown/not specified).When updating, omitting this field or passing
nullpreserves the existing value. Passtrueorfalseto explicitly set the stock status.When reading products, a
nullvalue indicates that stock information has never been provided for this variant. -
Market-specific variant 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 variants:
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 variant 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.