Big Commerce – Get Order Shipments via API

To gets a list of all shipments on an order., Following API need to be used.

Request: GET
https://api.bigcommerce.com/stores/{store_hash}/v2/orders/{order_id}/shipments

Authentication
X-Auth-Token in header

  • Parameters
    – {store_hash} string
    – Accept in header with default of application/json – string – required
    – {order_id} – integer – required – ID of the order.

    Responses:

    1) 200 (success – Order object returned in responses)
    2) 400 (error code – “The requested resource was not found.

Sample body: Return body will contain the shipment details along with the tracking number.

[
  {
    "id": 6,
    "order_id": 225,
    "customer_id": 11,
    "order_address_id": 127,
    "date_created": "Mon, 11 Mar 2019 17:22:08 +0000",
    "tracking_number": "EJ958083578US",
    "merchant_shipping_cost": "0.0000",
    "shipping_method": "None",
    "comments": "Ready to go...",
    "shipping_provider": "usps",
    "tracking_carrier": "",
    "tracking_link": "",
    "billing_address": {
      "first_name": "Jane",
      "last_name": "Does",
      "company": "",
      "street_1": "123 Main Street",
      "street_2": "",
      "city": "Austin",
      "state": "Texas",
      "zip": "78751",
      "country": "United States",
      "country_iso2": "US",
      "phone": "",
      "email": "janedoe@example.com"
    },
    "shipping_address": {
      "first_name": "Trishy",
      "last_name": "Test",
      "company": "Acme Pty Ltd",
      "street_1": "666 Sussex St",
      "street_2": "",
      "city": "Anywhere",
      "state": "Some State",
      "zip": "12345",
      "country": "United States",
      "country_iso2": "US",
      "phone": "",
      "email": "elsie@example.com"
    },
    "items": [
      {
        "order_product_id": 188,
        "product_id": 0,
        "quantity": 1
      }
    ]
  },
  {
    "id": 7,
    "order_id": 225,
    "customer_id": 11,
    "order_address_id": 128,
    "date_created": "Mon, 11 Mar 2019 17:22:31 +0000",
    "tracking_number": "EJ958083578UK",
    "merchant_shipping_cost": "0.0000",
    "shipping_method": "None",
    "comments": "Janes Order",
    "shipping_provider": "usps",
    "tracking_carrier": "",
    "tracking_link": "",
    "billing_address": {
      "first_name": "Jane",
      "last_name": "Does",
      "company": "",
      "street_1": "123 Main Street",
      "street_2": "",
      "city": "Austin",
      "state": "Texas",
      "zip": "78751",
      "country": "United States",
      "country_iso2": "US",
      "phone": "",
      "email": "janedoe@example.com"
    },
    "shipping_address": {
      "first_name": "Jane",
      "last_name": "Doe",
      "company": "",
      "street_1": "555 Main Street",
      "street_2": "",
      "city": "Austin",
      "state": "Texas",
      "zip": "78751",
      "country": "United States",
      "country_iso2": "US",
      "phone": "",
      "email": "janedoe@example.com"
    },
    "items": [
      {
        "order_product_id": 189,
        "product_id": 0,
        "quantity": 1
      }
    ]
  }
]

Leave a comment

Your email address will not be published. Required fields are marked *