> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Update Order

PUT https://api.bigcommerce.com/stores/{store_hash}/v2/orders/{order_id}
Content-Type: application/json

Updates an *Order*. Send only the fields you want to change. Top-level order fields and sub-resources such as `products` and `shipping_addresses` behave like a PATCH: omitted fields keep their current values.

**Products**

* To add a product to an existing order, omit the order product `id`. Include `product_options` when adding a product with variants.
* To update a product in an order, include the order product `id`. Only the fields you send are changed.
* To remove a product from an order, set that product's `quantity` to `0`. The line item stays on the order with a quantity of `0` and no longer counts toward `items_total` or the order totals.
* When you change a line item's quantity, price, variant, product, product options, or gift wrapping, the API removes all discounts and promotions from that line item. If you sync orders to an external system, such as an ERP or marketplace, sync the order again after the update.

**Fees**

Fees follow standard PUT semantics: the `fees` array in the request replaces all existing fees on the order. To keep an existing fee, include it with its `id`. Fees without an `id` are created. Fees you omit are deleted. Send `"fees": []` to remove all fees.

The values for `cost_ex_tax`, `cost_inc_tax`, and `cost_tax` in each fee should reflect the tax rate of the fee's `tax_class_id`. For a 10% tax rate, `cost_inc_tax` should be 10% higher than `cost_ex_tax`. If you omit `tax_class_id`, the store's default tax class for fees applies. Incorrect values can cause problems in downstream operations such as refunds.

**Shipping addresses**

To update an existing shipping address, include its `id` in the `shipping_addresses` entry. Entries without an `id` are added as new shipping addresses.

**Archiving**

Set `is_deleted` to `true` to archive the order. This has the same effect as the [Archive an order](/developer/api-reference/rest/admin/management/orders/delete-order) endpoint. Set it to `false` to restore an archived order.

**Read-only fields**

The request rejects `external_id` and `external_merchant_id` with a `400` error. Computed fields such as `items_total`, `order_is_digital`, and `tax_provider_id` are accepted but ignored.

To learn more about creating or updating orders, see [Orders Overview](/developer/docs/admin/checkout-and-cart/orders).

> #### Note
> * If historical orders processed on another eCommerce platform are being migrated to BigCommerce, supply the `external_source` field with the code **M-MIG**. This code will exclude the historical orders from the store's GMV/order count, which factors into pricing.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/orders/update-order

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Orders | modify | `store_v2_orders` | | Orders | read-only | `store_v2_orders_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `order_id` (integer, required) — ID of the order.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Query parameters

- `include` (list of enum, optional) — * `consignments` - include the response returned from the request to the `/orders/{order_id}/consignments` endpoint. Current default array structure is legacy and will be deprecated from **1 Feb 2026**. Specify `consignment_structure=object` as a request parameter when including consignments. * `consignments.line_items` - include the response returned from the request to the `/orders/{order_id}/products` endpoint in consignments. This will also includes the resources associated with `include=consignments`. Current default array structure is legacy and will be deprecated from **1 Feb 2026**. Specify `consignment_structure=object` as a request parameter when including consignments. * `fees` - include the response returned from the request to the `/orders/{order_id}/fees` endpoint.
  - Allowed values: `consignments`, `consignments.line_items`, `fees`
- `consignment_structure` (enum, optional) — Should be specified along with `include=consignments` or `include=consignments.line_items` to return consignments in the supported object structure. The default array structure provided is legacy and may not be supported in the future.
  - Allowed values: `object`

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

### Body (application/json)

This endpoint expects an order_Put.

- `base_handling_cost` (string, optional) — The value of the base handling cost. The value can't be negative. (Float, Float-As-String, Integer)
- `base_shipping_cost` (string, optional) — The value of the base shipping cost. The value can't be negative. (Float, Float-As-String, Integer)
- `base_wrapping_cost` (string, optional) — The value of the base wrapping cost expressed as a floating point number to four decimal places in string format. The value can't be negative.
- `billing_address` (billingAddress_Put, optional)
- `channel_id` (integer, optional) — Shows where the order originated. The channel_id defaults to 1. The value must match the ID of a valid and enabled channel. If the ID refers to a non-existing or disconnected channel, the POST and PUT `/v2/orders` endpoints return a validation error.
- `consignments` (orderConsignment_Put, optional)
- `customer_id` (integer, optional) — The ID of the customer placing the order. Use `0` for a guest order.
- `customer_message` (string, optional) — Message that the customer entered in the `Order Comments` box during checkout.
- `date_created` (string, optional) — The date the order was created, formatted in the RFC-2822 standard, e.g., `Tue, 20 Nov 2012 00:00:00 +0000`. Supply this value to support the migration of historical orders. If omitted, the existing value is unchanged.
- `default_currency_code` (string, optional) — A read-only field displays the currency code of the [transactional currency](/developer/docs/admin/store-configuration/currencies#display-vs-transactional) the shopper uses.
- `discount_amount` (string, optional) — Amount of discount for this transaction. The value can't be negative. (Float, Float-As-String, Integer)
- `order_source` (string, optional) — Reflects the origin of the order, such as the storefront, the control panel, a manual order, the Orders API, the Checkout API, or an integration with an external platform. It can affect the order's icon and source shown in the control panel order list. Orders created with the API default to `external`. Allowed values: `www` (Desktop) | `iphone` (iPhone) | `ipad` (iPad) | `android` (Android) | `mobile` (Mobile) | `manual` (manual order) | `external` (Orders API) | `buybutton` (Buy Button) | `amazon` (Amazon) | `ebay` (eBay) | `facebookshop` (Facebook Shop) | `facebookcheckout` (Facebook Checkout) | `facebookmarketplace` (Facebook Marketplace) | `pinterest` (Pinterest) | `socialshop` (Social Shop)
- `ebay_order_id` (string, optional) — If the order was placed through eBay, the eBay order number will be included. Otherwise, the value will be `0`.
- `external_source` (string, optional, nullable) — This value identifies an external system that generated the order and submitted it to BigCommerce with the Orders API. * When supplying the value, we recommend combining the type of system and vendor, e.g., ERP (Acumatica) or POS (Square). * If you are migrating historical orders processed on another eCommerce platform to BigCommerce, supply the following code as the value: M-MIG. This code will exclude historical orders from the store’s GMV/order count, which factors into pricing. Also, this code will not affect the `total_sold` on products for imported orders. * If you do not provide a value, then it will default to null.
- `geoip_country` (string, optional) — The full name of the country where the customer made the purchase, based on the IP.
- `geoip_country_iso2` (string, optional) — The country where the customer made the purchase, in ISO2 format, based on the IP.
- `handling_cost_ex_tax` (string, optional) — The value of the handling cost, excluding tax. The value can't be negative. (Float, Float-As-String, Integer)
- `handling_cost_inc_tax` (string, optional) — The value of the handling cost, including tax. The value can't be negative. (Float, Float-As-String, Integer)
- `ip_address` (string, optional) — IPv4 Address of the customer, if known. Note: You can set either `ip_address` or `ip_address_v6`. Setting the `ip_address` value will reset the `ip_address_v6` value and vice versa.
- `ip_address_v6` (string, optional) — IPv6 Address of the customer, if known. Note: You can set either `ip_address` or `ip_address_v6`. Setting the `ip_address_v6` value will reset the `ip_address` value and vice versa.
- `items_shipped` (double, optional) — The number of items that have been shipped.
- `items_total` (integer, optional) — The total number of items in the order. Read-only. The API computes this value from the order's products and ignores it in a PUT request.
- `order_is_digital` (boolean, optional) — Whether this is an order for digital products. Read-only. The API computes this value from the order's products and ignores it in a PUT request.
- `is_deleted` (boolean, optional) — Indicates whether the order is archived. Set to `true` to archive the order, which has the same effect as the Archive an order endpoint. Set to `false` to restore an archived order.
- `payment_method` (string, optional) — The payment method for this order. For example, `Manual`, `Credit Card`, `Cash`,`Test Payment Gateway`, etc.
- `payment_provider_id` (OrderPutPaymentProviderId, optional) — The external Transaction ID/Payment ID within this order’s payment provider (if a payment provider was used).
- `products` (list of OrderPutProductsItems, optional)
- `refunded_amount` (string, optional) — The amount refunded from this transaction. The value can't be negative. (Float, Float-As-String, Integer)
- `shipping_cost_ex_tax` (string, optional) — The value of shipping cost, excluding tax. The value can't be negative. (Float, Float-As-String, Integer)
- `shipping_cost_inc_tax` (string, optional) — The value of shipping cost, including tax. The value can't be negative. (Float, Float-As-String, Integer)
- `staff_notes` (string, optional) — Any additional notes for staff.
- `shipping_addresses` (list of OrderPutShippingAddressesItems, optional)
- `status_id` (integer, optional) — The status ID of the order.
- `subtotal_ex_tax` (string, optional) — Override value for subtotal excluding tax. The value can't be negative. If specified, the field `subtotal_inc_tax` is also required. (Float, Float-As-String, Integer)
- `subtotal_inc_tax` (string, optional) — Override value for subtotal including tax. The value can't be negative. If specified, the field `subtotal_ex_tax` is also required. (Float, Float-As-String, Integer)
- `tax_provider_id` (string, optional) — Read-only. The API ignores this field in a PUT request. BasicTaxProvider - Tax is set to manual and order is created in the store. AvaTaxProvider - Tax is set to automatic and order is created in the store. Used for Avalara. "" (empty string) - The order is created with the API, or the tax provider is unknown.
- `customer_locale` (string, optional) — The customer’s locale. The supported formats are: - 2-char lowercase characters. e.g., `en` - 3-char lowercase characters. e.g., `asa` - 5-char the language code is 2 lowercase characters and the region code is 2 uppercase characters, with `-` in the middle. e.g., `en-US` - 6-char the language code is 2 lowercase character and the region code is three digit number, with `-` in the middle. e.g., `es-419`
- `external_order_id` (string, optional, nullable) — The order ID in another system, such as the Amazon Order ID if this is an Amazon order. After setting it, you can update this field using a POST or PUT request.
- `total_ex_tax` (string, optional) — Override value for the total, excluding tax. If specified, the field `total_inc_tax` is also required. The value can't be negative. (Float, Float-As-String, Integer)
- `total_inc_tax` (string, optional) — Override value for the total, including tax. If specified, the field `total_ex_tax` is also required. The value can't be negative. (Float, Float-As-String, Integer)
- `wrapping_cost_ex_tax` (string, optional) — The value of the wrapping cost, excluding tax. The value can't be negative. (Float, Float-As-String, Integer)
- `wrapping_cost_inc_tax` (string, optional) — The value of the wrapping cost, including tax. The value can't be negative. (Float, Float-As-String, Integer)
- `fees` (list of orderFees_Put, optional)

## Response

### 200

Order Response.

- `backorder_shipping_expectation_message` (string, optional, nullable) — The shipping expectation message shown to the customer when the order contains a backordered item. `null` when the order has no backordered items.
- `base_handling_cost` (string, optional) — The value of the base handling cost. The value can't be negative. (Float, Float-As-String, Integer)
- `base_shipping_cost` (string, optional) — The value of the base shipping cost. The value can't be negative. (Float, Float-As-String, Integer)
- `base_wrapping_cost` (string, optional) — The value of the base wrapping cost expressed as a floating point number to four decimal places in string format. The value can't be negative.
- `billing_address` (billingAddress_Resp, optional)
- `cart_id` (string, optional) — The cart ID from which this order originated, if applicable. Correlates with the Cart API. This is a read-only field; do not set or modify its value in a POST or PUT request.
- `channel_id` (integer, optional) — Shows where the order originated. The channel_id defaults to 1. The value must match the ID of a valid and enabled channel. If the ID refers to a non-existing or disconnected channel, the POST and PUT `/v2/orders` endpoints return a validation error.
- `consignments` (OrderRespOnlyConsignments, optional)
- `coupon_discount` (string, optional) — A read-only value. Do not pass in a POST or PUT request. (Float, Float-As-String, Integer)
- `coupons` (coupons_Resource, optional)
- `currency_code` (string, optional) — The currency code of the display currency used to present prices to the shopper on the storefront. Depending on the currency selected, the value can be different from the transactional currency. A read-only value. Do not pass in a POST or PUT request.
- `currency_exchange_rate` (string, optional) — The exchange rate between the store’s default currency and the display currency. A read-only value. Do not pass in a POST or PUT request. For orders created using the V2 endpoints, this value is always 1 (only in the storefront this value can be different to 1). (Float, Float-As-String, Integer)
- `currency_id` (integer, optional) — The display currency ID. Depending on the currency selected, the value can be different from the transactional currency. A read-only value. Do not pass in a POST or PUT request. In v2 display currency is set to the transactional currency, ''default_currency_id''.
- `customer_id` (double, optional) — The ID of the customer who placed the order. `0` indicates a guest checkout. Use this ID with the Customers API to look up customer attributes that aren't stored on the order, such as `tax_exempt_category`.
- `customer_locale` (string, optional) — The customer’s locale. The supported formats are: - 2-char lowercase characters. e.g., `en` - 3-char lowercase characters. e.g., `asa` - 5-char the language code is 2 lowercase characters and the region code is 2 uppercase characters, with `-` in the middle. e.g., `en-US` - 6-char the language code is 2 lowercase character and the region code is three digit number, with `-` in the middle. e.g., `es-419`
- `customer_message` (string, optional) — Message that the customer entered (number, options) -o the `Order Comments` box during checkout.
- `date_created` (string, optional) — The date the order was created, formatted in the RFC-2822 standard. You set this attribute on Order creation (POST) to support the migration of historical orders. If you do not provide a value, then it will default to the current date/time. e.g., `Tue, 20 Nov 2012 00:00:00 +0000`. This date time is always in UTC in the api response.
- `date_modified` (string, optional) — A read-only value representing the last modification of the order. Do not attempt to modify or set this value in a POST or PUT request. RFC-2822. This date time is always in UTC in the api response.
- `date_shipped` (string, optional) — A read-only value representing the date when the order is fully shipped. Do not attempt to modify or set this value in a POST or PUT request. RFC-2822
- `default_currency_code` (string, optional) — The currency code of the transactional currency the shopper pays in.
- `default_currency_id` (integer, optional) — The transactional currency ID. A read-only value. Do not pass in a POST or PUT request.
- `discount_amount` (string, optional) — Amount of discount for this transaction. The value can't be negative. (Float, Float-As-String, Integer)
- `ebay_order_id` (string, optional) — If the order was placed through eBay, the eBay order number will be included. Otherwise, the value will be `0`.
- `external_id` (string, optional, nullable) — (Read-only) The order ID in another system, such as the Amazon order ID if this is an Amazon order.
- `external_merchant_id` (string, optional, nullable) — The merchant ID represents an upstream order from an external system. It is the source of truth for orders. After setting it, you cannot write to or update the `external_merchant_id`. For example, you can update the Facebook by Meta page ID in a POST request, but a PUT request to update the order will return a 400 error. Please remove it from your request before trying again.
- `external_order_id` (string, optional) — The order ID in another system, such as the Amazon Order ID if this is an Amazon order. After setting it, you can update this field using a POST or PUT request.
- `external_source` (string, optional, nullable) — This value identifies an external system that generated the order and submitted it to BigCommerce with the Orders API. * When supplying the value, we recommend combining the type of system and vendor, e.g., ERP (Acumatica) or POS (Square). * If you are migrating historical orders processed on another eCommerce platform to BigCommerce, supply the following code as the value: M-MIG. This code will exclude historical orders from the store’s GMV/order count, which factors into pricing. * If you do not provide a value, then it will default to null.
- `fees` (OrderRespOnlyFees, optional)
- `geoip_country` (string, optional) — The full name of the country where the customer made the purchase, based on the IP.
- `geoip_country_iso2` (string, optional) — The country where the customer made the purchase, in ISO2 format, based on the IP.
- `gift_certificate_amount` (string, optional) — A read-only value. Do not pass in a POST or PUT request. (Float, Float-As-String, Integer)
- `handling_cost_ex_tax` (string, optional) — The value of the handling cost, excluding tax. The value can't be negative. (Float, Float-As-String, Integer)
- `handling_cost_inc_tax` (string, optional) — The value of the handling cost, including tax. The value can't be negative. (Float, Float-As-String, Integer)
- `handling_cost_tax` (string, optional) — A read-only value. Do not attempt to modify or set this value in a POST or PUT request. (Float, Float-As-String, Integer)
- `handling_cost_tax_class_id` (integer, optional) — A read-only value. Do not attempt to set or modify this value in a POST or PUT request. (NOTE: Value ignored if automatic tax is enabled on the store.)
- `id` (integer, optional) — Read-only. The ID of the order.
- `ip_address` (string, optional) — IPv4 Address of the customer, if known. Note: You can set either `ip_address` or `ip_address_v6`. Setting the `ip_address` value will reset the `ip_address_v6` value and vice versa.
- `ip_address_v6` (string, optional) — IPv6 Address of the customer, if known. Note: You can set either `ip_address` or `ip_address_v6`. Setting the `ip_address_v6` value will reset the `ip_address` value and vice versa.
- `is_deleted` (boolean, optional) — Indicates whether the order is deleted/archived. When set to true in a PUT request, it has the same result as the DELETE an order request.
- `is_email_opt_in` (boolean, optional) — Indicates whether the shopper has selected an opt-in check box (on the checkout page) to receive emails. A read-only value. Do not pass in a POST or PUT.
- `is_tax_inclusive_pricing` (boolean, optional) — Indicate whether the order's base prices include tax. If true, the base prices are inclusive of tax, and the values of `subtotal_inc_tax`, `shipping_cost_inc_tax`, `handling_cost_inc_tax`, `wrapping_cost_inc_tax` and `total_inc_tax` are not estimated but actual values and can be reliable for accounting purposes. If false, the base prices are exclusive of tax, and the values of `subtotal_ex_tax`, `shipping_cost_ex_tax`, `handling_cost_ex_tax`, `wrapping_cost_ex_tax` and `total_ex_tax` are not estimated but actual values and can be reliable for accounting purposes.
- `items_shipped` (double, optional) — The number of items that have been shipped.
- `items_total` (double, optional) — The total number of items in the order.
- `order_is_digital` (boolean, optional) — Whether this is an order for digital products.
- `order_source` (string, optional) — Reflects the origin of the order, such as the storefront, the control panel, a manual order, the Orders API, the Checkout API, or an integration with an external platform. It can affect the order's icon and source shown in the control panel order list. Orders created with the API default to `external`. Allowed values: `www` (Desktop) | `iphone` (iPhone) | `ipad` (iPad) | `android` (Android) | `mobile` (Mobile) | `manual` (manual order) | `external` (Orders API) | `buybutton` (Buy Button) | `amazon` (Amazon) | `ebay` (eBay) | `facebookshop` (Facebook Shop) | `facebookcheckout` (Facebook Checkout) | `facebookmarketplace` (Facebook Marketplace) | `pinterest` (Pinterest) | `socialshop` (Social Shop)
- `payment_method` (string, optional) — The payment method for this order. For example, `Manual`, `Credit Card`, `cash`, `Test Payment Gateway`, etc.
- `payment_provider_id` (OrderSharedPaymentProviderId, optional) — The external Transaction ID/Payment ID within this order’s payment provider (if a payment provider was used).
- `payment_status` (enum, optional) — A read-only value. Do not attempt to set or modify this value in a POST or PUT request.
  - Allowed values: `authorized`, `captured`, `capture pending`, `declined`, `held for review`, `paid`, `partially refunded`, `pending`, `refunded`, `void`, `void pending`, ``
- `products` (products_Resource, optional)
- `refunded_amount` (string, optional) — The amount refunded from this transaction. The value can't be negative. (Float, Float-As-String, Integer)
- `shipping_address_count` (double, optional) — The number of shipping addresses associated with this transaction. A read-only value. Do not pass in a POST or PUT.
- `shipping_addresses` (shippingAddresses_Resource, optional)
- `shipping_cost_ex_tax` (string, optional) — The value of shipping cost, excluding tax. When specified in a POST or PUT request, the field `shipping_cost_inc_tax` is also required. The value can't be negative (Float, Float-As-String, Integer)
- `shipping_cost_inc_tax` (string, optional) — The value of shipping cost, including tax. When specified in a POST or PUT request, the field `shipping_cost_ex_tax` is also required. The value can't be negative. (Float, Float-As-String, Integer)
- `shipping_cost_tax` (string, optional) — A read-only value. Do not attempt to modify or set this value in a POST or PUT request. (Float, Float-As-String, Integer)
- `shipping_cost_tax_class_id` (integer, optional) — Shipping-cost tax class. A read-only value. Do not attempt to modify or set this value in a POST or PUT request. (NOTE: Value ignored if automatic tax is enabled on the store.)
- `staff_notes` (string, optional) — Any additional notes for staff.
- `status` (string, optional) — The status will include one of the (string, options) - values defined under Order Statuses. This value is read-only. Do not attempt to modify or set this value in a POST or PUT operation.
- `status_id` (integer, optional) — The status ID of the order.
- `store_credit_amount` (string, optional) — Represents the store credit that the shopper has redeemed on this individual order. This is a read-only value. Do not pass in a POST or PUT request. (Float, Float-As-String, Integer)
- `store_default_currency_code` (string, optional) — The currency code of the storeʼs default currency.
- `store_default_to_transactional_exchange_rate` (string, optional) — The exchange rate between the storeʼs default currency and the transactional currency used in the order.
- `subtotal_ex_tax` (string, optional) — Override value for subtotal excluding tax. The value can't be negative. If specified, the field `subtotal_inc_tax` is also required. (Float, Float-As-String, Integer)
- `subtotal_inc_tax` (string, optional) — Override value for subtotal including tax. The value can't be negative. If specified, the field `subtotal_ex_tax` is also required. (Float, Float-As-String, Integer)
- `subtotal_tax` (string, optional) — A read-only value. Do not attempt to set or modify this value in a POST or PUT request. (Float, Float-As-String, Integer)
- `tax_provider_id` (string, optional) — Read-only. BasicTaxProvider - Tax is set to manual and order is created in the store. AvaTaxProvider - Tax is set to automatic and order is created in the store. Used for Avalara. "" (empty string) - The order is created with the API, or the tax provider is unknown.
- `total_ex_tax` (string, optional) — Override value for the total, excluding tax. If specified, the field `total_inc_tax` is also required. The value can't be negative. (Float, Float-As-String, Integer)
- `total_inc_tax` (string, optional) — Override value for the total, including tax. If specified, the field `total_ex_tax` is also required. The value can't be negative. (Float, Float-As-String, Integer)
- `total_tax` (string, optional) — Total tax amount for the order. A value of `0` doesn't indicate a tax-exempt customer; tax-exempt status lives in the `tax_exempt_category` field of the customer record, not on the order.
- `wrapping_cost_ex_tax` (string, optional) — The value of the wrapping cost, excluding tax. The value can't be negative. (Float, Float-As-String, Integer)
- `wrapping_cost_inc_tax` (string, optional) — The value of the wrapping cost, including tax. The value can't be negative. (Float, Float-As-String, Integer)
- `wrapping_cost_tax` (string, optional) — A read-only value. Do not attempt to modify or set this value in a POST or PUT request. (Float, Float-As-String, Integer)
- `wrapping_cost_tax_class_id` (integer, optional) — A read-only value. Do not attempt to set or modify this value in a POST or PUT request. NOTE: Value ignored if automatic tax is enabled on the store.

## Errors

### 404 Not Found Error

The requested resource was not found.

- `any`

## Types

### billingAddress_Put

- `zip` (string, required) — The billing address must include the ZIP code. The ZIP code must be two or more characters.
- `first_name` (string, optional)
- `last_name` (string, optional)
- `company` (string, optional)
- `street_1` (string, optional)
- `street_2` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `country` (string, optional)
- `country_iso2` (string, optional)
- `phone` (string, optional)
- `email` (string, optional)
- `form_fields` (list of formFields, optional)

### orderConsignment_Put

- `pickups` (list of pickupConsignment_Put, optional)

### OrderPutPaymentProviderId

The external Transaction ID/Payment ID within this order’s payment provider (if a payment provider was used).

### OrderPutProductsItems

### OrderPutShippingAddressesItems

Shipping Address properties common to all requests and responses.

- `id` (integer, optional)
- `first_name` (string, optional)
- `last_name` (string, optional)
- `company` (string, optional)
- `street_1` (string, optional) — Street address (first line).
- `street_2` (string, optional) — Street address (second line).
- `city` (string, optional)
- `state` (string, optional)
- `zip` (string, optional) — Zip or postal code, as a string.
- `country` (string, optional)
- `country_iso2` (string, optional) — 2-letter ISO Alpha-2 code for the country.
- `phone` (string, optional) — Recipient’s telephone number.
- `email` (string, optional) — Recipient’s email address.
- `shipping_method` (string, optional) — Text code identifying the BigCommerce shipping module selected by the customer.
- `form_fields` (list of formFields, optional)

### orderFees_Put

- `id` (integer, optional) — The unique numeric identifier of the fees object.
- `type` (enum, optional) — The type of the fee.
  - Allowed values: `custom_fee`
- `display_name_customer` (string, optional) — The display name of the fee targeting customers.
- `display_name_merchant` (string, optional) — The display name of the fee shown to the merchant in the control panel. NOTE - At least one of the following fields (display_name_customer, display_name_merchant) must be included in the request.
- `source` (string, optional) — The source of the request.
- `cost_ex_tax` (OrderFeesPutCostExTax, optional) — The fee cost value excluding tax. (Float, Float-As-String, Integer)
- `cost_inc_tax` (OrderFeesPutCostIncTax, optional) — The fee cost value including tax. (Float, Float-As-String, Integer)
- `cost_tax` (OrderFeesPutCostTax, optional) — The tax amount on the fee cost. (Float, Float-As-String, Integer) NOTE - At least two of the following fields (cost_ex_tax, cost_inc_tax, and cost_tax) must be included in the request.
- `tax_class_id` (integer, optional, nullable) — A unique numeric identifier for the tax class. If not provided or null, the default fee tax class from the control panel is used.

### billingAddress_Resp

- `zip` (string, required) — The billing address must include the ZIP code. The ZIP code must be two or more characters.
- `first_name` (string, optional)
- `last_name` (string, optional)
- `company` (string, optional)
- `street_1` (string, optional)
- `street_2` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `country` (string, optional)
- `country_iso2` (string, optional)
- `phone` (string, optional)
- `email` (string, optional)
- `form_fields` (list of formFields, optional)

### OrderRespOnlyConsignments

### coupons_Resource

- `url` (string, optional) — URL of the coupons for API requests.
- `resource` (string, optional) — Resource of the coupons.

### OrderRespOnlyFees

### OrderSharedPaymentProviderId

The external Transaction ID/Payment ID within this order’s payment provider (if a payment provider was used).

### products_Resource

- `url` (string, optional)
- `resource` (string, optional)

### shippingAddresses_Resource

- `url` (string, optional) — URL of the shipping address for API requests.
- `resource` (string, optional)

### formFields

- `name` (string, optional) — The form field name.
- `value` (FormFieldsValue, optional) — The form field value.

### pickupConsignment_Put

- `id` (integer, required) — ID of the pickup consignment to update.
- `collection_instructions` (string, optional) — A message for shoppers explaining how to collect their pickup order.
- `collection_time_description` (string, optional) — A message for shoppers indicating the estimated time their pickup order will be ready for collection.
- `line_items` (list of orderProduct_Put, optional)
- `location` (pickupConsignmentLocation_Put, optional)
- `pickup_method_display_name` (string, optional) — A name for the pickup method that can be displayed to shoppers.
- `pickup_method_id` (integer, optional) — ID of the pickup method.

### orderCatalogProduct_Put

**Usage notes** To `add` a product to an existing order, don't include `id` in the payload. When adding a product with variants, `product_options` are required. To `update` an order product line, `id` is required. The payload should only contain the fields that need to be updated. The fields that you omit will not be changed. Note the following constraints and default field values: - `xxx` and `xxx_customer` always hold the same value. Updating either `xxx` or `xxx_customer` will change the value of both fields. - If both fields `xxx` and `xxx_customer` are present, they must have same value. - Empty strings `''` and `null` are invalid for `xxx`, `xxx_customer`, and `xxx_merchant`. - When updating an existing order product, if you omit `xxx_merchant`, it will not be changed. - When updating an existing order product, if you omit both `xxx` and `xxx_customer`, they will not be changed. - When adding a product, if you omit `xxx_merchant`, or both `xxx` and `xxx_customer`, they will default to the catalog value.

- `id` (integer, optional) — The order product `id`. To add a product to an existing order, donʼt include `id` in the payload. `id` is required when updating an order product.
- `name` (string, optional) — Alias for `name_customer`. The product name that is shown to customer in storefront. `xxx` and `xxx_customer` always hold the same value, updating either `xxx` or `xxx_customer` will change value for both of those fields.
- `name_customer` (string, optional) — The product name that is shown to customer in storefront. `xxx` and `xxx_customer` always hold the same value, updating either `xxx` or `xxx_customer` will change value for both of those fields.
- `name_merchant` (string, optional) — The product name that is shown to the merchant in the control panel.
- `price_ex_tax` (double, optional)
- `price_inc_tax` (double, optional)
- `product_id` (integer, optional)
- `product_options` (list of OrderCatalogProductPostProductOptionsItems, optional) — List of product variant options and modifiers. `product_options` are required when adding a product with variants and not specifying the `variant_id`, or when products have mandatory modifiers.
- `quantity` (integer, optional)
- `quantity_backordered` (integer, optional) — The number of units in this line item that are backordered. Requires `quantity` in the same product entry. Only stores with backorders enabled store this value; other stores return a 400 error if this field included in request payload.
- `upc` (string, optional)
- `variant_id` (integer, optional) — Products `variant_id`. PUT or POST. This field is not available for custom products.
- `wrapping_cost_ex_tax` (double, optional) — The total wrapping cost for the line item, excluding tax. When provided, this value should equal the per-unit wrapping cost times `quantity`. The value can't be negative.
- `wrapping_cost_inc_tax` (double, optional) — The total wrapping cost for the line item, including tax. When provided, this value should equal the per-unit wrapping cost times `quantity`. The value can't be negative.
- `wrapping_id` (integer, optional) — ID of the gift wrapping that will be used for this product. If provided, then `wrapping_cost_ex_tax` and `wrapping_cost_inc_tax` are required. When updating an order product line item, if `wrapping_id` is set to `0` and no other wrapping fields are provided,then the wrapping will be removed from the order product.
- `wrapping_message` (string, optional)
- `wrapping_name` (string, optional) — If the `wrapping_id` is provided, this field will populate with the name of the gift wrapping that is to be used.

### orderCustomProduct_Put

**Usage notes:** To `add` a custom product to an existing order, don't include `id` in the payload. You must provide a non-empty value for at least one of these fields: `name`, `name_customer`, or `name_merchant`. To `update` an order product line, `id` is required. The payload should only contain the fields that need to be updated. You cannot change omitted fields. Note the following constraints and default field values: - Empty strings `''` and `null` are invalid for `xxx`, `xxx_customer`, and `xxx_merchant`. - `name` and `name_customer` always hold the same value; updating either `name` or `name_customer` will change the value for both of those fields. - If both fields `name` and `name_customer` are present, they must have the same value. - When updating an existing order product, if you omit both fields `name` and `name_customer` from the request, they will not be updated. - When updating an existing order product, if you omit `name_merchant` from the request, it will not be updated. - When adding a product, if you omit `name_merchant`, it will be set to the value of `name` (or `name_customer`). - When adding a new product to an existing order, if you omit both fields `name` and `name_customer`, they will be set to the value of `name_merchant`.

- `name` (string, required) — Alias for name_customer. The product name that is shown to customer in storefront.
- `quantity` (integer, required)
- `price_ex_tax` (double, required)
- `price_inc_tax` (double, required)
- `name_customer` (string, optional) — The product name that is shown to customer in storefront.
- `name_merchant` (string, optional) — The product name that is shown to the merchant in the control panel.
- `sku` (string, optional)
- `upc` (string, optional)
- `id` (integer, optional) — ID of the product line.

### orderRemoveProduct_Put

- `id` (integer, optional) — The `id` returned from a request to the [List order products](/developer/api-reference/rest/admin/management/orders/order-products/get-order-products) or the [Get an order product](/developer/api-reference/rest/admin/management/orders/order-products/get-order-product) endpoint.
- `product_id` (integer, optional) — The numeric ID of the product.
- `quantity` (enum, optional) — Set to `0` to remove the product from the order. The line item stays on the order with a quantity of `0` and no longer counts toward the order totals.
  - Allowed values: `0`
- `product_options` (list of OrderRemoveProductPutProductOptionsItems, optional) — List of product variant options and modifiers. `product_options` are required when removing a product with variants and not specifying the `variant_id`, or when products have mandatory modifiers.

### OrderFeesPutCostExTax

The fee cost value excluding tax. (Float, Float-As-String, Integer)

### OrderFeesPutCostIncTax

The fee cost value including tax. (Float, Float-As-String, Integer)

### OrderFeesPutCostTax

The tax amount on the fee cost. (Float, Float-As-String, Integer) NOTE - At least two of the following fields (cost_ex_tax, cost_inc_tax, and cost_tax) must be included in the request.

### orderConsignments_Resource

- `url` (string, optional) — URL where you can use a GET request to get the order consignments.
- `resource` (string, optional) — Path where you can use a GET request to get the order consignments.

### orderConsignment_Get

- `pickups` (list of pickupConsignment_Get, optional) — Pickup consignments.
- `shipping` (list of shippingConsignment_Get, optional) — Shipping consignments.
- `downloads` (list of digitalConsignment_Get, optional) — Digital consignments for products that are downloaded.
- `email` (OrderConsignmentGetEmail, optional) — Email consignments for gift certificates.

### orderFees_Resource

- `url` (string, optional) — URL where you can use a GET request to get the order fees.
- `resource` (string, optional) — Path where you can use a GET request to get the order fees.

### FormFieldsValue

The form field value.

### orderProduct_Put

### pickupConsignmentLocation_Put

- `address_line_1` (string, optional) — Street address (first line).
- `address_line_2` (string, optional) — Street address (second line).
- `city` (string, optional)
- `code` (string, optional) — The code of the pickup location.
- `country_alpha2` (string, optional) — 2-letter ISO Alpha-2 code for the country.
- `email` (string, optional) — Pickup locationʼs email address.
- `name` (string, optional) — The name of the pickup location.
- `phone` (string, optional) — Pickup locationʼs phone number.
- `postal_code` (string, optional)
- `state` (string, optional)

### OrderCatalogProductPostProductOptionsItems

- `id` (integer, optional) — Numeric ID of an option applied to the product from a list of options available to the product. This field has the same value as `product_option_id` when [retrieving products in an order](/developer/api-reference/rest/admin/management/orders/order-products/get-order-products).
- `value` (string, optional) — Depending on the option type, value can be one of the following: - The variant option value id or the modifier value id for modifier types with a list of defined values, such as drop down or checkbox modifiers. - The modifier value for modifier types without a list of defined values, such as text field or date field modifiers. Notes: - The API does not currently support the following option types: - File upload - Pick list - For date modifiers use either the `YYYY-MM-DDThh:mm:ss±hh:mm` or the `YYYY-MM-DD` ISO-8601 formats. The date field modifier values are saved and returned as timestamps. For values entered using the YYYY-MM-DD format, the store timezone is used when creating the timestamp. - For multi-line text field modifiers, use the `\n` characters for separating the lines.
- `display_name` (string, optional) — Alias for display_name_customer. The product option name that is shown to customer in storefront. `xxx` and `xxx_customer` always hold the same value, updating either `xxx` or `xxx_customer` will change value for both of those fields.
- `display_name_customer` (string, optional) — The product option name that is shown to customer in storefront. `xxx` and `xxx_customer` always hold the same value, updating either `xxx` or `xxx_customer` will change value for both of those fields.
- `display_name_merchant` (string, optional) — The product option name that is shown to the merchant in the control panel.
- `display_value` (string, optional) — Alias for display_value_customer. The product option value that is shown to customer in storefront. `xxx` and `xxx_customer` always hold the same value, updating either `xxx` or `xxx_customer` will change value for both of those fields.
- `display_value_merchant` (string, optional) — The product option value that is shown to the merchant in the control panel.
- `display_value_customer` (string, optional) — The product option value that is shown to a customer in storefront.`xxx` and `xxx_customer` always hold the same value, updating either `xxx` or `xxx_customer` will change value for both of those fields.

### OrderRemoveProductPutProductOptionsItems

- `id` (integer, optional) — The ID of the product option.
- `value` (string, optional) — The value of the product option. For variant options, this is the option value ID.

### pickupConsignment_Get

- `collection_instructions` (string, optional) — A message for shoppers explaining how to collect their pickup order.
- `collection_time_description` (string, optional) — A message for shoppers indicating the estimated time their pickup order will be ready for collection.
- `id` (integer, optional) — The ID of the pickup consignment to update.
- `line_items` (PickupConsignmentGetLineItems, optional)
- `location` (pickupConsignmentLocation_Get, optional)
- `pickup_method_display_name` (string, optional) — A name for the pickup method that can be displayed to shoppers.
- `pickup_method_id` (integer, optional) — ID of the pickup method.

### shippingConsignment_Get

- `base_cost` (double, optional) — The base shipping cost value.
- `base_handling_cost` (double, optional) — The base handling charge. The value can't be negative.
- `city` (string, optional)
- `company` (string, optional)
- `cost_ex_tax` (double, optional) — The shipping cost value excluding tax.
- `cost_inc_tax` (double, optional) — The shipping cost value including tax.
- `cost_tax` (double, optional) — The tax amount on the shipping cost.
- `cost_tax_class_id` (integer, optional) — The ID of the tax class applied to the shipping cost. Ignored if automatic tax is enabled.
- `country` (string, optional)
- `country_iso2` (string, optional) — 2-letter ISO Alpha-2 code for the country.
- `email` (string, optional) — Recipient’s email address.
- `first_name` (string, optional)
- `form_fields` (list of formFields, optional)
- `handling_cost_ex_tax` (double, optional) — The handling charge, excluding tax. The value can't be negative.
- `handling_cost_inc_tax` (double, optional) — The handling charge, including tax. The value can't be negative.
- `handling_cost_tax` (double, optional)
- `handling_cost_tax_class_id` (integer, optional) — The ID of the tax class applied to the handling charge. Ignored if automatic tax is enabled.
- `id` (integer, optional) — ID of the shipping consignment.
- `items_shipped` (double, optional) — The number of items that have been shipped.
- `items_total` (double, optional) — The total number of items in the order.
- `last_name` (string, optional)
- `line_items` (ShippingConsignmentGetLineItems, optional)
- `phone` (string, optional) — Recipient’s telephone number.
- `shipping_method` (string, optional) — Text identifying the BigCommerce shipping module selected by the customer.
- `shipping_quotes` (shippingQuotesConsignment_Resource, optional)
- `shipping_zone_id` (double, optional) — The numeric ID of the shipping zone.
- `shipping_zone_name` (string, optional) — The name of the shipping zone.
- `state` (string, optional)
- `street_1` (string, optional) — Street address (first line).
- `street_2` (string, optional) — Street address (second line).
- `zip` (string, optional) — Zip or postal code, as a string.

### digitalConsignment_Get

- `recipient_email` (string, optional) — The recipient email of the digital consignment.
- `line_items` (DigitalConsignmentGetLineItems, optional)

### OrderConsignmentGetEmail

Email consignments for gift certificates.

- `gift_certificates` (list of giftCertificateConsignment_Get, optional)

### PickupConsignmentGetLineItems

### pickupConsignmentLocation_Get

- `address_line_1` (string, optional) — Street address (first line).
- `address_line_2` (string, optional) — Street address (second line).
- `city` (string, optional)
- `code` (string, optional) — The code of the pickup location.
- `country_alpha2` (string, optional) — 2-letter ISO Alpha-2 code for the country.
- `email` (string, optional) — Pickup locationʼs email address.
- `id` (integer, optional) — ID of the location.
- `name` (string, optional) — The name of the pickup location.
- `phone` (string, optional) — Pickup locationʼs phone number.
- `postal_code` (string, optional)
- `state` (string, optional)

### ShippingConsignmentGetLineItems

### shippingQuotesConsignment_Resource

- `url` (string, optional) — URL where you can use a GET request to get the shipping quotes for the order consignment.
- `resource` (string, optional) — Path where you can use a GET request to get the shipping quotes for the order consignment.

### DigitalConsignmentGetLineItems

### giftCertificateConsignment_Get

- `recipient_email` (string, optional) — The recipient email of the gift certificate.
- `line_items` (GiftCertificateConsignmentGetLineItems, optional)

### GiftCertificateConsignmentGetLineItems

## Examples

### Order

**Request**

```json
{
  "billing_address": {
    "zip": "78751",
    "first_name": "Jane",
    "last_name": "Doe",
    "street_1": "123 Main Street",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "email": "janedoe@example.com"
  },
  "customer_id": 11,
  "products": [
    {
      "name": "BigCommerce Poster",
      "price_ex_tax": 10,
      "price_inc_tax": 10.98,
      "quantity": 1
    },
    {
      "name": "BigCommerce Coffee Mug",
      "price_ex_tax": 45,
      "price_inc_tax": 50,
      "quantity": 1
    },
    {
      "product_id": 184,
      "product_options": [
        {
          "id": 200,
          "value": "180"
        },
        {
          "id": 230,
          "value": "192"
        }
      ],
      "quantity": 1
    }
  ],
  "shipping_addresses": [
    {
      "first_name": "Trish",
      "last_name": "Test",
      "company": "Acme Pty Ltd",
      "street_1": "666 Sussex St",
      "city": "Austin",
      "state": "Texas",
      "zip": "78751",
      "country": "United States",
      "country_iso2": "US",
      "email": "elsie@example.com"
    }
  ],
  "status_id": 0,
  "customer_locale": "en",
  "fees": [
    {
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee",
      "source": "AA",
      "cost_ex_tax": 12.3,
      "cost_inc_tax": 12.3,
      "tax_class_id": 22
    },
    {
      "id": 2,
      "type": "custom_fee",
      "display_name_customer": "B Fee",
      "source": "AA",
      "cost_ex_tax": 8,
      "cost_inc_tax": 12
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Order
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = {
    "billing_address": {
        "zip": "78751",
        "first_name": "Jane",
        "last_name": "Doe",
        "street_1": "123 Main Street",
        "city": "Austin",
        "state": "Texas",
        "country": "United States",
        "country_iso2": "US",
        "email": "janedoe@example.com"
    },
    "customer_id": 11,
    "products": [
        {
            "name": "BigCommerce Poster",
            "price_ex_tax": 10,
            "price_inc_tax": 10.98,
            "quantity": 1
        },
        {
            "name": "BigCommerce Coffee Mug",
            "price_ex_tax": 45,
            "price_inc_tax": 50,
            "quantity": 1
        },
        {
            "product_id": 184,
            "product_options": [
                {
                    "id": 200,
                    "value": "180"
                },
                {
                    "id": 230,
                    "value": "192"
                }
            ],
            "quantity": 1
        }
    ],
    "shipping_addresses": [
        {
            "first_name": "Trish",
            "last_name": "Test",
            "company": "Acme Pty Ltd",
            "street_1": "666 Sussex St",
            "city": "Austin",
            "state": "Texas",
            "zip": "78751",
            "country": "United States",
            "country_iso2": "US",
            "email": "elsie@example.com"
        }
    ],
    "status_id": 0,
    "customer_locale": "en",
    "fees": [
        {
            "id": 1,
            "type": "custom_fee",
            "display_name_customer": "A Fee",
            "source": "AA",
            "cost_ex_tax": 12.3,
            "cost_inc_tax": 12.3,
            "tax_class_id": 22
        },
        {
            "id": 2,
            "type": "custom_fee",
            "display_name_customer": "B Fee",
            "source": "AA",
            "cost_ex_tax": 8,
            "cost_inc_tax": 12
        }
    ]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Order
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"billing_address":{"zip":"78751","first_name":"Jane","last_name":"Doe","street_1":"123 Main Street","city":"Austin","state":"Texas","country":"United States","country_iso2":"US","email":"janedoe@example.com"},"customer_id":11,"products":[{"name":"BigCommerce Poster","price_ex_tax":10,"price_inc_tax":10.98,"quantity":1},{"name":"BigCommerce Coffee Mug","price_ex_tax":45,"price_inc_tax":50,"quantity":1},{"product_id":184,"product_options":[{"id":200,"value":"180"},{"id":230,"value":"192"}],"quantity":1}],"shipping_addresses":[{"first_name":"Trish","last_name":"Test","company":"Acme Pty Ltd","street_1":"666 Sussex St","city":"Austin","state":"Texas","zip":"78751","country":"United States","country_iso2":"US","email":"elsie@example.com"}],"status_id":0,"customer_locale":"en","fees":[{"id":1,"type":"custom_fee","display_name_customer":"A Fee","source":"AA","cost_ex_tax":12.3,"cost_inc_tax":12.3,"tax_class_id":22},{"id":2,"type":"custom_fee","display_name_customer":"B Fee","source":"AA","cost_ex_tax":8,"cost_inc_tax":12}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Order
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"billing_address\": {\n    \"zip\": \"78751\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\",\n    \"street_1\": \"123 Main Street\",\n    \"city\": \"Austin\",\n    \"state\": \"Texas\",\n    \"country\": \"United States\",\n    \"country_iso2\": \"US\",\n    \"email\": \"janedoe@example.com\"\n  },\n  \"customer_id\": 11,\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Poster\",\n      \"price_ex_tax\": 10,\n      \"price_inc_tax\": 10.98,\n      \"quantity\": 1\n    },\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 45,\n      \"price_inc_tax\": 50,\n      \"quantity\": 1\n    },\n    {\n      \"product_id\": 184,\n      \"product_options\": [\n        {\n          \"id\": 200,\n          \"value\": \"180\"\n        },\n        {\n          \"id\": 230,\n          \"value\": \"192\"\n        }\n      ],\n      \"quantity\": 1\n    }\n  ],\n  \"shipping_addresses\": [\n    {\n      \"first_name\": \"Trish\",\n      \"last_name\": \"Test\",\n      \"company\": \"Acme Pty Ltd\",\n      \"street_1\": \"666 Sussex St\",\n      \"city\": \"Austin\",\n      \"state\": \"Texas\",\n      \"zip\": \"78751\",\n      \"country\": \"United States\",\n      \"country_iso2\": \"US\",\n      \"email\": \"elsie@example.com\"\n    }\n  ],\n  \"status_id\": 0,\n  \"customer_locale\": \"en\",\n  \"fees\": [\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 12.3,\n      \"cost_inc_tax\": 12.3,\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 8,\n      \"cost_inc_tax\": 12\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Order
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"billing_address\": {\n    \"zip\": \"78751\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\",\n    \"street_1\": \"123 Main Street\",\n    \"city\": \"Austin\",\n    \"state\": \"Texas\",\n    \"country\": \"United States\",\n    \"country_iso2\": \"US\",\n    \"email\": \"janedoe@example.com\"\n  },\n  \"customer_id\": 11,\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Poster\",\n      \"price_ex_tax\": 10,\n      \"price_inc_tax\": 10.98,\n      \"quantity\": 1\n    },\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 45,\n      \"price_inc_tax\": 50,\n      \"quantity\": 1\n    },\n    {\n      \"product_id\": 184,\n      \"product_options\": [\n        {\n          \"id\": 200,\n          \"value\": \"180\"\n        },\n        {\n          \"id\": 230,\n          \"value\": \"192\"\n        }\n      ],\n      \"quantity\": 1\n    }\n  ],\n  \"shipping_addresses\": [\n    {\n      \"first_name\": \"Trish\",\n      \"last_name\": \"Test\",\n      \"company\": \"Acme Pty Ltd\",\n      \"street_1\": \"666 Sussex St\",\n      \"city\": \"Austin\",\n      \"state\": \"Texas\",\n      \"zip\": \"78751\",\n      \"country\": \"United States\",\n      \"country_iso2\": \"US\",\n      \"email\": \"elsie@example.com\"\n    }\n  ],\n  \"status_id\": 0,\n  \"customer_locale\": \"en\",\n  \"fees\": [\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 12.3,\n      \"cost_inc_tax\": 12.3,\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 8,\n      \"cost_inc_tax\": 12\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Order
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"billing_address\": {\n    \"zip\": \"78751\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\",\n    \"street_1\": \"123 Main Street\",\n    \"city\": \"Austin\",\n    \"state\": \"Texas\",\n    \"country\": \"United States\",\n    \"country_iso2\": \"US\",\n    \"email\": \"janedoe@example.com\"\n  },\n  \"customer_id\": 11,\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Poster\",\n      \"price_ex_tax\": 10,\n      \"price_inc_tax\": 10.98,\n      \"quantity\": 1\n    },\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 45,\n      \"price_inc_tax\": 50,\n      \"quantity\": 1\n    },\n    {\n      \"product_id\": 184,\n      \"product_options\": [\n        {\n          \"id\": 200,\n          \"value\": \"180\"\n        },\n        {\n          \"id\": 230,\n          \"value\": \"192\"\n        }\n      ],\n      \"quantity\": 1\n    }\n  ],\n  \"shipping_addresses\": [\n    {\n      \"first_name\": \"Trish\",\n      \"last_name\": \"Test\",\n      \"company\": \"Acme Pty Ltd\",\n      \"street_1\": \"666 Sussex St\",\n      \"city\": \"Austin\",\n      \"state\": \"Texas\",\n      \"zip\": \"78751\",\n      \"country\": \"United States\",\n      \"country_iso2\": \"US\",\n      \"email\": \"elsie@example.com\"\n    }\n  ],\n  \"status_id\": 0,\n  \"customer_locale\": \"en\",\n  \"fees\": [\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 12.3,\n      \"cost_inc_tax\": 12.3,\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 8,\n      \"cost_inc_tax\": 12\n    }\n  ]\n}")
  .asString();
```

```php Order
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "billing_address": {
    "zip": "78751",
    "first_name": "Jane",
    "last_name": "Doe",
    "street_1": "123 Main Street",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "email": "janedoe@example.com"
  },
  "customer_id": 11,
  "products": [
    {
      "name": "BigCommerce Poster",
      "price_ex_tax": 10,
      "price_inc_tax": 10.98,
      "quantity": 1
    },
    {
      "name": "BigCommerce Coffee Mug",
      "price_ex_tax": 45,
      "price_inc_tax": 50,
      "quantity": 1
    },
    {
      "product_id": 184,
      "product_options": [
        {
          "id": 200,
          "value": "180"
        },
        {
          "id": 230,
          "value": "192"
        }
      ],
      "quantity": 1
    }
  ],
  "shipping_addresses": [
    {
      "first_name": "Trish",
      "last_name": "Test",
      "company": "Acme Pty Ltd",
      "street_1": "666 Sussex St",
      "city": "Austin",
      "state": "Texas",
      "zip": "78751",
      "country": "United States",
      "country_iso2": "US",
      "email": "elsie@example.com"
    }
  ],
  "status_id": 0,
  "customer_locale": "en",
  "fees": [
    {
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee",
      "source": "AA",
      "cost_ex_tax": 12.3,
      "cost_inc_tax": 12.3,
      "tax_class_id": 22
    },
    {
      "id": 2,
      "type": "custom_fee",
      "display_name_customer": "B Fee",
      "source": "AA",
      "cost_ex_tax": 8,
      "cost_inc_tax": 12
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Order
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"billing_address\": {\n    \"zip\": \"78751\",\n    \"first_name\": \"Jane\",\n    \"last_name\": \"Doe\",\n    \"street_1\": \"123 Main Street\",\n    \"city\": \"Austin\",\n    \"state\": \"Texas\",\n    \"country\": \"United States\",\n    \"country_iso2\": \"US\",\n    \"email\": \"janedoe@example.com\"\n  },\n  \"customer_id\": 11,\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Poster\",\n      \"price_ex_tax\": 10,\n      \"price_inc_tax\": 10.98,\n      \"quantity\": 1\n    },\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 45,\n      \"price_inc_tax\": 50,\n      \"quantity\": 1\n    },\n    {\n      \"product_id\": 184,\n      \"product_options\": [\n        {\n          \"id\": 200,\n          \"value\": \"180\"\n        },\n        {\n          \"id\": 230,\n          \"value\": \"192\"\n        }\n      ],\n      \"quantity\": 1\n    }\n  ],\n  \"shipping_addresses\": [\n    {\n      \"first_name\": \"Trish\",\n      \"last_name\": \"Test\",\n      \"company\": \"Acme Pty Ltd\",\n      \"street_1\": \"666 Sussex St\",\n      \"city\": \"Austin\",\n      \"state\": \"Texas\",\n      \"zip\": \"78751\",\n      \"country\": \"United States\",\n      \"country_iso2\": \"US\",\n      \"email\": \"elsie@example.com\"\n    }\n  ],\n  \"status_id\": 0,\n  \"customer_locale\": \"en\",\n  \"fees\": [\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 12.3,\n      \"cost_inc_tax\": 12.3,\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": 8,\n      \"cost_inc_tax\": 12\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Order
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "billing_address": [
    "zip": "78751",
    "first_name": "Jane",
    "last_name": "Doe",
    "street_1": "123 Main Street",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "email": "janedoe@example.com"
  ],
  "customer_id": 11,
  "products": [
    [
      "name": "BigCommerce Poster",
      "price_ex_tax": 10,
      "price_inc_tax": 10.98,
      "quantity": 1
    ],
    [
      "name": "BigCommerce Coffee Mug",
      "price_ex_tax": 45,
      "price_inc_tax": 50,
      "quantity": 1
    ],
    [
      "product_id": 184,
      "product_options": [
        [
          "id": 200,
          "value": "180"
        ],
        [
          "id": 230,
          "value": "192"
        ]
      ],
      "quantity": 1
    ]
  ],
  "shipping_addresses": [
    [
      "first_name": "Trish",
      "last_name": "Test",
      "company": "Acme Pty Ltd",
      "street_1": "666 Sussex St",
      "city": "Austin",
      "state": "Texas",
      "zip": "78751",
      "country": "United States",
      "country_iso2": "US",
      "email": "elsie@example.com"
    ]
  ],
  "status_id": 0,
  "customer_locale": "en",
  "fees": [
    [
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee",
      "source": "AA",
      "cost_ex_tax": 12.3,
      "cost_inc_tax": 12.3,
      "tax_class_id": 22
    ],
    [
      "id": 2,
      "type": "custom_fee",
      "display_name_customer": "B Fee",
      "source": "AA",
      "cost_ex_tax": 8,
      "cost_inc_tax": 12
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Order with multiple items

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0",
  "base_shipping_cost": "8",
  "base_wrapping_cost": "0",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@email.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "8b84f622-faf1-4c10-887b-f5dff2f9eaf4",
  "channel_id": 1,
  "coupon_discount": "0",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/247/coupons",
    "resource": "/orders/247/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "Custom Journal Added",
  "date_created": "Thu, 20 Jun 2019 16:07:08 +0000",
  "date_modified": "Thu, 20 Jun 2019 16:07:08 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "0",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": "",
  "geoip_country": "United States",
  "geoip_country_iso2": "US",
  "gift_certificate_amount": "0",
  "handling_cost_ex_tax": "0",
  "handling_cost_inc_tax": "0",
  "handling_cost_tax": "0",
  "handling_cost_tax_class_id": 0,
  "id": 247,
  "ip_address": "70.112.53.67",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 11,
  "order_is_digital": false,
  "order_source": "manual",
  "payment_method": "Test Payment Gateway",
  "payment_provider_id": "",
  "payment_status": "captured",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/247/products",
    "resource": "/orders/247/products"
  },
  "refunded_amount": "0",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/247/shippingaddresses",
    "resource": "/orders/247/shippingaddresses"
  },
  "shipping_cost_ex_tax": "7.39",
  "shipping_cost_inc_tax": "8",
  "shipping_cost_tax": "0.61",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "BIN-45",
  "status": "Awaiting Fulfillment",
  "status_id": 11,
  "store_credit_amount": "0",
  "store_default_currency_code": "USD",
  "store_default_to_transactional_exchange_rate": "1",
  "subtotal_ex_tax": "924.47",
  "subtotal_inc_tax": "1000.74",
  "subtotal_tax": "76.27",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "931.86",
  "total_inc_tax": "1008.74",
  "total_tax": "76.88",
  "wrapping_cost_ex_tax": "0",
  "wrapping_cost_inc_tax": "0",
  "wrapping_cost_tax": "0",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": {},
  "custom_status": "Awaiting Fulfillment"
}
```

**SDK Code**

```python Order with multiple items
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>"
}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript Order with multiple items
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {Accept: 'application/json', 'X-Auth-Token': '<apiKey>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Order with multiple items
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Order with multiple items
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Order with multiple items
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

```php Order with multiple items
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'headers' => [
    'Accept' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Order with multiple items
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Order with multiple items
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Add an existing catalog product

**Request**

```json
{
  "products": [
    {
      "price_ex_tax": 10.12,
      "price_inc_tax": 12.45,
      "product_id": 123,
      "product_options": [
        {
          "id": 56,
          "value": "12"
        }
      ],
      "quantity": 5
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Add an existing catalog product
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "products": [
        {
            "price_ex_tax": 10.12,
            "price_inc_tax": 12.45,
            "product_id": 123,
            "product_options": [
                {
                    "id": 56,
                    "value": "12"
                }
            ],
            "quantity": 5
        }
    ] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Add an existing catalog product
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"products":[{"price_ex_tax":10.12,"price_inc_tax":12.45,"product_id":123,"product_options":[{"id":56,"value":"12"}],"quantity":5}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Add an existing catalog product
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"products\": [\n    {\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"product_id\": 123,\n      \"product_options\": [\n        {\n          \"id\": 56,\n          \"value\": \"12\"\n        }\n      ],\n      \"quantity\": 5\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Add an existing catalog product
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"products\": [\n    {\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"product_id\": 123,\n      \"product_options\": [\n        {\n          \"id\": 56,\n          \"value\": \"12\"\n        }\n      ],\n      \"quantity\": 5\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Add an existing catalog product
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"products\": [\n    {\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"product_id\": 123,\n      \"product_options\": [\n        {\n          \"id\": 56,\n          \"value\": \"12\"\n        }\n      ],\n      \"quantity\": 5\n    }\n  ]\n}")
  .asString();
```

```php Add an existing catalog product
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "products": [
    {
      "price_ex_tax": 10.12,
      "price_inc_tax": 12.45,
      "product_id": 123,
      "product_options": [
        {
          "id": 56,
          "value": "12"
        }
      ],
      "quantity": 5
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Add an existing catalog product
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"products\": [\n    {\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"product_id\": 123,\n      \"product_options\": [\n        {\n          \"id\": 56,\n          \"value\": \"12\"\n        }\n      ],\n      \"quantity\": 5\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Add an existing catalog product
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["products": [
    [
      "price_ex_tax": 10.12,
      "price_inc_tax": 12.45,
      "product_id": 123,
      "product_options": [
        [
          "id": 56,
          "value": "12"
        ]
      ],
      "quantity": 5
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Adding a new product to order

**Request**

```json
{
  "products": [
    {
      "name": "BigCommerce Coffee Mug",
      "price_ex_tax": 10.12,
      "price_inc_tax": 12.45,
      "quantity": 1,
      "sku": "MUG-GRY"
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Adding a new product to order
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "products": [
        {
            "name": "BigCommerce Coffee Mug",
            "price_ex_tax": 10.12,
            "price_inc_tax": 12.45,
            "quantity": 1,
            "sku": "MUG-GRY"
        }
    ] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Adding a new product to order
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"products":[{"name":"BigCommerce Coffee Mug","price_ex_tax":10.12,"price_inc_tax":12.45,"quantity":1,"sku":"MUG-GRY"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Adding a new product to order
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"quantity\": 1,\n      \"sku\": \"MUG-GRY\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Adding a new product to order
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"quantity\": 1,\n      \"sku\": \"MUG-GRY\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Adding a new product to order
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"quantity\": 1,\n      \"sku\": \"MUG-GRY\"\n    }\n  ]\n}")
  .asString();
```

```php Adding a new product to order
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "products": [
    {
      "name": "BigCommerce Coffee Mug",
      "price_ex_tax": 10.12,
      "price_inc_tax": 12.45,
      "quantity": 1,
      "sku": "MUG-GRY"
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Adding a new product to order
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"products\": [\n    {\n      \"name\": \"BigCommerce Coffee Mug\",\n      \"price_ex_tax\": 10.12,\n      \"price_inc_tax\": 12.45,\n      \"quantity\": 1,\n      \"sku\": \"MUG-GRY\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Adding a new product to order
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["products": [
    [
      "name": "BigCommerce Coffee Mug",
      "price_ex_tax": 10.12,
      "price_inc_tax": 12.45,
      "quantity": 1,
      "sku": "MUG-GRY"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Removing a product from an order

**Request**

```json
{
  "products": [
    {
      "id": 117,
      "quantity": 0
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Removing a product from an order
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "products": [
        {
            "id": 117,
            "quantity": 0
        }
    ] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Removing a product from an order
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"products":[{"id":117,"quantity":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Removing a product from an order
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"products\": [\n    {\n      \"id\": 117,\n      \"quantity\": 0\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Removing a product from an order
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"products\": [\n    {\n      \"id\": 117,\n      \"quantity\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Removing a product from an order
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"products\": [\n    {\n      \"id\": 117,\n      \"quantity\": 0\n    }\n  ]\n}")
  .asString();
```

```php Removing a product from an order
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "products": [
    {
      "id": 117,
      "quantity": 0
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Removing a product from an order
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"products\": [\n    {\n      \"id\": 117,\n      \"quantity\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Removing a product from an order
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["products": [
    [
      "id": 117,
      "quantity": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Adding a new fee (no ID) while retaining existing fees (with ID)

**Request**

```json
{
  "fees": [
    {
      "type": "custom_fee",
      "display_name_customer": "C Fee",
      "source": "AA",
      "cost_ex_tax": "22.5000",
      "cost_inc_tax": "25.0000"
    },
    {
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee",
      "source": "AA",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "tax_class_id": 22
    },
    {
      "id": 2,
      "type": "custom_fee",
      "display_name_merchant": "B Fee",
      "source": "AA",
      "cost_ex_tax": "4.0000",
      "cost_tax": "8.0000",
      "tax_class_id": null
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Adding a new fee (no ID) while retaining existing fees (with ID)
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "fees": [
        {
            "type": "custom_fee",
            "display_name_customer": "C Fee",
            "source": "AA",
            "cost_ex_tax": "22.5000",
            "cost_inc_tax": "25.0000"
        },
        {
            "id": 1,
            "type": "custom_fee",
            "display_name_customer": "A Fee",
            "source": "AA",
            "cost_ex_tax": "12.3000",
            "cost_inc_tax": "12.3000",
            "tax_class_id": 22
        },
        {
            "id": 2,
            "type": "custom_fee",
            "display_name_merchant": "B Fee",
            "source": "AA",
            "cost_ex_tax": "4.0000",
            "cost_tax": "8.0000",
            "tax_class_id": None
        }
    ] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Adding a new fee (no ID) while retaining existing fees (with ID)
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"fees":[{"type":"custom_fee","display_name_customer":"C Fee","source":"AA","cost_ex_tax":"22.5000","cost_inc_tax":"25.0000"},{"id":1,"type":"custom_fee","display_name_customer":"A Fee","source":"AA","cost_ex_tax":"12.3000","cost_inc_tax":"12.3000","tax_class_id":22},{"id":2,"type":"custom_fee","display_name_merchant":"B Fee","source":"AA","cost_ex_tax":"4.0000","cost_tax":"8.0000","tax_class_id":null}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Adding a new fee (no ID) while retaining existing fees (with ID)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"fees\": [\n    {\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"22.5000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"12.3000\",\n      \"cost_inc_tax\": \"12.3000\",\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"4.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": null\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Adding a new fee (no ID) while retaining existing fees (with ID)
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fees\": [\n    {\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"22.5000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"12.3000\",\n      \"cost_inc_tax\": \"12.3000\",\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"4.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": null\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Adding a new fee (no ID) while retaining existing fees (with ID)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fees\": [\n    {\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"22.5000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"12.3000\",\n      \"cost_inc_tax\": \"12.3000\",\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"4.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": null\n    }\n  ]\n}")
  .asString();
```

```php Adding a new fee (no ID) while retaining existing fees (with ID)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "fees": [
    {
      "type": "custom_fee",
      "display_name_customer": "C Fee",
      "source": "AA",
      "cost_ex_tax": "22.5000",
      "cost_inc_tax": "25.0000"
    },
    {
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee",
      "source": "AA",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "tax_class_id": 22
    },
    {
      "id": 2,
      "type": "custom_fee",
      "display_name_merchant": "B Fee",
      "source": "AA",
      "cost_ex_tax": "4.0000",
      "cost_tax": "8.0000",
      "tax_class_id": null
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Adding a new fee (no ID) while retaining existing fees (with ID)
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fees\": [\n    {\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"22.5000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"12.3000\",\n      \"cost_inc_tax\": \"12.3000\",\n      \"tax_class_id\": 22\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"4.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": null\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Adding a new fee (no ID) while retaining existing fees (with ID)
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["fees": [
    [
      "type": "custom_fee",
      "display_name_customer": "C Fee",
      "source": "AA",
      "cost_ex_tax": "22.5000",
      "cost_inc_tax": "25.0000"
    ],
    [
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee",
      "source": "AA",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "tax_class_id": 22
    ],
    [
      "id": 2,
      "type": "custom_fee",
      "display_name_merchant": "B Fee",
      "source": "AA",
      "cost_ex_tax": "4.0000",
      "cost_tax": "8.0000",
      "tax_class_id": 
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Updating order fees (all fees provided with IDs and attributes)

**Request**

```json
{
  "fees": [
    {
      "id": 3,
      "type": "custom_fee",
      "display_name_customer": "C Fee Updated",
      "source": "AA",
      "cost_ex_tax": "20.0000",
      "cost_inc_tax": "25.0000"
    },
    {
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee Updated",
      "source": "AA",
      "cost_ex_tax": "10.0000",
      "cost_inc_tax": "15.0000",
      "tax_class_id": 1
    },
    {
      "id": 2,
      "type": "custom_fee",
      "display_name_merchant": "B Fee Updated",
      "source": "AA",
      "cost_ex_tax": "5.0000",
      "cost_tax": "8.0000",
      "tax_class_id": 2
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Updating order fees (all fees provided with IDs and attributes)
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "fees": [
        {
            "id": 3,
            "type": "custom_fee",
            "display_name_customer": "C Fee Updated",
            "source": "AA",
            "cost_ex_tax": "20.0000",
            "cost_inc_tax": "25.0000"
        },
        {
            "id": 1,
            "type": "custom_fee",
            "display_name_customer": "A Fee Updated",
            "source": "AA",
            "cost_ex_tax": "10.0000",
            "cost_inc_tax": "15.0000",
            "tax_class_id": 1
        },
        {
            "id": 2,
            "type": "custom_fee",
            "display_name_merchant": "B Fee Updated",
            "source": "AA",
            "cost_ex_tax": "5.0000",
            "cost_tax": "8.0000",
            "tax_class_id": 2
        }
    ] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Updating order fees (all fees provided with IDs and attributes)
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"fees":[{"id":3,"type":"custom_fee","display_name_customer":"C Fee Updated","source":"AA","cost_ex_tax":"20.0000","cost_inc_tax":"25.0000"},{"id":1,"type":"custom_fee","display_name_customer":"A Fee Updated","source":"AA","cost_ex_tax":"10.0000","cost_inc_tax":"15.0000","tax_class_id":1},{"id":2,"type":"custom_fee","display_name_merchant":"B Fee Updated","source":"AA","cost_ex_tax":"5.0000","cost_tax":"8.0000","tax_class_id":2}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Updating order fees (all fees provided with IDs and attributes)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"10.0000\",\n      \"cost_inc_tax\": \"15.0000\",\n      \"tax_class_id\": 1\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"5.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": 2\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Updating order fees (all fees provided with IDs and attributes)
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"10.0000\",\n      \"cost_inc_tax\": \"15.0000\",\n      \"tax_class_id\": 1\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"5.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": 2\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Updating order fees (all fees provided with IDs and attributes)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"10.0000\",\n      \"cost_inc_tax\": \"15.0000\",\n      \"tax_class_id\": 1\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"5.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": 2\n    }\n  ]\n}")
  .asString();
```

```php Updating order fees (all fees provided with IDs and attributes)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "fees": [
    {
      "id": 3,
      "type": "custom_fee",
      "display_name_customer": "C Fee Updated",
      "source": "AA",
      "cost_ex_tax": "20.0000",
      "cost_inc_tax": "25.0000"
    },
    {
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee Updated",
      "source": "AA",
      "cost_ex_tax": "10.0000",
      "cost_inc_tax": "15.0000",
      "tax_class_id": 1
    },
    {
      "id": 2,
      "type": "custom_fee",
      "display_name_merchant": "B Fee Updated",
      "source": "AA",
      "cost_ex_tax": "5.0000",
      "cost_tax": "8.0000",
      "tax_class_id": 2
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Updating order fees (all fees provided with IDs and attributes)
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    },\n    {\n      \"id\": 1,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"A Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"10.0000\",\n      \"cost_inc_tax\": \"15.0000\",\n      \"tax_class_id\": 1\n    },\n    {\n      \"id\": 2,\n      \"type\": \"custom_fee\",\n      \"display_name_merchant\": \"B Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"5.0000\",\n      \"cost_tax\": \"8.0000\",\n      \"tax_class_id\": 2\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Updating order fees (all fees provided with IDs and attributes)
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["fees": [
    [
      "id": 3,
      "type": "custom_fee",
      "display_name_customer": "C Fee Updated",
      "source": "AA",
      "cost_ex_tax": "20.0000",
      "cost_inc_tax": "25.0000"
    ],
    [
      "id": 1,
      "type": "custom_fee",
      "display_name_customer": "A Fee Updated",
      "source": "AA",
      "cost_ex_tax": "10.0000",
      "cost_inc_tax": "15.0000",
      "tax_class_id": 1
    ],
    [
      "id": 2,
      "type": "custom_fee",
      "display_name_merchant": "B Fee Updated",
      "source": "AA",
      "cost_ex_tax": "5.0000",
      "cost_tax": "8.0000",
      "tax_class_id": 2
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Deleting a fee from the order (fee missing from the payload will be deleted)

**Request**

```json
{
  "fees": [
    {
      "id": 3,
      "type": "custom_fee",
      "display_name_customer": "C Fee Updated",
      "source": "AA",
      "cost_ex_tax": "20.0000",
      "cost_inc_tax": "25.0000"
    }
  ]
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Deleting a fee from the order (fee missing from the payload will be deleted)
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "fees": [
        {
            "id": 3,
            "type": "custom_fee",
            "display_name_customer": "C Fee Updated",
            "source": "AA",
            "cost_ex_tax": "20.0000",
            "cost_inc_tax": "25.0000"
        }
    ] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Deleting a fee from the order (fee missing from the payload will be deleted)
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"fees":[{"id":3,"type":"custom_fee","display_name_customer":"C Fee Updated","source":"AA","cost_ex_tax":"20.0000","cost_inc_tax":"25.0000"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Deleting a fee from the order (fee missing from the payload will be deleted)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Deleting a fee from the order (fee missing from the payload will be deleted)
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Deleting a fee from the order (fee missing from the payload will be deleted)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    }\n  ]\n}")
  .asString();
```

```php Deleting a fee from the order (fee missing from the payload will be deleted)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "fees": [
    {
      "id": 3,
      "type": "custom_fee",
      "display_name_customer": "C Fee Updated",
      "source": "AA",
      "cost_ex_tax": "20.0000",
      "cost_inc_tax": "25.0000"
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Deleting a fee from the order (fee missing from the payload will be deleted)
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fees\": [\n    {\n      \"id\": 3,\n      \"type\": \"custom_fee\",\n      \"display_name_customer\": \"C Fee Updated\",\n      \"source\": \"AA\",\n      \"cost_ex_tax\": \"20.0000\",\n      \"cost_inc_tax\": \"25.0000\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Deleting a fee from the order (fee missing from the payload will be deleted)
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["fees": [
    [
      "id": 3,
      "type": "custom_fee",
      "display_name_customer": "C Fee Updated",
      "source": "AA",
      "cost_ex_tax": "20.0000",
      "cost_inc_tax": "25.0000"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Deleting all fees from the order

**Request**

```json
{
  "fees": []
}
```

**Response**

```json
{
  "backorder_shipping_expectation_message": null,
  "base_handling_cost": "0.0000",
  "base_shipping_cost": "12.0000",
  "base_wrapping_cost": "0.0000",
  "billing_address": {
    "zip": "78108",
    "first_name": "Jane",
    "last_name": "Doe",
    "company": "",
    "street_1": "555 East Street",
    "street_2": "",
    "city": "Austin",
    "state": "Texas",
    "country": "United States",
    "country_iso2": "US",
    "phone": "1234567890",
    "email": "janedoe@example.com",
    "form_fields": [
      {
        "name": "Delivery Instructions",
        "value": "Leave in backyard"
      }
    ]
  },
  "cart_id": "7e48f7ef-2e88-4817-aea4-b0ed01490114",
  "channel_id": 1,
  "coupon_discount": "5.0000",
  "coupons": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/coupons",
    "resource": "/orders/218/coupons"
  },
  "currency_code": "USD",
  "currency_exchange_rate": "1.0000000000",
  "currency_id": 1,
  "customer_id": 11,
  "customer_locale": "en",
  "customer_message": "",
  "date_created": "Tue, 05 Mar 2019 21:40:11 +0000",
  "date_modified": "Mon, 11 Mar 2019 15:17:25 +0000",
  "date_shipped": "",
  "default_currency_code": "USD",
  "default_currency_id": 1,
  "discount_amount": "5.0000",
  "ebay_order_id": "0",
  "external_id": null,
  "external_merchant_id": null,
  "external_order_id": "external-order-id",
  "external_source": null,
  "fees": [
    {
      "base_cost": "12.3000",
      "cost_ex_tax": "12.3000",
      "cost_inc_tax": "12.3000",
      "cost_tax": "0.0000",
      "display_name_customer": "A Fee",
      "display_name_merchant": "A Fee",
      "id": 1,
      "source": "AA",
      "tax_class_id": 22,
      "type": "custom_fee"
    },
    {
      "base_cost": "4.0000",
      "cost_ex_tax": "4.0000",
      "cost_inc_tax": "12.0000",
      "cost_tax": "8.0000",
      "display_name_customer": "B Fee",
      "display_name_merchant": "B Fee",
      "id": 2,
      "source": "AA",
      "tax_class_id": null,
      "type": "custom_fee"
    }
  ],
  "geoip_country": "",
  "geoip_country_iso2": "",
  "gift_certificate_amount": "0.0000",
  "handling_cost_ex_tax": "0.0000",
  "handling_cost_inc_tax": "0.0000",
  "handling_cost_tax": "0.0000",
  "handling_cost_tax_class_id": 0,
  "id": 218,
  "ip_address": "",
  "ip_address_v6": "",
  "is_email_opt_in": false,
  "is_tax_inclusive_pricing": false,
  "items_shipped": 0,
  "items_total": 4,
  "order_is_digital": false,
  "order_source": "external",
  "payment_method": "Cash",
  "payment_provider_id": "",
  "payment_status": "authorized",
  "products": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/products",
    "resource": "/orders/218/products"
  },
  "refunded_amount": "0.0000",
  "shipping_address_count": 1,
  "shipping_addresses": {
    "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/218/shippingaddresses",
    "resource": "/orders/218/shippingaddresses"
  },
  "shipping_cost_ex_tax": "11.0900",
  "shipping_cost_inc_tax": "12.0000",
  "shipping_cost_tax": "0.9100",
  "shipping_cost_tax_class_id": 0,
  "staff_notes": "",
  "status": "Awaiting Payment",
  "status_id": 7,
  "store_credit_amount": "0.0000",
  "store_default_currency_code": "",
  "store_default_to_transactional_exchange_rate": "1.0000000000",
  "subtotal_ex_tax": "62.6793",
  "subtotal_inc_tax": "67.8400",
  "subtotal_tax": "4.4000",
  "tax_provider_id": "BasicTaxProvider",
  "total_ex_tax": "64.5300",
  "total_inc_tax": "69.8400",
  "total_tax": "5.3100",
  "wrapping_cost_ex_tax": "0.0000",
  "wrapping_cost_inc_tax": "0.0000",
  "wrapping_cost_tax": "0.0000",
  "wrapping_cost_tax_class_id": 0,
  "credit_card_type": null,
  "custom_status": "Awaiting Payment"
}
```

**SDK Code**

```python Deleting all fees from the order
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

payload = { "fees": [] }
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Deleting all fees from the order
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"fees":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Deleting all fees from the order
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/1"

	payload := strings.NewReader("{\n  \"fees\": []\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Deleting all fees from the order
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"fees\": []\n}"

response = http.request(request)
puts response.read_body
```

```java Deleting all fees from the order
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.bigcommerce.com/stores/store_hash/v2/orders/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"fees\": []\n}")
  .asString();
```

```php Deleting all fees from the order
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/1', [
  'body' => '{
  "fees": []
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Deleting all fees from the order
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/1");
var request = new RestRequest(Method.PUT);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"fees\": []\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Deleting all fees from the order
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["fees": []] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/orders/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```