Products V2
It is recommended to use the new Catalog Products.
Products
A product object represents a saleable item in the catalog.
Deprecated
Avoid using this API operation if possible. It will be removed in a future version.
Product Object Properties
List Products
Gets the collection of products. (Default sorting is by product id, from lowest to highest.)
GET /stores/{store_hash}/v2/products
Filters
Filter parameters can be added to the URL query string to select specific products in the collection.
Pagination
Parameters can be added to the URL query string to paginate the collection. The maximum limit is 250. If a limit isn’t provided, up to 50 products are returned by default.
Note
You can filter the retrieved fields by appending one of the following options to your request:
- ?include=
- ?include=@summary
- ?exclude=
For details, syntax, and examples, please see the Get a Product operation.
Response
Example JSON returned in the response:
Get a Product
Gets a product.
GET /stores/{store_hash}/v2/products/{id}
Note
You can filter the retrieved fields by appending one of the following options to your request:
?include=?include=@summary?exclude=
In particular, you can reduce payload size, and improve performance, by excluding the description field.
Mandatory Fields
However, the following fields are always present on product API requests, and cannot be excluded:
idnamedate_modifiedprimary_image
include
The following sample request will retrieve only the specified date_created, price, and cost_price fields, plus the mandatory fields listed just above:
Here is a corresponding sample response:
include=@summary
The ?include=@summary option retrieves the following predefined subset of fields, in addition to the mandatory fields listed above:
availabilitycalculated_priceinventory_trackingskuinventory_levelinventory_warning_levelis_visibleis_featured
Here is a sample request with the ?include=@summary option appended:
Here is a corresponding sample response:
exclude
The ?exclude= option excludes one or more specified fields. However, you cannot exclude the mandatory id, name, date_modified, or primary_image fields.
Here is a sample request with the ?exclude= option appended:
We have omitted the corresponding sample response. However, the following section shows a complete sample response for a request submitted with no ?include or ?exclude option. (The effect of the ?exclude=description option shown above would be to omit the "description": field shown as the sixth field below.)
Response
Example JSON returned in the response:
Get a Product Count
Gets a count of products.
GET /stores/{store_hash}/v2/products/count
Filters
Filter parameters can be added to the URL query string to select specific products in the collection.
Note
If no filters are applied, the total number of products is returned.
Response
Example JSON returned in the response:
Create a Product
Creates a new product. The example request shows how to create a basic product by sending a product object with the minimum required properties.
POST /stores/{store_hash}/v2/products
Read-only Properties
The following properties of the product are read-only. If one or more of these properties are included in the request, it will be rejected.
- id
- calculated_price
- brand
- images
- discount_rules
- configurable_fields
- custom_fields
- primary_image
- videos
- rules
- option_set
- options
- tax_class
Requirements
The following properties of the product are required. The request won’t be fulfilled unless these properties are valid.
- name
- price
- categories
- type
- availability
- weight
Note
Create a request by sending a product object with the minimum required properties:
When the is_visible property is not provided, the product’s visibility is false by default.
To make newly created products immediately visible on the storefront, you must set is_visible to true when you create each product.
You may encounter a case where product information was updated successfully, but related inventory data failed to update. In such cases, BigCommerce will return a 207 status along with the object as updated and a descriptive error message.
To maximize system performance, BigCommerce caps the number of categories to which a product can belong. The maximum is 1,000. If your POST includes an array of more than 1,000 categories ID values, BigCommerce will return a 403 error:
If automatic tax is enabled on the store, the value of tax_class_id will have no effect on the calculation of taxes.
Update a Product
Updates an existing product.
PUT /stores/{store_hash}/v2/products/{id}
Read-only Properties
The following properties of the product are read-only. If one or more of these properties are included in the request, it will be rejected.
- id
- rating_total
- rating_count
- number_sold
- date_created
- date_modified
- date_last_imported
- calculated_price
- brand
- images
- discount_rules
- configurable_fields
- custom_fields
- primary_image
- videos
- rules
- option_set
- options
- tax_class
Requirements
There are no required properties when updating a product.
Note
To update a product, set one or more product properties in the PUT request:
For example, you can use a PUT to link a product to an option set:
Invalid property values will produce a 400 Bad Request error response:
Request
Response
Trying to set read-only properties will also produce a 400 Bad Request error response:
Request
Response
You may encounter a case where product information was updated successfully, but related inventory data failed to update. In such cases, BigCommerce will return a 207 status along with the object as updated and a descriptive error message.
To maximize system performance, BigCommerce caps the maximum number of categories to which a product can belong, at 1,000. If your PUT includes an array of more than 1,000 categories ID values, BigCommerce will return a 403 error:
If automatic tax is enabled on the store, the value of tax_class_id will have no effect on the calculation of taxes.
Delete a Product
Deletes a product.
DELETE /stores/{store_hash}/v2/products/{id}
Note
Successful deletion of a product returns a 204 No Content response:
Delete All Products
Deletes all products from the store.
DELETE /stores/{store_hash}/v2/products
Note
Successful deletion of all products returns a 204 No Content response: