Products

Each Product is one exact purchasable good, service, SKU, or entitlement. Configurations that a commerce platform might call variants—such as a red, large T-shirt—are separate Products in Bias. A Product can have multiple current or historical Prices and can be associated with discounts. Its name, description, SKU, attributes, and images describe exactly what the customer receives; commercial terms are stored separately in Price objects.

The Product object

Name
object
Type
"product",
Description
Literal representing the object's type.
Name
id
Type
string,
Description
Unique identifier for the object.
Name
live
Type
boolean,
Description
Has the value true if the object exists in a production environment or the value false if the object exists in a sandbox environment.
Name
created_at
Type
integer,
Description
Time at which the object was created. Measured 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 exact item, such as its color, size, or service tier.
Name
default_price
Type
string or Price or null,
Description
Expandable. The default price for this product.
Name
deleted
Type
boolean,
Description
Whether the product has been deleted.
Name
description
Type
string or null,
Description
An optional description of the product.
Name
images
Type
array of Files or null,
Description
Visual media for this exact product, including its specific color or configuration.
Name
metadata
Type
object,
Description
A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration's internal use.
Name
name
Type
string,
Description
The name of the good, service, or entitlement being sold.
Name
prices
Type
array of Prices or null or null,
Description
Expandable. The price available for this product.
Name
sku
Type
string or null,
Description
The merchant-defined stock keeping unit for this product.
Name
source
Type
object or null,
Description
The external source of this exact item. Parent identity is retained only for source-specific grouping.
Properties
Name
updated_at
Type
integer,
Description
Time at which the object was last updated. Measured 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": null,
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

Create a product

Creates one exact purchasable product. Use sku for its stock keeping unit and attributes for distinguishing details such as color, size, or service tier.

Required parameters

Name
name
Type
string,
Description
The name of the good, service, or entitlement being sold.

Optional parameters

Name
expand
Type
object,
Properties
Name
description
Type
string or null,
Description
An optional description of the product.
Name
sku
Type
string or null,
Description
The merchant-defined stock keeping unit for this product.
Name
attributes
Type
object,
Description
The attributes that distinguish this exact item, such as its color, size, or service tier.
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
Visual media for this exact product, including its specific color or configuration.
Name
metadata
Type
object or null,
Description
A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration's internal use.

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": null,
  "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,
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": null,
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

Update a product

Updates the specified product by setting the values of the parameters passed.

Required parameters

Name
id
Type
string,

Optional parameters

Name
expand
Type
object,
Properties
Name
name
Type
string,
Description
The name of the good, service, or entitlement being sold.
Name
description
Type
string or null,
Description
An optional description of the product.
Name
sku
Type
string or null,
Description
The merchant-defined stock keeping unit for this product.
Name
attributes
Type
object,
Description
The attributes that distinguish this exact item, such as its color, size, or service tier.
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 the default price for this product.
Name
images
Type
array of string or null,
Description
Visual media for this exact product, including its specific color or configuration.
Name
metadata
Type
object or null,
Description
A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration's internal use.

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": null,
  "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
  "prices": null,
  "images": [],
  "metadata": {}
}

List all products

Returns a list of your products. Products are returned in reverse chronological order, with the most recently created products appearing first.

Optional parameters

Name
expand
Type
object,
Properties
Name
ending_before
Type
string,
Description
A cursor for use in pagination. ending_before is an object ID that results will end before. Used to move backward through the list.
Name
starting_after
Type
string,
Description
A cursor for use in pagination. starting_after is an object ID that results will start after. Used to move forward through the list.
Name
limit
Type
number, at least 1, at most 1000, default is 50
Description
Maximum number of objects to return.
Name
filters
Type
object, object, or object,
Description
Filters to apply to the list. Combine multiple conditions 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": null,
    "default_price": "price_dz1NVvl5CSogERkeA9Ng67",
    "prices": null,
    "images": [],
    "metadata": {}
  },
  "has_more": false
}

Delete a product

Deletes a product. Deleted products cannot be retrieved or used for new purchases, but existing prices associated with the product will continue to work until they are also deleted.

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
}
Previous
Next

Built by Bias in California