Images
Get All Product Images
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/imagesRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Productto which the resource belongs. - page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query with default of 50 - integer
Controls the number of items per page in a limited (paginated) list of products.
- include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
Allowed: name | type | sku | description | weight | width | depth | height | price | cost_price | retail_price | sale_price | map_price | tax_class_id | product_tax_code | calculated_price | categories | brand_id | option_set_id | option_set_display | inventory_level | inventory_warning_level | inventory_tracking | reviews_rating_sum | reviews_count | total_sold | fixed_cost_shipping_price | is_free_shipping | is_visible | is_featured | related_products | warranty | bin_picking_number | layout_file | upc | mpn | gtin | date_last_imported | search_keywords | availability | availability_description | condition | is_condition_shown | order_quantity_minimum | order_quantity_maximum | page_title | meta_keywords | meta_description | date_created | date_modified | view_count | preorder_release_date | preorder_message | is_preorder_only | is_price_hidden | price_hidden_label | custom_url | base_variant_id | open_graph_type | open_graph_title | open_graph_description | open_graph_use_meta_description | open_graph_use_product_name | open_graph_use_image
- exclude_fields in query - arrayFields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.Type: array[string]
example
Response
Body
Response payload for the BigCommerce API.
dataarray[object]
example
Create a Product Image
POST https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/imagesRequest
Creates a Product Image.
Required Fields
image_file, orimage_url
Usage Notes
image_url255character limit
Content-Type- For
image_file, use themultipart/form-datamedia type. Forimage_url, use theapplication/jsontype. See Adding product images for more information.
- For
- You can create only one image at a time. A product can have up to 1000 images.
- Supported image file types are BMP, GIF, JPEG, PNG, WBMP, XBM, and WEBP.
- Each image file or image uploaded by URL can be up to 8 MB.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Productto which the resource belongs.
Body
product_idinteger
The unique numeric identifier for the product with which the image is associated.
image_urlstring
<= 255 charactersThe URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file.
Cannot be used with
image_file.is_thumbnailboolean
Flag for identifying whether the image is used as the productʼs thumbnail.
sort_orderinteger
The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a
sort_orderthe same as or greater than the imageʼs newsort_ordervalue will have theirsort_orders reordered.Min: -2147483648Max: 2147483647descriptionstring
The description for the image.
date_modifiedstring
The date on which the product image was modified.
Body
product_idinteger
The unique numeric identifier for the product with which the image is associated.
date_modifiedstring
The date on which the product image was modified.
is_thumbnailboolean
Flag for identifying whether the image is used as the productʼs thumbnail.
sort_orderinteger
The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a
sort_orderthe same as or greater than the imageʼs newsort_ordervalue will have theirsort_orders reordered.Min: -2147483648Max: 2147483647descriptionstring
The description for the image.
image_filestring
The local path to the original image file uploaded to BigCommerce. Use image_url when creating a product.
Must be sent as a
multipart/form-datafield in the request body. Limit of 8 MB per file. Cannot be used withimage_url.
example
Response
Body
Response payload for the BigCommerce API.
data
One of:idinteger
The unique numeric ID of the image; increments sequentially.
product_idinteger
The unique numeric identifier for the product with which the image is associated.
url_zoomstring
read-onlyThe zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. You should provide an image smaller than 1280x1280; otherwise, the API returns a resized image.
url_standardstring
read-onlyThe standard URL for this image. By default, this is used for product-page images.
url_thumbnailstring
read-onlyThe thumbnail URL for this image. By default, this is the image size used on the category page and in side panels.
url_tinystring
read-onlyThe tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page.
date_modifiedstring
The date on which the product image was modified.
is_thumbnailboolean
Flag for identifying whether the image is used as the productʼs thumbnail.
sort_orderinteger
The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a
sort_orderthe same as or greater than the imageʼs newsort_ordervalue will have theirsort_orders reordered.Min: -2147483648Max: 2147483647descriptionstring
The description for the image.
image_urlstring
Must be a fully qualified URL path, including protocol. Limit of 8MB per file.
example
Get a Product Image
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/images/{image_id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Productto which the resource belongs. - image_id in path - integerrequired
The ID of the
Imagethat is being operated on. - include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
Allowed: name | type | sku | description | weight | width | depth | height | price | cost_price | retail_price | sale_price | map_price | tax_class_id | product_tax_code | calculated_price | categories | brand_id | option_set_id | option_set_display | inventory_level | inventory_warning_level | inventory_tracking | reviews_rating_sum | reviews_count | total_sold | fixed_cost_shipping_price | is_free_shipping | is_visible | is_featured | related_products | warranty | bin_picking_number | layout_file | upc | mpn | gtin | date_last_imported | search_keywords | availability | availability_description | condition | is_condition_shown | order_quantity_minimum | order_quantity_maximum | page_title | meta_keywords | meta_description | date_created | date_modified | view_count | preorder_release_date | preorder_message | is_preorder_only | is_price_hidden | price_hidden_label | custom_url | base_variant_id | open_graph_type | open_graph_title | open_graph_description | open_graph_use_meta_description | open_graph_use_product_name | open_graph_use_image
- exclude_fields in query - arrayFields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.Type: array[string]
example
Response
Body
Response payload for the BigCommerce API.
dataobject
Common ProductImage properties.
example
Update a Product Image
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/images/{image_id}Request
Updates a Product Image.
Usage Notes
image_url255character limit
- Each image file or image uploaded by URL can be up to 8 MB.
- For file uploads, send a POST request using the
multipart/form-datamedia type
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Productto which the resource belongs. - image_id in path - integerrequired
The ID of the
Imagethat is being operated on. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
product_idinteger
The unique numeric identifier for the product with which the image is associated.
image_urlstring
<= 255 charactersThe URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file.
Cannot be used with
image_file.is_thumbnailboolean
Flag for identifying whether the image is used as the productʼs thumbnail.
sort_orderinteger
The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a
sort_orderthe same as or greater than the imageʼs newsort_ordervalue will have theirsort_orders reordered.Min: -2147483648Max: 2147483647descriptionstring
The description for the image.
date_modifiedstring
The date on which the product image was modified.
Body
product_idinteger
The unique numeric identifier for the product with which the image is associated.
date_modifiedstring
The date on which the product image was modified.
is_thumbnailboolean
Flag for identifying whether the image is used as the productʼs thumbnail.
sort_orderinteger
The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a
sort_orderthe same as or greater than the imageʼs newsort_ordervalue will have theirsort_orders reordered.Min: -2147483648Max: 2147483647descriptionstring
The description for the image.
image_filestring
The local path to the original image file uploaded to BigCommerce. Use image_url when creating a product.
Must be sent as a
multipart/form-datafield in the request body. Limit of 8 MB per file. Cannot be used withimage_url.
example
Response
Body
Response payload for the BigCommerce API.
data
One of:idinteger
The unique numeric ID of the image; increments sequentially.
product_idinteger
The unique numeric identifier for the product with which the image is associated.
url_zoomstring
read-onlyThe zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. You should provide an image smaller than 1280x1280; otherwise, the API returns a resized image.
url_standardstring
read-onlyThe standard URL for this image. By default, this is used for product-page images.
url_thumbnailstring
read-onlyThe thumbnail URL for this image. By default, this is the image size used on the category page and in side panels.
url_tinystring
read-onlyThe tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page.
date_modifiedstring
The date on which the product image was modified.
is_thumbnailboolean
Flag for identifying whether the image is used as the productʼs thumbnail.
sort_orderinteger
The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a
sort_orderthe same as or greater than the imageʼs newsort_ordervalue will have theirsort_orders reordered.Min: -2147483648Max: 2147483647descriptionstring
The description for the image.
image_urlstring
Must be a fully qualified URL path, including protocol. Limit of 8MB per file.
example
Delete a Product Image
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/images/{image_id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- product_id in path - integerrequired
The ID of the
Productto which the resource belongs. - image_id in path - integerrequired
The ID of the
Imagethat is being operated on.