Order Shipments - Hands-on Lab

Lesson 24 of 26 · 30 min

Orders API Lab

In this lab, you will:

  • Create a new order shipment
  • GET a list of order shipments
  • Update a shipment
  • GET a count of shipments

Prerequisites

  • BigCommerce store (sandbox or live)
  • Basic knowledge of APIs
  • REST client (Postman)

Create a New Order Shipment

  1. Copy and paste the request below into Postman
https://api.bigcommerce.com/stores/{{store_hash}}/v2/orders/{order_id}/shipments
  1. Copy and paste the code below into the Body section of Postman
{
"tracking_number": "EJ958083578UK",
"comments": "Janes Order",
"order_address_id": "128",
"shipping_provider": "",
"items": [
{
"order_product_id": 194,
"quantity": 1
},
{
"order_product_id": 195,
"quantity": 1
}
]
}
  1. Select POST next to the request url
  2. Click the Send button
  3. Observe response

GET a List of Order Shipments

  1. Copy and paste the request below into Postman
https://api.bigcommerce.com/stores/{{store_hash}}/v2/orders/{order_id}/shipments
  1. Select GET next to the request url
  2. Click the Send button
  3. Observe response

Update a Shipment

  1. Copy and paste the request below into Postman
https://api.bigcommerce.com/stores/{{store_hash}}/v2/orders/{order_id}/shipments/{shipment_id}
  1. Copy and paste the code below into the Body section of Postman
{
"tracking_number": "EJ958083578US"
}
  1. Select PUT next to the request url
  2. Click the Send button
  3. Observe response

Get a Count of Shipments

  1. Copy and paste the request below into Postman
https://api.bigcommerce.com/stores/{{store_hash}}/v2/orders/{order_id}/shipments/count
  1. Replace {order_id} with the ID of an order
  2. Select GET next to the request url
  3. Click the Send button
  4. Observe response