To gets a list of all products in an order, Following API need to be used.
Request: GET
https://api.bigcommerce.com/stores/{store_hash}/v2/orders/{order_id}/products
Authentication
X-Auth-Token in header
- Parameters
– {store_hash} hash value generated on Account API creation-string-required
– Accept in header with default of application/json – string – required
– {order_id} – integer – required – ID of the order.
Responses:
1) 200 (success – Product details returned in responses)
2) 400 (error code – “The requested resource was not found.
Sample body: Return body will contain the product details associated with the order.
[{
"id": 116,
"order_id": 181,
"product_id": 188,
"order_address_id": 81,
"name": "Dustpan & Brush",
"name_customer": "Dustpan & Brush",
"name_merchant": "Dustpan & Brush",
"sku": "DUST1",
"upc": "1234567891112",
"type": "physical",
"base_price": "31.9500",
"price_ex_tax": "31.9500",
"price_inc_tax": "37.2300",
"price_tax": "5.2800",
"base_total": "31.9500",
"total_ex_tax": "31.9500",
"total_inc_tax": "37.2300",
"total_tax": "5.2800",
"weight": "2.0000",
"quantity": 1,
"base_cost_price": "0.0000",
"cost_price_inc_tax": "0.0000",
"cost_price_ex_tax": "0.0000",
"cost_price_tax": "0.0000",
"is_refunded": false,
"quantity_refunded": 0,
"refund_amount": "0.0000",
"return_id": 0,
"wrapping_name": "",
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_message": "",
"quantity_shipped": 0,
"event_name": null,
"event_date": null,
"fixed_shipping_cost": "0.0000",
"ebay_item_id": "",
"ebay_transaction_id": "",
"option_set_id": null,
"parent_order_product_id": null,
"is_bundled_product": false,
"bin_picking_number": "",
"external_id": null,
"fulfillment_source": "",
"brand": "BigCommerce",
"applied_discounts": [],
"product_options": []
}]