Get All Product Videos
GET /stores/{store_hash}/v3/catalog/products/{product_id}/videos
Request
Returns a list of Product Videos. Optional parameters can be passed in.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- product_id in path - integer - required
The ID of the
Product
to which the resource belongs. - include_fields in query - string
Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
- exclude_fields in query - string
Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/videos' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
dataarray[object]
metaobject
Data about the response, including pagination and collection totals.
example
{ "data": [ { "id": 6, "type": "youtube", "video_id": "PqBTp23RLhI", "product_id": 192, "sort_order": 1, "title": "Creating and Editing Banners | BigCommerce Tutorials", "description": "Learn how to create and edit marketing banners. Marketing banners are a great way to advertise sales, display coupon codes, and add design elements. Let’s take a look at how you can leverage banners to convert your store’s visitors into paying customers.", "length": "01:54" }, { "id": 7, "type": "youtube", "video_id": "EhYBjzqd-nI", "product_id": 192, "sort_order": 2, "title": "BigCommerce Company Values", "description": "These are the core principles upon which BigCommerce was built, guiding what we do and how we do it. Each employee learns them, loves them and lives them. Our merchants benefit from them every time they use our product or get help from our support team.\n\nJoin the BigCommerce team and help us build software that changes lives!\n\nhttps://www.bigcommerce.com/careers/", "length": "03:30" }, { "id": 8, "type": "youtube", "video_id": "vAUdo4kRjrU", "product_id": 192, "sort_order": 3, "title": "TOP WORKPLACES 2016 - Austin American Statesman + BigCommerce", "description": "We've been named one of Austin American-Statesman's Top WorkPlaces for the 5th year in a row! Here's what some employees have to say:\n\n“I am given the freedom and trust to make a difference.”\n\n“Everyone believes in the product and growing the company.”\n\n“I'm appreciated for the work I do and there is room to grown within the company.”\n\nWork With Us!\nhttp://www.bigcommerce.com/careers.php", "length": "01:37" } ], "meta": { "pagination": { "total": 3, "count": 3, "per_page": 50, "current_page": 1, "total_pages": 1, "links": { "current": "?page=1&limit=50" } } } }
Create a Product Video
POST /stores/{store_hash}/v3/catalog/products/{product_id}/videos
Request
Creates a Product Video.
Required Fields
- video_id
Read-Only Fields
- id
Publicly accessible URLs are valid parameters. Videos must be loaded through YouTube at this time.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
The model for a POST to create a video on a product.
titlestring
>= 0 characters<= 255 charactersThe title for the video. If left blank, this will be filled in according to data on a host site.
Example: Writing Great Documentation
descriptionstring
The description for the video. If left blank, this will be filled in according to data on a host site.
Example: A video about documenation
sort_orderinteger
The order in which the video will be displayed on the product page. Higher integers give the video a lower priority. When updating, if the video is given a lower priority, all videos with a
sort_order
the same as or greater than the video's newsort_order
value will have theirsort_order
s reordered.Example: 1
typestring
The video type (a short name of a host site).
Allowed: youtube
video_idstring
>= 0 characters<= 25 charactersThe ID of the video on a host site.
Example: z3fRu9pkuXE
example
{ "title": "Writing Great Documentation", "description": "A video about documenation", "sort_order": 1, "type": "youtube", "video_id": "z3fRu9pkuXE" }
Response
Body
Response payload for the BigCommerce API.
dataobject
A product video model.
metaobject
Response metadata.
example
{ "title": "Your Video", "description": "Company Values", "sort_order": 1, "type": "youtube", "video_id": "123345AA" }
Get a Product Video
GET /stores/{store_hash}/v3/catalog/products/{product_id}/videos/{id}
Request
Returns a single Product Video. Optional parameters can be passed in.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- product_id in path - integer - required
The ID of the
Product
to which the resource belongs. - id in path - integer - required
The BigCommerce ID of the
Video
- id in path - integer - required
The BigCommerce ID of the
Video
- include_fields in query - string
Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
- exclude_fields in query - string
Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/videos/[id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
Response payload for the BigCommerce API.
data
A product video model.
metaobject
Response metadata.
example
{ "title": "Your Video", "description": "Company Values", "sort_order": 1, "type": "youtube", "video_id": "123345AA" }
Update a Product Video
PUT /stores/{store_hash}/v3/catalog/products/{product_id}/videos/{id}
Request
Updates a *Product Video.
Required Fields
- none
Read-Only Fields
- id
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
- id in path - integer - required
The BigCommerce ID of the
Video
Body
The model for a PUT to update a video on a product.
titlestring
>= 0 characters<= 255 charactersThe title for the video. If left blank, this will be filled in according to data on a host site.
descriptionstring
The description for the video. If left blank, this will be filled in according to data on a host site.
sort_orderinteger
The order in which the video will be displayed on the product page. Higher integers give the video a lower priority. When updating, if the video is given a lower priority, all videos with a
sort_order
the same as or greater than the video's newsort_order
value will have theirsort_order
s reordered.typestring
The video type (a short name of a host site).
Allowed: youtube
idinteger
The unique numeric ID of the product video; increments sequentially.
example
{ "title": "string", "description": "string", "sort_order": -2147483648, "type": "youtube", "id": 0 }
Response
Body
Response payload for the BigCommerce API.
dataobject
A product video model.
metaobject
Response metadata.
example
{ "title": "Your Video", "description": "Company Values", "sort_order": 1, "type": "youtube", "video_id": "123345AA" }
Delete a Product Video
DELETE /stores/{store_hash}/v3/catalog/products/{product_id}/videos/{id}
Request
Deletes a Product Video.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- product_id in path - integer - required
The ID of the
Product
to which the resource belongs. - id in path - integer - required
The BigCommerce ID of the
Video
- id in path - integer - required
The BigCommerce ID of the
Video
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/videos/[id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'