Order API
TypeCollection2
Represents a collection of products in the ecommerce system.
Any grouping of products can (and probably should) be considered a collection. These include:
- Explicitly defined collections
- Categories and subcategories
- Automatically computed collections
| Kind | Type |
|---|---|
| Used in | EstimateAccrual1, UpdateOrders4, UpdateProducts3 |
Properties
-
idstring requiredID of the product collection in the ecommerce system
In case of Shopify, this is just a number without
gid://shopify/Collection/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 collection in the ecommerce system
This is a highly optional field only relevant to a minority of ecommerce systems, those that sometimes need to identify collections by slug.
-
titlestring required when creating/updatingA user-visible name of the collection
Should be specified in all cases, except when you're merely referencing an existing collection by ID (in which case you'll only specify a single field,
id). -
product_idsarray of string optionalProduct IDs belonging to this collection.
Lists all products that belong to this collection by their external IDs. Products that don't exist will be created with minimal data.
This field preserves existing product associations with other collections - it only updates the membership for this specific collection.
This is the preferred way to specify product-collection associations when you already have product data.
-
Products belonging to this collection with their full data.
You can either pass product IDs only (i.e. an array of objects with a single
idproperty) to reference existing products, or full product objects to create/update the products as well.This field is useful when you want to create/update products and assign them to collections in a single call.
-
deletedboolean optionalSet to true to delete this collection 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.