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
trueif the object exists in a production environment or the valuefalseif 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
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
Response example
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
Response example
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
Response example
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_beforeis 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_afteris 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
andandor. - Properties
Returns
Returns a list of product objects.
List all products
Response example
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.