Products

A product is one exact good, service, SKU or entitlement you sell. Variants, such as a red, large T-shirt, are separate products. Its prices set what it costs.

The Product object

Name
object
Type
"product",
Description
The object's type.
Name
id
Type
string,
Description
Unique identifier for the object.
Name
live
Type
boolean,
Description
true if the object is live, or false if it's in a sandbox.
Name
created_at
Type
integer,
Description
When the object was created, in milliseconds since the Unix epoch.
Name
active
Type
boolean,
Description
Whether the product can be used for new purchases.
Name
attributes
Type
object,
Description
The attributes that distinguish this item, such as its color or size.
Name
default_price
Type
string or Price or null,
Description
Expandable. The price the dashboard shows for this product. The first active price added becomes the default.
Name
deleted
Type
boolean,
Description
Whether the product has been deleted.
Name
description
Type
string or null,
Description
The product's description.
Name
images
Type
array of Files or null,
Description
Images of this product.
Name
metadata
Type
object,
Description
Your own key-value data on the object.
Name
name
Type
string,
Description
The product's name.
Name
prices
Type
array of Prices or null or null,
Description
Expandable. The prices available for this product.
Name
sku
Type
string or null,
Description
The product's stock keeping unit (SKU).
Name
source
Type
object or null,
Description
The Shopify product variant this product syncs from. While the store is connected, only the product's metadata can be updated.
Properties
Name
updated_at
Type
integer,
Description
When the object was last updated, in milliseconds since the Unix epoch.

The Product object

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Classic T-shirt",
  "description": "Heavyweight cotton",
  "sku": "TS-RED-L",
  "attributes": {
    "Color": "Red",
    "Size": "Large"
  },
  "active": true,
  "source": {
    "type": "shopify",
    "external_id": "gid://shopify/ProductVariant/44012345678901",
    "parent_external_id": "gid://shopify/Product/8012345678901",
    "store_domain": "acme-apparel.myshopify.com",
    "connected": true
  },
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

Create a product

Create a product.

Required parameters

Name
name
Type
string,
Description
The product's name.

Optional parameters

Name
expand
Type
object,
Description
Related objects to expand in the response.
Properties
Name
description
Type
string or null,
Description
The product's description.
Name
sku
Type
string or null,
Description
The product's stock keeping unit (SKU).
Name
attributes
Type
object,
Description
The attributes that distinguish this item, such as its color or size.
Name
active
Type
boolean or null,
Description
Whether the product can be used for new purchases.
Name
images
Type
array of string or null,
Description
The IDs of product_image files to show for the product.
Name
metadata
Type
object or null,
Description
Your own key-value data on the object.

Returns

Returns the product object.

Create a product

const product = await bias.products.create({
  name: "Cosmos",
  description: "Light roast coffee beans",
  sku: "COSMOS-12OZ",
  attributes: {
    Size: "12 oz"
  }
});

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Classic T-shirt",
  "description": "Heavyweight cotton",
  "sku": "TS-RED-L",
  "attributes": {
    "Color": "Red",
    "Size": "Large"
  },
  "active": true,
  "source": {
    "type": "shopify",
    "external_id": "gid://shopify/ProductVariant/44012345678901",
    "parent_external_id": "gid://shopify/Product/8012345678901",
    "store_domain": "acme-apparel.myshopify.com",
    "connected": true
  },
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

Get a product

Retrieve a product by its ID.

Required parameters

Name
id
Type
string,
Description
The ID of the product to retrieve.

Optional parameters

Name
expand
Type
object,
Description
Related objects to expand in the response.
Properties

Returns

Returns the product object.

Retrieve a product

const product = await bias.products.get("id");

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Classic T-shirt",
  "description": "Heavyweight cotton",
  "sku": "TS-RED-L",
  "attributes": {
    "Color": "Red",
    "Size": "Large"
  },
  "active": true,
  "source": {
    "type": "shopify",
    "external_id": "gid://shopify/ProductVariant/44012345678901",
    "parent_external_id": "gid://shopify/Product/8012345678901",
    "store_domain": "acme-apparel.myshopify.com",
    "connected": true
  },
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

Update a product

Updates change a product’s details, images or default_price. With active: false, the product can’t be added to checkout sessions or subscriptions, and existing subscriptions keep billing it.

Required parameters

Name
id
Type
string,

Optional parameters

Name
expand
Type
object,
Description
Related objects to expand in the response.
Properties
Name
name
Type
string,
Description
The product's name.
Name
description
Type
string or null,
Description
The product's description.
Name
sku
Type
string or null,
Description
The product's stock keeping unit (SKU).
Name
attributes
Type
object,
Description
The product's attributes, replacing the existing ones.
Name
active
Type
boolean,
Description
Whether the product can be used for new purchases.
Name
default_price
Type
string or null,
Description
The ID of one of the product's active prices to make its default_price.
Name
images
Type
array of string or null,
Description
The IDs of product_image files to show for the product.
Name
metadata
Type
object or null,
Description
Your own key-value data on the object.

Returns

Returns the updated product object.

Update a product

const product = await bias.products.update("id", {
  name: "Summer 2026 Cotton Tee",
  active: false
});

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Classic T-shirt",
  "description": "Heavyweight cotton",
  "sku": "TS-RED-L",
  "attributes": {
    "Color": "Red",
    "Size": "Large"
  },
  "active": true,
  "source": {
    "type": "shopify",
    "external_id": "gid://shopify/ProductVariant/44012345678901",
    "parent_external_id": "gid://shopify/Product/8012345678901",
    "store_domain": "acme-apparel.myshopify.com",
    "connected": true
  },
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

List all products

Retrieve a paginated list of products, most recently created first.

Optional parameters

Name
expand
Type
object,
Description
Related objects to expand in the response.
Properties
Name
ending_before
Type
string,
Description
The ID of the object to list before, for pagination.
Name
starting_after
Type
string,
Description
The ID of the object to list after, for pagination.
Name
limit
Type
integer, at least 1, at most 1000, default is 50
Description
The maximum number of objects to return, from 1 to 1000. Defaults to 50.
Name
filters
Type
object, object, or object,
Description
Filters for the list, combined with and and or.
Properties

Returns

Returns a list of product objects.

List all products

const product = await bias.products.list();

Response example

{
  "object": "list",
  "items": [
    {
      "object": "product",
      "id": "prod_KDCnId9DMZSOA9MSaut4Q",
      "live": false,
      "created_at": 1750000000000,
      "updated_at": 1750000000000,
      "deleted": false,
      "name": "Classic T-shirt",
      "description": "Heavyweight cotton",
      "sku": "TS-RED-L",
      "attributes": {
        "Color": "Red",
        "Size": "Large"
      },
      "active": true,
      "source": {
        "type": "shopify",
        "external_id": "gid://shopify/ProductVariant/44012345678901",
        "parent_external_id": "gid://shopify/Product/8012345678901",
        "store_domain": "acme-apparel.myshopify.com",
        "connected": true
      },
      "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
      "prices": null,
      "images": [],
      "metadata": {}
    }
  ],
  "has_more": true
}

Delete a product

Deleting a product also deletes its prices. A product that appears on a line item or a subscription that isn’t canceled can’t be deleted. To stop selling it, set active: false instead.

Required parameters

Name
id
Type
string,

Returns

A deleted object stub.

Delete a product

const product = await bias.products.delete("id");

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "deleted": true
}