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

POST https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations
Content-Type: application/json

Create new locations.

**Limits**
* Limit of 50 concurrent requests.
* Limit of 100 active locations.


Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/inventory/locations/create-locations

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Store Inventory | read-only | `store_inventory_read_only` | | Store Inventory | modify | `store_inventory` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/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). For more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/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 a list of LocationsCreateRequestItems.

- `list of LocationsCreateRequestItems`

## Response

### 200

Locations have been successfully created.

- `transaction_id` (string, optional) — Unique identifier of performed action.

## Errors

### 422 Unprocessable Entity Error

Incorrect entity. Locations were not valid. This results from missing required fields, invalid data, or partial error. See the response for more details.

- `status` (integer, optional) — The HTTP status code generated by the origin server for this occurrence of the problem.
- `title` (string, optional) — Human readable error message.
- `type` (string, optional) — URL identifying the error type. Dereferencing the URL leads to documentation about the error type.
- `errors` (ErrorResponseErrors, optional) — The detailed summary describing the particular error.

## Types

### LocationsCreateRequestItems

- `code` (string, optional) — Location user-defined unique identifier.
- `label` (string, optional) — Location label.
- `description` (string, optional) — Description of location. This field can be returned by the GraphQL Storefront API so that additional details can be exposed to customers on the storefront (customer-facing).
- `managed_by_external_source` (boolean, optional, default: false) — Indicates if the third-party system is the source of truth for inventory values. If set to true, manually editing inventory in the BigCommerce control panel will be disabled.
- `type_id` (enum, optional, default: PHYSICAL) — Describe type of given location.
  - Allowed values: `PHYSICAL`, `VIRTUAL`
- `enabled` (boolean, optional, default: true)
- `operating_hours` (OperatingHours, optional) — Schedule with opening and closing hours for each day of the week.
- `time_zone` (string, optional) — Time zone of location. For a list of valid time zones, please view: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
- `address` (LocationsCreateRequestItemsAddress, optional) — Address is required if the locationʼs `type_id` is `PHYSICAL`.
- `storefront_visibility` (boolean, optional, default: true)
- `special_hours` (list of BlackoutHoursItems, optional)

### ErrorResponseErrors

The detailed summary describing the particular error.

### OperatingHours

Schedule with opening and closing hours for each day of the week.

- `sunday` (OperatingHoursForDay, optional)
- `monday` (OperatingHoursForDay, optional)
- `tuesday` (OperatingHoursForDay, optional)
- `wednesday` (OperatingHoursForDay, optional)
- `thursday` (OperatingHoursForDay, optional)
- `friday` (OperatingHoursForDay, optional)
- `saturday` (OperatingHoursForDay, optional)

### LocationsCreateRequestItemsAddress

Address is required if the locationʼs `type_id` is `PHYSICAL`.

- `address1` (string, required) — Main address information.
- `city` (string, required) — The city where the location is located.
- `state` (string, required) — The state where the location is located.
- `zip` (string, required) — Zip code of the location.
- `email` (string, required) — Email of the location.
- `geo_coordinates` (LocationsCreateRequestItemsAddressGeoCoordinates, required) — Object with latitude and longitude that points at the location.
- `country_code` (string, required) — ISO 3166-1 alpha-3 code.
- `address2` (string, optional) — Additional address information.
- `phone` (string, optional) — Phone number of the location.

### BlackoutHoursItems

- `label` (string, required)
- `date` (date, required)
- `open` (boolean, required)
- `opening` (string, optional, default: 00:00)
- `closing` (string, optional, default: 00:00)
- `all_day` (boolean, optional, default: false)
- `annual` (boolean, optional, default: false)

### OperatingHoursForDay

- `open` (boolean, optional, default: false) — Boolean variable that defines if the location is open or not.
- `opening` (string, optional) — Opening time.
- `closing` (string, optional) — Closing time.

### LocationsCreateRequestItemsAddressGeoCoordinates

Object with latitude and longitude that points at the location.

- `latitude` (float, required) — Latitude.
- `longitude` (float, required) — Longitude.

## Examples

**Request**

```json
[
  {
    "code": "BIGC-1",
    "label": "Central store",
    "description": "Central shop of the world",
    "managed_by_external_source": false,
    "type_id": "PHYSICAL",
    "enabled": true,
    "operating_hours": {
      "sunday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "monday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "tuesday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "wednesday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "thursday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "friday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "saturday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      }
    },
    "time_zone": "Etc/UTC",
    "address": {
      "address1": "5th Ave",
      "city": "New York",
      "state": "NY",
      "zip": "10021",
      "email": "test@example.com",
      "geo_coordinates": {
        "latitude": 40.774378,
        "longitude": -73.9653178
      },
      "country_code": "US",
      "address2": "string",
      "phone": "800-555-0198"
    },
    "storefront_visibility": true,
    "special_hours": [
      {
        "label": "Thanksgiving",
        "date": "2022-09-29",
        "open": true,
        "opening": "09:00",
        "closing": "09:00",
        "all_day": false,
        "annual": false
      }
    ]
  }
]
```

**SDK Code**

```python Create Locations (application/json)
import requests

url = "https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations"

payload = [
    {
        "code": "BIGC-1",
        "label": "Central store",
        "description": "Central shop of the world",
        "managed_by_external_source": False,
        "type_id": "PHYSICAL",
        "enabled": True,
        "operating_hours": {
            "sunday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            },
            "monday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            },
            "tuesday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            },
            "wednesday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            },
            "thursday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            },
            "friday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            },
            "saturday": {
                "open": False,
                "opening": "08:00",
                "closing": "16:00"
            }
        },
        "time_zone": "Etc/UTC",
        "address": {
            "address1": "5th Ave",
            "city": "New York",
            "state": "NY",
            "zip": "10021",
            "email": "test@example.com",
            "geo_coordinates": {
                "latitude": 40.774378,
                "longitude": -73.9653178
            },
            "country_code": "US",
            "address2": "string",
            "phone": "800-555-0198"
        },
        "storefront_visibility": True,
        "special_hours": [
            {
                "label": "Thanksgiving",
                "date": "2022-09-29",
                "open": True,
                "opening": "09:00",
                "closing": "09:00",
                "all_day": False,
                "annual": False
            }
        ]
    }
]
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create Locations (application/json)
const url = 'https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations';
const options = {
  method: 'POST',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '[{"code":"BIGC-1","label":"Central store","description":"Central shop of the world","managed_by_external_source":false,"type_id":"PHYSICAL","enabled":true,"operating_hours":{"sunday":{"open":false,"opening":"08:00","closing":"16:00"},"monday":{"open":false,"opening":"08:00","closing":"16:00"},"tuesday":{"open":false,"opening":"08:00","closing":"16:00"},"wednesday":{"open":false,"opening":"08:00","closing":"16:00"},"thursday":{"open":false,"opening":"08:00","closing":"16:00"},"friday":{"open":false,"opening":"08:00","closing":"16:00"},"saturday":{"open":false,"opening":"08:00","closing":"16:00"}},"time_zone":"Etc/UTC","address":{"address1":"5th Ave","city":"New York","state":"NY","zip":"10021","email":"test@example.com","geo_coordinates":{"latitude":40.774378,"longitude":-73.9653178},"country_code":"US","address2":"string","phone":"800-555-0198"},"storefront_visibility":true,"special_hours":[{"label":"Thanksgiving","date":"2022-09-29","open":true,"opening":"09:00","closing":"09:00","all_day":false,"annual":false}]}]'
};

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

```go Create Locations (application/json)
package main

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

func main() {

	url := "https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations"

	payload := strings.NewReader("[\n  {\n    \"code\": \"BIGC-1\",\n    \"label\": \"Central store\",\n    \"description\": \"Central shop of the world\",\n    \"managed_by_external_source\": false,\n    \"type_id\": \"PHYSICAL\",\n    \"enabled\": true,\n    \"operating_hours\": {\n      \"sunday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"monday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"tuesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"wednesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"thursday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"friday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"saturday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      }\n    },\n    \"time_zone\": \"Etc/UTC\",\n    \"address\": {\n      \"address1\": \"5th Ave\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10021\",\n      \"email\": \"test@example.com\",\n      \"geo_coordinates\": {\n        \"latitude\": 40.774378,\n        \"longitude\": -73.9653178\n      },\n      \"country_code\": \"US\",\n      \"address2\": \"string\",\n      \"phone\": \"800-555-0198\"\n    },\n    \"storefront_visibility\": true,\n    \"special_hours\": [\n      {\n        \"label\": \"Thanksgiving\",\n        \"date\": \"2022-09-29\",\n        \"open\": true,\n        \"opening\": \"09:00\",\n        \"closing\": \"09:00\",\n        \"all_day\": false,\n        \"annual\": false\n      }\n    ]\n  }\n]")

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

	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 Locations (application/json)
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations")

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

request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {\n    \"code\": \"BIGC-1\",\n    \"label\": \"Central store\",\n    \"description\": \"Central shop of the world\",\n    \"managed_by_external_source\": false,\n    \"type_id\": \"PHYSICAL\",\n    \"enabled\": true,\n    \"operating_hours\": {\n      \"sunday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"monday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"tuesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"wednesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"thursday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"friday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"saturday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      }\n    },\n    \"time_zone\": \"Etc/UTC\",\n    \"address\": {\n      \"address1\": \"5th Ave\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10021\",\n      \"email\": \"test@example.com\",\n      \"geo_coordinates\": {\n        \"latitude\": 40.774378,\n        \"longitude\": -73.9653178\n      },\n      \"country_code\": \"US\",\n      \"address2\": \"string\",\n      \"phone\": \"800-555-0198\"\n    },\n    \"storefront_visibility\": true,\n    \"special_hours\": [\n      {\n        \"label\": \"Thanksgiving\",\n        \"date\": \"2022-09-29\",\n        \"open\": true,\n        \"opening\": \"09:00\",\n        \"closing\": \"09:00\",\n        \"all_day\": false,\n        \"annual\": false\n      }\n    ]\n  }\n]"

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

```java Create Locations (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("[\n  {\n    \"code\": \"BIGC-1\",\n    \"label\": \"Central store\",\n    \"description\": \"Central shop of the world\",\n    \"managed_by_external_source\": false,\n    \"type_id\": \"PHYSICAL\",\n    \"enabled\": true,\n    \"operating_hours\": {\n      \"sunday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"monday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"tuesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"wednesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"thursday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"friday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"saturday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      }\n    },\n    \"time_zone\": \"Etc/UTC\",\n    \"address\": {\n      \"address1\": \"5th Ave\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10021\",\n      \"email\": \"test@example.com\",\n      \"geo_coordinates\": {\n        \"latitude\": 40.774378,\n        \"longitude\": -73.9653178\n      },\n      \"country_code\": \"US\",\n      \"address2\": \"string\",\n      \"phone\": \"800-555-0198\"\n    },\n    \"storefront_visibility\": true,\n    \"special_hours\": [\n      {\n        \"label\": \"Thanksgiving\",\n        \"date\": \"2022-09-29\",\n        \"open\": true,\n        \"opening\": \"09:00\",\n        \"closing\": \"09:00\",\n        \"all_day\": false,\n        \"annual\": false\n      }\n    ]\n  }\n]")
  .asString();
```

```php Create Locations (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations', [
  'body' => '[
  {
    "code": "BIGC-1",
    "label": "Central store",
    "description": "Central shop of the world",
    "managed_by_external_source": false,
    "type_id": "PHYSICAL",
    "enabled": true,
    "operating_hours": {
      "sunday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "monday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "tuesday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "wednesday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "thursday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "friday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      },
      "saturday": {
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      }
    },
    "time_zone": "Etc/UTC",
    "address": {
      "address1": "5th Ave",
      "city": "New York",
      "state": "NY",
      "zip": "10021",
      "email": "test@example.com",
      "geo_coordinates": {
        "latitude": 40.774378,
        "longitude": -73.9653178
      },
      "country_code": "US",
      "address2": "string",
      "phone": "800-555-0198"
    },
    "storefront_visibility": true,
    "special_hours": [
      {
        "label": "Thanksgiving",
        "date": "2022-09-29",
        "open": true,
        "opening": "09:00",
        "closing": "09:00",
        "all_day": false,
        "annual": false
      }
    ]
  }
]',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Create Locations (application/json)
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"code\": \"BIGC-1\",\n    \"label\": \"Central store\",\n    \"description\": \"Central shop of the world\",\n    \"managed_by_external_source\": false,\n    \"type_id\": \"PHYSICAL\",\n    \"enabled\": true,\n    \"operating_hours\": {\n      \"sunday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"monday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"tuesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"wednesday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"thursday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"friday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      },\n      \"saturday\": {\n        \"open\": false,\n        \"opening\": \"08:00\",\n        \"closing\": \"16:00\"\n      }\n    },\n    \"time_zone\": \"Etc/UTC\",\n    \"address\": {\n      \"address1\": \"5th Ave\",\n      \"city\": \"New York\",\n      \"state\": \"NY\",\n      \"zip\": \"10021\",\n      \"email\": \"test@example.com\",\n      \"geo_coordinates\": {\n        \"latitude\": 40.774378,\n        \"longitude\": -73.9653178\n      },\n      \"country_code\": \"US\",\n      \"address2\": \"string\",\n      \"phone\": \"800-555-0198\"\n    },\n    \"storefront_visibility\": true,\n    \"special_hours\": [\n      {\n        \"label\": \"Thanksgiving\",\n        \"date\": \"2022-09-29\",\n        \"open\": true,\n        \"opening\": \"09:00\",\n        \"closing\": \"09:00\",\n        \"all_day\": false,\n        \"annual\": false\n      }\n    ]\n  }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create Locations (application/json)
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  [
    "code": "BIGC-1",
    "label": "Central store",
    "description": "Central shop of the world",
    "managed_by_external_source": false,
    "type_id": "PHYSICAL",
    "enabled": true,
    "operating_hours": [
      "sunday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ],
      "monday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ],
      "tuesday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ],
      "wednesday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ],
      "thursday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ],
      "friday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ],
      "saturday": [
        "open": false,
        "opening": "08:00",
        "closing": "16:00"
      ]
    ],
    "time_zone": "Etc/UTC",
    "address": [
      "address1": "5th Ave",
      "city": "New York",
      "state": "NY",
      "zip": "10021",
      "email": "test@example.com",
      "geo_coordinates": [
        "latitude": 40.774378,
        "longitude": -73.9653178
      ],
      "country_code": "US",
      "address2": "string",
      "phone": "800-555-0198"
    ],
    "storefront_visibility": true,
    "special_hours": [
      [
        "label": "Thanksgiving",
        "date": "2022-09-29",
        "open": true,
        "opening": "09:00",
        "closing": "09:00",
        "all_day": false,
        "annual": false
      ]
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/:store_hash/v3/inventory/locations")! 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()
```