This article introduces BigCommerce’s Orders V2 and Orders V3 REST API resources. Orders V2 exposes endpoints for creating, reading, updating, and deleting orders; it also includes endpoints for managing order shipments and order shipping addresses. Orders V3 surfaces order transactions and order refunds endpoints. For information on processing order payments by API, see Payments API Overview.
To create an order, send a POST request to /stores/{{STORE_HASH}}/v2/orders.
Migrating historical orders
When migrating historical orders processed on another eCommerce platform to BigCommerce, supply the code M-MIG for the external_source field. This code will exclude historical orders from the store’s GMV/order count, which factors into pricing.
Once an order has products, a billing address, and a shipping address, you can create an order shipment.
To create an order shipment, send a POST request to /stores/{{STORE_HASH}}/v2/orders/{{order_id}}/shipments.
POST request.id returned in each GET request.shipped status.Specify order status by including the status_id property in the create order request. To update an order and change its status, send a PUT request to /v2/orders/{{order_id}}.
To get a list of order statuses, send a GET request to /stores/{{STORE_HASH}}/v2/order_statuses.
status_id defaults to 1.custom_label in the control panel, see Order Statuses.Awaiting Fulfillment, and then manually edited, inventory levels won’t reflect a change in stock. To learn more about inventory stock settings, see Stock Adjustment Settings.Specify the customer by including a customer_id in the create order request.
To get a list of customers, send a GET request to /stores/{{STORE_HASH}}/v3/customers.
Set customer_id to 0 to create a guest order.
Add shipping addresses by including a shipping_address array in the create order request.
Add multiple shipping addresses to ship to multiple locations.
Specify products from the catalog by including a products array in a POST request to the Create an order endpoint.
To get the product_options.id and product_options.value of a product for the order products array, send the following GET request to Get variants by product id. See the example response that follows, or consult the response schema.
price_inc_tax and price_ex_tax to override the calculated price.price_ex_tax or price_inc_tax, override both; otherwise, order totals will not calculate correctly.price_inc_tax or price_ex_tax does not change variant pricing.You can create multiple shipments for orders, and each shipment can have a different order_address_id.
To get shipping quotes, send the following GET request. See the example response that follows, or consult the response schema.
Generating a quote through a shipping carrier is not supported. You can specify a shipping carrier when creating an order shipment. You can generate the quote elsewhere, then update the shipping_cost_ex_tax and shipping_cost_inc_tax for the order total to be correct.
To get order taxes, send the following GET request. See the example response that follows, or consult the response schema.
The response’s order tax object name property gets set to API Tax Override when generated by third-party tax services like Avalara Premium.
BigCommerce submits tax documents to Avalara when an order moves from an unpaid status to a paid status and voids tax documents when an order moves from a paid status to an unpaid status.
CA instead of California) in an order address will cause tax document submission to fail.price_inc_tax and price_ex_tax in an update order request.To get order transactions, send the following GET request. See the example response that follows, or consult the response schema.
Not all payment gateways return the full card or fraud detail. Depending on the payment method, different information will be available.
Orders V3 exposes endpoints for managing order refunds. For an overview on using these endpoints, see Order Refunds in API Docs.
Order subtotal and total calculate automatically; edits to the following properties trigger a recalculation.
You can override calculated values such as product prices, subtotals, and totals by sending a fixed value in the request. If you do not supply values for these properties, you will automatically calculate them based on the preset store values and tax rules.
subtotal or total, override both; the system will not re-calculate the other.discount_amount.Is adding coupons available?
Coupon redemption is unavailable. You can not write to the coupon_discount field. You can add a discount to the order by using the discount_amount.
How do I create an order for a guest?
To specify a guest checkout, set customer_id to 0.
How do I set the order source?
You cannot specify the order_source; its value is external. You can optionally specify a value for external_source to define which external source the order is coming from - e.g., POS system X, accounting system Y, etc.
Note: To publish an app that creates orders, it must include the
external_sourcefield on new orders, with the app’s ID as the value. See App Store Approval Requirements to learn more.
Can I create an order with only custom products?
Yes, the store’s catalog does not include products.
What is the difference between country_ISO2 and country?
There is no requirement to specify country when you specify country_ISO2 in the shipping and billing addresses and vice versa.
How can I take payment for an order?
You can either process payment through a third party or using the control panel.
Can I generate a shipping quote from a carrier using the API?
Not at this time. If you create an order either in the control panel or by API, it will return a 204 when trying to get a shipping quote.