> 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.

# Create Shipping Method

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

Creates a *Shipping Method* within a shipping zone. Real Time Carrier Connections are also supported by this endpoint.

## Carrier Configurations – Current

This section provides a sample request and a carrier-specific object/property model, for each supported carrier.

### USPS by Endicia

Example request body:

```json
{
    "name": "USPS by Endicia",
    "type": "endicia",
    "settings": {
        "carrier_options": {
            "delivery_services" : ["PriorityExpress","Priority", "PriorityMailExpressInternational"],
            "packaging_type" : "LargeFlatRateBox",
            "show_transit_time" : true
        }
    },
    "enabled": true
}
```

#### USPS by Endicia Object Properties

| Property            | Type    | Values                                                                                                                                                             |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| delivery\_services  | array   | PriorityExpress, PriorityMailExpressInternational, FirstClassPackageInternationalService, Priority, PriorityMailInternational, First, ParcelSelect, MediaMail      |
| packaging\_type     | array   | FlatRateLegalEnvelope, FlatRatePaddedEnvelope, Parcel, SmallFlatRateBox, MediumFlatRateBox, LargeFlatRateBox, FlatRateEnvelope, RegionalRateBoxA, RegionalRateBoxB |
| show\_transit\_time | boolean | true, false                                                                                                                                                        |

### FedEx

Example request body:

```json
{
    "name": "FEDEX",
    "type": "fedex",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "PRIORITY_OVERNIGHT",
                "FEDEX_2_DAY"
            ],
            "dropoff_type": "REGULAR_PICKUP",
            "packaging_type": "FEDEX_ENVELOPE",
            "packing_method": "SEPARATE",
            "rate_type": "NONE",
            "include_package_value": true,
            "destination_type": "residential"
        }
    },
    "enabled": true
}

```

#### FedEx Object Properties

| Property                | Type    | Values                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| delivery\_services      | array   | PRIORITY\_OVERNIGHT, STANDARD\_OVERNIGHT, FIRST\_OVERNIGHT, FEDEX\_2\_DAY, FEDEX\_EXPRESS\_SAVER, INTERNATIONAL\_PRIORITY, INTERNATIONAL\_ECONOMY, INTERNATIONAL\_FIRST, FEDEX\_1\_DAY\_FREIGHT, FEDEX\_2\_DAY\_FREIGHT, FEDEX\_3\_DAY\_FREIGHT, FEDEX\_GROUND, GROUND\_HOME\_DELIVERY, INTERNATIONAL\_PRIORITY\_FREIGHT, INTERNATIONAL\_ECONOMY\_FREIGHT, EUROPE\_FIRST\_INTERNATIONAL\_PRIORITY |
| dropoff\_type           | string  | REGULAR\_PICKUP, REQUEST\_COURIER, DROP\_BOX, BUSINESS\_SERVICE\_CENTER, STATION                                                                                                                                                                                                                                                                                                                  |
| packaging\_type         | string  | FEDEX\_ENVELOPE,  FEDEX\_PAK, FEDEX\_BOX, FEDEX\_TUBE, FEDEX\_10KG\_BOX, FEDEX\_25KG\_BOX, YOUR\_PACKAGING                                                                                                                                                                                                                                                                                        |
| packing\_method         | string  | SEPARATE, COMBINED                                                                                                                                                                                                                                                                                                                                                                                |
| rate\_type              | string  | NONE, LIST                                                                                                                                                                                                                                                                                                                                                                                        |
| include\_package\_value | boolean | true, false                                                                                                                                                                                                                                                                                                                                                                                       |
| destination\_type       | string  | residential, business                                                                                                                                                                                                                                                                                                                                                                             |

### UPS Ready

Example request body:

```json
{
    "name": "UPS ready",
    "type": "upsready",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "2nd_Day_Air","Standard"
            ],
            "packaging_type": "21",
            "packing_method": "separate",
            "include_package_value": true,
            "destination_type": "residential",
            "show_transit_time" : true
        }
    },
    "enabled": true
}

```

#### UPS Ready Object Properties

| Property                | Type                        | Values                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| delivery\_services      | array                       | 2nd\_Day\_Air, 2nd\_Day\_Air\_AM, 3\_Day\_Select, Expedited, Express, Express\_Plus, Express\_Saver, Express\_Early\_AM, Ground, Next\_Day\_Air, Next\_Day\_Air\_Early\_AM, Next\_Day\_Air\_Saver, Saver, Standard, Today\_Dedicated\_Courier, Today\_Express, Today\_Express\_Saver, Today\_Intercity, Today\_Standard, Worldwide\_Expedited, Worldwide\_Express, Worldwide\_Express\_Plus, Worldwide\_Express\_Saver, Worldwide\_Saver |
| destination\_type       | string                      | residential, business                                                                                                                                                                                                                                                                                                                                                                                                                    |
| packing\_method         | string                      | separate, combined                                                                                                                                                                                                                                                                                                                                                                                                                       |
| packaging\_type         | string (only codes allowed) | See the following table                                                                                                                                                                                                                                                                                                                                                                                                                  |
| include\_package\_value | boolean                     | true, false                                                                                                                                                                                                                                                                                                                                                                                                                              |
| show\_transit\_time     | boolean                     | true, false                                                                                                                                                                                                                                                                                                                                                                                                                              |

UPS `packaging_type` values include:

| Code | Description               |
| :--: | :------------------------ |
|  21  | UPS® Express Box          |
|  24  | UPS® 25 KG Box            |
|  25  | UPS® 10 KG Box            |
|  30  | Pallet                    |
|  01  | UPS® Letter               |
|  02  | Customer Supplied Package |
|  03  | Tube                      |
|  04  | PAK                       |
|  2a  | Small Express Box         |
|  2b  | Medium Express Box        |
|  2c  | Large Express Box         |

### Canada Post

Example request body:

```json
{
    "name": "Canada Post",
    "type": "canadapost",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "DOM.RP","DOM.EP"
            ]
        }
    },
    "enabled": true
}

```

#### Canada Post Object Properties

| Property           | Type  | Values                                                                                                                                                                                                                                                    |
| ------------------ | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| delivery\_services | array | DOM.RP, DOM.EP, DOM.XP, DOM.XP.CERT, DOM.PC DOM.LIB, USA.EP, USA.PW\.ENV, USA.PW\.PAK, USA.PW\.PARCEL, USA.SP.AIR, USA.TP, USA.TP.LVM, USA.XP, INT.XP, INT.IP.AIR, INT.IP.SURF, INT.PW\.ENV, INT.PW\.PAK, INT.PW\.PARCEL, INT.SP.AIR, INT.SP.SURF, INT.TP |

### Australia Post

Example request body:

```json
{
    "name": "Australia Post",
    "type": "auspost",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "AUS_PARCEL_REGULAR",
        "AUS_PARCEL_EXPRESS"
            ]
        }
    },
    "enabled": true
}

```

#### Australia Post Object Properties

| Property           | Type  | Values                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| delivery\_services | array | AUS\_LETTER\_REGULAR\_SMALL, AUS\_LETTER\_REGULAR\_Large, AUS\_LETTER\_EXPRESS\_SMALL, AUS\_LETTER\_EXPRESS\_MEDIUM, AUS\_LETTER\_EXPRESS\_LARGE, AUS\_PARCEL\_REGULAR, AUS\_PARCEL\_REGULAR\_SATCHEL\_500G, AUS\_PARCEL\_REGULAR\_SATCHEL\_3KG, AUS\_PARCEL\_REGULAR\_SATCHEL\_5KG, AUS\_PARCEL\_EXPRESS, AUS\_PARCEL\_EXPRESS\_SATCHEL\_500G, AUS\_PARCEL\_EXPRESS\_SATCHEL\_3KG, AUS\_PARCEL\_EXPRESS\_SATCHEL\_5KG, AUS\_PARCEL\_COURIER, AUS\_PARCEL\_COURIER\_SATCHEL\_MEDIUM, INT\_PARCEL\_COR\_OWN\_PACKAGING, INT\_PARCEL\_EXP\_OWN\_PACKAGING, INT\_PARCEL\_STD\_OWN\_PACKAGING, INT\_PARCEL\_AIR\_OWN\_PACKAGING, INT\_PARCEL\_SEA\_OWN\_PACKAGING |

### Royal Mail

Example request body:

```json
{
    "name": "Royal Mail",
    "type": "royalmail",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "StandardFirstClass",
                "StandardSecondClass"
            ]
        }
    },
    "enabled": true
}
```

#### Royal Mail Object Properties

| Property           | Type  | Values                                                                                                                                                                                                                                                                                                      |
| ------------------ | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| delivery\_services | array | SpecialDelivery1pm, SpecialDelivery9am, SpecialDelivery1pmSaturday, SpecialDelivery9amSaturday, SignedForFirstClass, SignedForSecondClass, Express9, Express10, ExpressAM, Express24, Express48, StandardFirstClass, StandardSecondClass, InternationalStandard, InternationalTracked, InternationalEconomy |

### Zoom2U

Example request body:

```json
{
    "name": "Zoom2U",
    "type": "zoom2u",
    "settings": {
        "carrier_options": {
            "delivery_services": [
                "3_hour",
        "Same_day",
        "VIP"
            ]
        }
    },
    "enabled": true
}
```

#### Zoom2U Object Properties

| Property           | Type  | Values                  |
| ------------------ | ----- | ----------------------- |
| delivery\_services | array | 3\_hour, Same\_day, VIP |

### 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 request body:

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

#### peritem Object – Properties

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

| Name | Type   | Description         |
| :--- | :----- | :------------------ |
| rate | number | Flat rate per item. |

Example request body:

```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 request body:

```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 request body:

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 request body:

```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/create-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.
- `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

### Create a flat-rate shipping method

**Request**

```json
{
  "name": "Per Order",
  "type": "perorder",
  "settings": {
    "rate": 8
  },
  "enabled": true,
  "handling_fees": {
    "fixed_surcharge": 3
  },
  "channel_ids": [
    1
  ]
}
```

**Response**

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

**SDK Code**

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

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

payload = {
    "name": "Per Order",
    "type": "perorder",
    "settings": { "rate": 8 },
    "enabled": True,
    "handling_fees": { "fixed_surcharge": 3 },
    "channel_ids": [1]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create a flat-rate shipping method
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Per Order","type":"perorder","settings":{"rate":8},"enabled":true,"handling_fees":{"fixed_surcharge":3},"channel_ids":[1]}'
};

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

```go Create 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"

	payload := strings.NewReader("{\n  \"name\": \"Per Order\",\n  \"type\": \"perorder\",\n  \"settings\": {\n    \"rate\": 8\n  },\n  \"enabled\": true,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 3\n  },\n  \"channel_ids\": [\n    1\n  ]\n}")

	req, _ := http.NewRequest("POST", 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 Create a flat-rate shipping method
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Per Order\",\n  \"type\": \"perorder\",\n  \"settings\": {\n    \"rate\": 8\n  },\n  \"enabled\": true,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 3\n  },\n  \"channel_ids\": [\n    1\n  ]\n}"

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

```java Create a flat-rate shipping method
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Per Order\",\n  \"type\": \"perorder\",\n  \"settings\": {\n    \"rate\": 8\n  },\n  \"enabled\": true,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 3\n  },\n  \"channel_ids\": [\n    1\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods', [
  'body' => '{
  "name": "Per Order",
  "type": "perorder",
  "settings": {
    "rate": 8
  },
  "enabled": true,
  "handling_fees": {
    "fixed_surcharge": 3
  },
  "channel_ids": [
    1
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

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

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Per Order\",\n  \"type\": \"perorder\",\n  \"settings\": {\n    \"rate\": 8\n  },\n  \"enabled\": true,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 3\n  },\n  \"channel_ids\": [\n    1\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

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

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Per Order",
  "type": "perorder",
  "settings": ["rate": 8],
  "enabled": true,
  "handling_fees": ["fixed_surcharge": 3],
  "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")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Create a carrier-connected shipping method

**Request**

```json
{
  "name": "ad sed",
  "type": "auspost",
  "enabled": false,
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "channel_ids": [
    1
  ]
}
```

**Response**

```json
{
  "channel_ids": [
    1
  ],
  "enabled": false,
  "handling_fees": {
    "fixed_surcharge": 0
  },
  "id": 19609616,
  "is_fallback": false,
  "name": "ad sed",
  "settings": {},
  "type": "auspost"
}
```

**SDK Code**

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

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

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

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

print(response.json())
```

```javascript Create a carrier-connected shipping method
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"ad sed","type":"auspost","enabled":false,"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 Create 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"

	payload := strings.NewReader("{\n  \"name\": \"ad sed\",\n  \"type\": \"auspost\",\n  \"enabled\": false,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}")

	req, _ := http.NewRequest("POST", 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 Create a carrier-connected shipping method
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"ad sed\",\n  \"type\": \"auspost\",\n  \"enabled\": false,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}"

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

```java Create a carrier-connected shipping method
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"ad sed\",\n  \"type\": \"auspost\",\n  \"enabled\": false,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

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

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones/1/methods");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"ad sed\",\n  \"type\": \"auspost\",\n  \"enabled\": false,\n  \"handling_fees\": {\n    \"fixed_surcharge\": 0\n  },\n  \"channel_ids\": [\n    1\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

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

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "ad sed",
  "type": "auspost",
  "enabled": false,
  "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")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```