Lab - Metafields and Product Reviews
Lesson 18 of 21 · 30 min
This lab activity will give you a chance to practice working with metafields and product reviews via the Catalog API. Each step will walk you through how to use all of the endpoints covered in the previous lesson.
Prerequisites:
- BigCommerce store (sandbox or live)
- Basic knowledge of APIs
- REST client (Postman)
- Completion of all previous Catalog API labs
In this lab, you will:
- Add a metafield to a product
- GET metafields by product ID
- Create a product review
- GET product reviews
Add a Metafield to a Product
- Copy and paste the request below into Postman
- Enter the ID of the product created in previous lab for
product_idin the Params tab - Copy and paste the code below into the Body section of Postman
- Select POST next to the request url
- Click the Send button
- Observe response and metafield added to product
GET Metafields
- Copy and paste the request below into Postman
- Enter the ID of the product created in previous lab for
product_idin the Params tab - Select GET next to the request url (if not already selected)
- Click the Send button
- Observe response
Create a Product Review
- Copy and paste the request below into Postman
- Enter the ID of the product created in previous lab for
product_idin the Params tab - Copy and paste the code below into the Body section of Postman
- Select POST next to the request url
- Click the Send button
- Observe response and review added to product
GET Product Reviews
- Copy andpaste the request below into Postman
- Enter the ID of the product created in previous lab for
product_idin the Params tab - Select GET next to the request url
- Click the Send button
- Observe response