Order API
Product2
Represents a single product available on the store.
Properties
id
stringrequiredID 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.Example:
"P123"
Example:
"P124"
Example:
"P125"
Example:
"P126"
slug
stringoptionalsecondary, 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.
Example:
"supershoe"
title
stringrequired 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
).Example:
"Supershoe"
Example:
"Megashoe"
Example:
"Summer Special"
Example:
"Holiday Bundle"
inactive
booleanoptionalWhether 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.
tags
array of stringoptionalArbitrary 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
id
field 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_ids
instead if you just want to reference existing collections by ID.Example:
[{"id":"HOLIDAY2023","title":"Holiday Collection"},{"id":"FEATURED"}]
collection_ids
array of stringoptionalCollection 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.
Example:
["C42","C1"]
Example:
["C42"]
Example:
["SUMMER2023","SALE"]
A list of variants the product has
Example:
[{"id":"9876","title":"Black"},{"id":"9877","title":"Blue"}]
deleted
booleanoptionalSet to true to delete this product in our system
Bubblehouse does not have deletion APIs for most objects; instead, pass
deleted: true
when updating an object. Note that we won't delete the data immediately, in case there are other objects referencing this one.
Examples
Reference by ID
{ "id": "P123" }
Reference by Slug
{ "slug": "supershoe" }
Typical
{ "id": "P123", "title": "Supershoe", "collection_ids": [ "C42", "C1" ] }
Full
{ "id": "P123", "title": "Supershoe", "collection_ids": [ "C42", "C1" ], "variants": [ { "id": "9876", "title": "Black" }, { "id": "9877", "title": "Blue" } ] }
Product with New Collections
{ "id": "P125", "title": "Summer Special", "collection_ids": [ "SUMMER2023", "SALE" ] }
Product with Collection Objects
{ "id": "P126", "title": "Holiday Bundle", "collections": [ { "id": "HOLIDAY2023", "title": "Holiday Collection" }, { "id": "FEATURED" } ] }