> 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 Shipping Method

PUT https://api.bigcommerce.com/stores/{store_hash}/v2/shipping/zones/{zone_id}/methods/{method_id}
Content-Type: application/json

Updates a *Shipping Method* in a zone. Real Time Carrier Connections are also supported by this endpoint.

**Read Only Fields**

* id

### Settings Objects

A shipping methodʼs `type` and `settings` properties can match one of the following models:

#### perorder Object – Properties

Object model for flat-rate shipping quotes per order.

| Property | Type   | Description          |
| -------- | ------ | -------------------- |
| rate     | number | Flat rate per order. |

Example response:

```json
{
  "name": "Flat Rate per Order",
  "type": "perorder",
  "settings": {
    "rate": 7
  }
},
```

#### peritem Object – Properties

Object model for flat-rate shipping quotes per item ordered.

| Property | Type   | Description         |
| -------- | ------ | ------------------- |
| rate     | number | Flat rate per item. |

Example response:

```json
{
  "name": "Flat Rate per Item",
  "type": "peritem",
  "settings": {
    "rate": 8
  }
},
```

#### weight Object – Properties

Object model for shipping quotes by weight.

| Property            | Type           | Description                                                                                                                                                                               |
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| default\_cost       | number \| null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null.                   |
| default\_cost\_type | string         | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`.                                                                                              |
| range               | number         | Array of [range](#range-object--properties) objects. The units for these ranges' `lower_limit` and `upper_limit` properties depend on the default units set in the storeʼs control panel. |

Example response:

```json
{
  "name": "Rate per Weight",
  "type": "weight",
  "settings": {
    "default_cost": 12,
    "default_cost_type": "fixed_amount",
    "range": [
      {
        "lower_limit": 0,
        "upper_limit": 20,
        "shipping_cost": 8
      },
      {
        "lower_limit": 20,
        "upper_limit": 40,
        "shipping_cost": 12
      }
    ]
  }
}
```

#### total Object – Properties

Object model for shipping quotes by orderʼs total value.

| Property            | Type           | Description                                                                                                                                                             |
| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| default\_cost       | number \| null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. |
| default\_cost\_type | string         | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`.                                                                            |
| range               | number         | Array of [range](#range-object--properties) objects. The units for these ranges' `lower_limit` and `upper_limit` properties are values in the storeʼs currency.         |

Example response:

This example sets free shipping above a certain order total:

```json
{
  "name": "Per Total or Free",
  "type": "total",
  "settings": {
    "default_cost": 12,
    "default_cost_type": "fixed_amount",
    "range": [
      {
        "lower_limit": 0,
        "upper_limit": 5,
        "shipping_cost": 5
      },
      {
        "lower_limit": 5,
        "upper_limit": 10,
        "shipping_cost": 8
      },
      {
        "lower_limit": 10,
        "upper_limit": 20,
        "shipping_cost": 10
      },
      {
        "lower_limit": 20,
        "upper_limit": 49.99,
        "shipping_cost": 15
      },
      {
        "lower_limit": 50,
        "upper_limit": 100000,
        "shipping_cost": 0
      }       
    ]
  }
}
```

#### Range Object – Properties

Object model to define ranges for shipping quotes. Units are defined in the parent object.

| Property       | Type   | Description                                                                    |
| -------------- | ------ | ------------------------------------------------------------------------------ |
| lower\_limit   | number | Lower limit for order total.                                                   |
| upper\_limit   | number | Upper limit for order total.                                                   |
| shipping\_cost | number | Shipping cost for orders whose total falls between the lower and upper limits. |

Example response:

```json
{
  "lower_limit": 0,
  "upper_limit": 20,
  "shipping_cost": 8
}
```

### Channels

Example request body:

```json
{
  "name": "Method associated to channels 1, 3",
  "type": "peritem",
  "settings": {
  "rate": 5
  },
  "channel_ids": [1, 3]
}
```

| Property     | Type  | Description                                                  |
| ------------ | ----- | ------------------------------------------------------------ |
| channel\_ids | array | Channels associated with the method as an array of integers. |

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/shipping/v2/shipping-method/update-shipping-method

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Information & Settings | modify | `store_v2_information` | | Information & Settings | read-only | `store_v2_information_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

- `zone_id` (integer, required) — ID of the shipping zone.
- `method_id` (integer, required) — ID of the shipping method within the shipping zone.
- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### 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 a shippingMethod_Base.

- `name` (string, optional) — Display name for shipping method.
- `type` (enum, optional)
  - Allowed values: `perorder`, `peritem`, `weight`, `total`, `auspost`, `canadapost`, `endicia`, `usps`, `fedex`, `royalmail`, `upsready`, `freeshipping`
- `settings` (ShippingMethodBaseSettings, optional) — Depends on the shipping method type. See the [supported settings object](#settings-objects).
- `enabled` (boolean, optional) — Whether or not this shipping zone method is enabled.
- `handling_fees` (ShippingMethodBaseHandlingFees, optional)
- `is_fallback` (boolean, optional) — Whether or not this shipping method is a fallback method used when advanced shipping rules are unavailable.
- `channel_ids` (list of integer, optional) — List of channels associated to a method. When creating a new method, all available channels are associated by default. (Optional)

## Response

### 200

OK

- `channel_ids` (list of integer, optional) — List of channels associated to a method. When creating a new method, all available channels are associated by default. (Optional)
- `enabled` (boolean, optional) — Whether or not this shipping zone method is enabled.
- `handling_fees` (ShippingMethodBaseHandlingFees, optional)
- `id` (integer, optional) — Shipping method ID. Read-only.
- `is_fallback` (boolean, optional) — Whether or not this shipping method is a fallback method used when advanced shipping rules are unavailable.
- `name` (string, optional) — Display name for shipping method.
- `settings` (ShippingMethodBaseSettings, optional) — Depends on the shipping method type. See the [supported settings object](#settings-objects).
- `type` (enum, optional)
  - Allowed values: `perorder`, `peritem`, `weight`, `total`, `auspost`, `canadapost`, `endicia`, `usps`, `fedex`, `royalmail`, `upsready`, `freeshipping`

## Types

### ShippingMethodBaseSettings

Depends on the shipping method type. See the [supported settings object](#settings-objects).

- `rate` (double, optional) — Flat rate per order.

### ShippingMethodBaseHandlingFees

### Fixed surcharge

- `fixed_surcharge` (double, optional) — Flat-rate handling fee applied to shipping cost.

### Percentage surcharge

- `percentage_surcharge` (double, optional) — Percentage handling fee applied to shipping cost.

## Examples

### Update a flat-rate shipping method

**Request**

```json
{
  "settings": {
    "rate": 11
  },
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "channel_ids": [
    2,
    3
  ]
}
```

**Response**

```json
{
  "channel_ids": [
    2,
    3
  ],
  "enabled": true,
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "id": 5,
  "name": "Per Order",
  "settings": {
    "rate": 11
  },
  "type": "perorder"
}
```

**SDK Code**

```python Update a flat-rate shipping method
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1"

payload = {
    "settings": { "rate": 11 },
    "handling_fees": { "fixed_surcharge": 0 },
    "channel_ids": [2, 3]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Update a flat-rate shipping method
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"settings":{"rate":11},"handling_fees":{"fixed_surcharge":0},"channel_ids":[2,3]}'
};

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

```go Update a flat-rate shipping method
package main

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

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1"

	payload := strings.NewReader("{\n  \"settings\": {\n    \"rate\": 11\n  },\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    2,\n    3\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 Update a flat-rate shipping method
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/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  \"settings\": {\n    \"rate\": 11\n  },\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    2,\n    3\n  ]\n}"

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

```java Update a flat-rate shipping method
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/shipping/zones/1/methods/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"settings\": {\n    \"rate\": 11\n  },\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    2,\n    3\n  ]\n}")
  .asString();
```

```php Update a flat-rate shipping method
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1', [
  'body' => '{
  "settings": {
    "rate": 11
  },
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "channel_ids": [
    2,
    3
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Update a flat-rate shipping method
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/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  \"settings\": {\n    \"rate\": 11\n  },\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    2,\n    3\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update a flat-rate shipping method
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "settings": ["rate": 11],
  "handling_fees": ["fixed_surcharge": 0],
  "channel_ids": [2, 3]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/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()
```

### Update a carrier-connected shipping method

**Request**

```json
{
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "channel_ids": [
    1
  ]
}
```

**Response**

```json
{
  "channel_ids": [
    1
  ],
  "enabled": false,
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "id": 8176684,
  "is_fallback": false,
  "name": "in incididunt amet adipisicing",
  "settings": {},
  "type": "endicia"
}
```

**SDK Code**

```python Update a carrier-connected shipping method
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1"

payload = {
    "handling_fees": { "fixed_surcharge": 0 },
    "channel_ids": [1]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Update a carrier-connected shipping method
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1';
const options = {
  method: 'PUT',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"handling_fees":{"fixed_surcharge":0},"channel_ids":[1]}'
};

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

```go Update a carrier-connected shipping method
package main

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

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/1"

	payload := strings.NewReader("{\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\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 Update a carrier-connected shipping method
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/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  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}"

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

```java Update a carrier-connected shipping method
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/shipping/zones/1/methods/1")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}")
  .asString();
```

```php Update a carrier-connected shipping method
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Update a carrier-connected shipping method
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/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  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update a carrier-connected shipping method
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods/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()
```