Order Products - Hands-on Lab
Lesson 23 of 26 · 30 min
In this lab, you will:
- Create an order with a custom product
- Add a product with options to an order
- List order products
Prerequisites
- BigCommerce store (sandbox or live)
- Basic knowledge of APIs
- REST client (Postman)
Create a Custom Order
- Copy and paste the request below into Postman
- 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
Add a Product with Options to an Order
- GET the
option_values > idandoption_values > option_id - Copy and paste the request below into Postman
- Replace
{product_id}with the ID of a product in the store - Make note of the
option_values > idandoption_values > option_id. These will be passed into the products array - Copy and paste the request below into Postman
- Replace
{order_id}with the order ID to be updated - Copy and paste the code below into the body section of Postman
- Replace
{product_id}with the ID of the product with option to be added to the order - Replace
{option_values > option_id}with the option ID retrieved previously - Replace
{option_values > id}with the option ID retrieved previously - Select PUT next to the request url
- Click the Send button
- Observe response
List Order Products
- Copy and paste the request below into Postman
- Replace
{order_id}with the ID of an order - Select GET next to the request url
- Click the Send button
- Observe response