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

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

Creates a *Shipping Zone*.

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

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

- `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 an object.

- `name` (string, required) — Zone name. Required for PUT requests.
- `type` (enum, required)
  - Allowed values: `zip`, `country`, `state`, `global`
- `locations` (list of ShippingZonesPostRequestBodyContentApplicationJsonSchemaLocationsItems, optional) — Array of zone locations. BigCommerce has a platform limit of 40000 `zip` type locations.
- `free_shipping` (ShippingZonesPostRequestBodyContentApplicationJsonSchemaFreeShipping, optional)
- `handling_fees` (ShippingZonesPostRequestBodyContentApplicationJsonSchemaHandlingFees, optional)
- `enabled` (boolean, optional) — Whether this shipping zone is enabled.

## Response

### 201

Created

- `id` (integer, optional) — Zone ID.
- `name` (string, optional) — Zone name.
- `type` (enum, optional)
  - Allowed values: `zip`, `country`, `state`, `global`
- `locations` (list of ShippingZonesPostResponsesContentApplicationJsonSchemaLocationsItems, optional) — Array of zone locations.
- `free_shipping` (ShippingZonesPostResponsesContentApplicationJsonSchemaFreeShipping, optional)
- `handling_fees` (ShippingZonesPostResponsesContentApplicationJsonSchemaHandlingFees, optional)
- `enabled` (boolean, optional) — Whether this shipping zone is enabled.

## Types

### ShippingZonesPostRequestBodyContentApplicationJsonSchemaLocationsItems

- `id` (integer, optional) — Location’s ID.
- `zip` (string, optional) — Location’s ZIP/postal code.
- `country_iso2` (string, optional) — 2-letter ISO Alpha-2 code for the country.
- `state_iso2` (string, optional) — ISO Alpha-2 code for the state.

### ShippingZonesPostRequestBodyContentApplicationJsonSchemaFreeShipping

- `enabled` (boolean, optional)
- `minimum_sub_total` (string, optional) — (Float, Float-As-String, Integer)
- `exclude_fixed_shipping_products` (boolean, optional)

### ShippingZonesPostRequestBodyContentApplicationJsonSchemaHandlingFees

### ShippingZonesPostResponsesContentApplicationJsonSchemaLocationsItems

- `id` (integer, optional) — Location ID.
- `zip` (string, optional) — Location’s ZIP/postal code.
- `country_iso2` (string, optional) — 2-letter ISO Alpha-2 code for the country.
- `state_iso2` (string, optional) — ISO Alpha-2 code for the state.

### ShippingZonesPostResponsesContentApplicationJsonSchemaFreeShipping

- `enabled` (boolean, optional)
- `minimum_sub_total` (string, optional) — (Float, Float-As-String, Integer)
- `exclude_fixed_shipping_products` (boolean, optional)

### ShippingZonesPostResponsesContentApplicationJsonSchemaHandlingFees

### Fixed surcharge

- `fixed_surcharge` (string, optional) — Flat-rate handling fee applied to shipping cost.
- `display_separately` (boolean, optional) — Indicates whether store displays handling fee separately at checkout.

### Percentage surcharge

- `percentage_surcharge` (string, optional) — Percentage handling fee applied to shipping cost.
- `display_separately` (boolean, optional) — Indicates whether store displays handling fee separately at checkout.

### Fixed surcharge

- `fixed_surcharge` (string, optional) — Flat-rate handling fee applied to shipping cost.
- `display_separately` (boolean, optional) — Indicates whether store displays handling fee separately at checkout.

### Percentage surcharge

- `percentage_surcharge` (string, optional) — Percentage handling fee applied to shipping cost.
- `display_separately` (boolean, optional) — Indicates whether store displays handling fee separately at checkout.

## Examples

### Type: ZIP

**Request**

```json
{
  "name": "United States",
  "type": "zip",
  "locations": [
    {
      "zip": "11103",
      "country_iso2": "US"
    }
  ]
}
```

**Response**

```json
{
  "id": 1,
  "name": "United States",
  "type": "zip",
  "locations": [
    {
      "id": 3,
      "zip": "12345",
      "country_iso2": "US",
      "state_iso2": "TX"
    }
  ],
  "free_shipping": {
    "enabled": true,
    "minimum_sub_total": "0.0000",
    "exclude_fixed_shipping_products": true
  },
  "handling_fees": {
    "display_separately": true,
    "fixed_surcharge": "0"
  },
  "enabled": true
}
```

**SDK Code**

```python Type: ZIP
import requests

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

payload = {
    "name": "United States",
    "type": "zip",
    "locations": [
        {
            "zip": "11103",
            "country_iso2": "US"
        }
    ]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Type: ZIP
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"United States","type":"zip","locations":[{"zip":"11103","country_iso2":"US"}]}'
};

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

```go Type: ZIP
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"United States\",\n  \"type\": \"zip\",\n  \"locations\": [\n    {\n      \"zip\": \"11103\",\n      \"country_iso2\": \"US\"\n    }\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 Type: ZIP
require 'uri'
require 'net/http'

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

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\": \"United States\",\n  \"type\": \"zip\",\n  \"locations\": [\n    {\n      \"zip\": \"11103\",\n      \"country_iso2\": \"US\"\n    }\n  ]\n}"

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

```java Type: ZIP
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")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"United States\",\n  \"type\": \"zip\",\n  \"locations\": [\n    {\n      \"zip\": \"11103\",\n      \"country_iso2\": \"US\"\n    }\n  ]\n}")
  .asString();
```

```php Type: ZIP
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones', [
  'body' => '{
  "name": "United States",
  "type": "zip",
  "locations": [
    {
      "zip": "11103",
      "country_iso2": "US"
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Type: ZIP
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones");
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\": \"United States\",\n  \"type\": \"zip\",\n  \"locations\": [\n    {\n      \"zip\": \"11103\",\n      \"country_iso2\": \"US\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Type: ZIP
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "United States",
  "type": "zip",
  "locations": [
    [
      "zip": "11103",
      "country_iso2": "US"
    ]
  ]
] 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")! 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()
```

### Type: Country

**Request**

```json
{
  "name": "Mexico",
  "type": "country",
  "locations": [
    {
      "country_iso2": "MX"
    }
  ]
}
```

**Response**

```json
{
  "id": 1,
  "name": "United States",
  "type": "zip",
  "locations": [
    {
      "id": 3,
      "zip": "12345",
      "country_iso2": "US",
      "state_iso2": "TX"
    }
  ],
  "free_shipping": {
    "enabled": true,
    "minimum_sub_total": "0.0000",
    "exclude_fixed_shipping_products": true
  },
  "handling_fees": {
    "display_separately": true,
    "fixed_surcharge": "0"
  },
  "enabled": true
}
```

**SDK Code**

```python Type: Country
import requests

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

payload = {
    "name": "Mexico",
    "type": "country",
    "locations": [{ "country_iso2": "MX" }]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Type: Country
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Mexico","type":"country","locations":[{"country_iso2":"MX"}]}'
};

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

```go Type: Country
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"Mexico\",\n  \"type\": \"country\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"MX\"\n    }\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 Type: Country
require 'uri'
require 'net/http'

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

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\": \"Mexico\",\n  \"type\": \"country\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"MX\"\n    }\n  ]\n}"

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

```java Type: Country
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")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Mexico\",\n  \"type\": \"country\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"MX\"\n    }\n  ]\n}")
  .asString();
```

```php Type: Country
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones', [
  'body' => '{
  "name": "Mexico",
  "type": "country",
  "locations": [
    {
      "country_iso2": "MX"
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Type: Country
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones");
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\": \"Mexico\",\n  \"type\": \"country\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"MX\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Type: Country
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Mexico",
  "type": "country",
  "locations": [["country_iso2": "MX"]]
] 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")! 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()
```

### Type: State

**Request**

```json
{
  "name": "South Carolina",
  "type": "state",
  "locations": [
    {
      "country_iso2": "US",
      "state_iso2": "SC"
    }
  ]
}
```

**Response**

```json
{
  "id": 1,
  "name": "United States",
  "type": "zip",
  "locations": [
    {
      "id": 3,
      "zip": "12345",
      "country_iso2": "US",
      "state_iso2": "TX"
    }
  ],
  "free_shipping": {
    "enabled": true,
    "minimum_sub_total": "0.0000",
    "exclude_fixed_shipping_products": true
  },
  "handling_fees": {
    "display_separately": true,
    "fixed_surcharge": "0"
  },
  "enabled": true
}
```

**SDK Code**

```python Type: State
import requests

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

payload = {
    "name": "South Carolina",
    "type": "state",
    "locations": [
        {
            "country_iso2": "US",
            "state_iso2": "SC"
        }
    ]
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Type: State
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"South Carolina","type":"state","locations":[{"country_iso2":"US","state_iso2":"SC"}]}'
};

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

```go Type: State
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"South Carolina\",\n  \"type\": \"state\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"US\",\n      \"state_iso2\": \"SC\"\n    }\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 Type: State
require 'uri'
require 'net/http'

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

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\": \"South Carolina\",\n  \"type\": \"state\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"US\",\n      \"state_iso2\": \"SC\"\n    }\n  ]\n}"

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

```java Type: State
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")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"South Carolina\",\n  \"type\": \"state\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"US\",\n      \"state_iso2\": \"SC\"\n    }\n  ]\n}")
  .asString();
```

```php Type: State
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones', [
  'body' => '{
  "name": "South Carolina",
  "type": "state",
  "locations": [
    {
      "country_iso2": "US",
      "state_iso2": "SC"
    }
  ]
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Type: State
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones");
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\": \"South Carolina\",\n  \"type\": \"state\",\n  \"locations\": [\n    {\n      \"country_iso2\": \"US\",\n      \"state_iso2\": \"SC\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Type: State
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "South Carolina",
  "type": "state",
  "locations": [
    [
      "country_iso2": "US",
      "state_iso2": "SC"
    ]
  ]
] 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")! 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()
```

### Type: Global

**Request**

```json
{
  "name": "Global",
  "type": "global"
}
```

**Response**

```json
{
  "id": 1,
  "name": "United States",
  "type": "zip",
  "locations": [
    {
      "id": 3,
      "zip": "12345",
      "country_iso2": "US",
      "state_iso2": "TX"
    }
  ],
  "free_shipping": {
    "enabled": true,
    "minimum_sub_total": "0.0000",
    "exclude_fixed_shipping_products": true
  },
  "handling_fees": {
    "display_separately": true,
    "fixed_surcharge": "0"
  },
  "enabled": true
}
```

**SDK Code**

```python Type: Global
import requests

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

payload = {
    "name": "Global",
    "type": "global"
}
headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Type: Global
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Token': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"Global","type":"global"}'
};

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

```go Type: Global
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"Global\",\n  \"type\": \"global\"\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 Type: Global
require 'uri'
require 'net/http'

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

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\": \"Global\",\n  \"type\": \"global\"\n}"

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

```java Type: Global
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")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Global\",\n  \"type\": \"global\"\n}")
  .asString();
```

```php Type: Global
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones', [
  'body' => '{
  "name": "Global",
  "type": "global"
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Type: Global
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/shipping/zones");
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\": \"Global\",\n  \"type\": \"global\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Type: Global
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Global",
  "type": "global"
] 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")! 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()
```