Locations
Locations
By default, all BigCommerce stores have at least one location (id
= 1
). You can create additional locations to track inventory against using the /locations
endpoints. Initially, we will only support the creation of physical inventory locations, which must have an address.
Metafields
Metafields allow you to add additional fields about your storeʼs locations.
Create Locations
POST https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locationsRequest
Create new locations.
Limits
- Limit of 50 concurrent requests.
- Limit of 100 active locations.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
codestring
Location user-defined unique identifier.Example: BIGC-1labelstring
Location label.Example: Central storedescriptionstring
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).Example: Central shop of the worldmanaged_by_external_sourceboolean
Indicates if the third-party system is the source of truth for inventory values. If set to true, manually editing inventory in BCʼs control panel will be disabled.
Default: false
type_idstring
Describe type of given location.Allowed: PHYSICAL | VIRTUAL
Default: PHYSICAL
enabledboolean
Default: true
time_zonestring
Time zone of location. For a list of valid time zones, please view: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.Example: Etc/UTCaddressobject
Address is required if the locationʼstype_id
isPHYSICAL
.storefront_visibilityboolean
Default: true
special_hoursarray[object]
Create Locations
Response
Body
transaction_idstring
Unique identifier of performed action.
example
Get Locations
GET https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locationsRequest
List locations. You can use optional filter parameters.
Limits
- Limit of 50 concurrent requests.
- Limit of 1000 items for payload length.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- location_id:in in query - integerComma separated list of
location_id
. - location_code:in in query - stringComma separated list of
location_code
. - is_default in query - booleanFilter whether the location is the default.
- type_id:in in query - stringComma separated list of locations type codes.
- managed_by_external_source in query - booleanFilter whether an external source manages location inventory levels.
- is_active in query - booleanFilter by active locations flag; return both if not specified.
- storefront_visibility in query - booleanFilter by storefront_visibility flag; return both if not specified.
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
example
Response
Body
dataarray[object]
example
Update Locations
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locationsRequest
Update existing locations.
Limits
- Limit of 50 concurrent requests.
- Limit of 100 active locations.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
Body
idinteger
requiredLocation immutable unique identifier.Example: 2codestring
Location user-defined unique identifier.Example: BIGC-2labelstring
Location label.Example: Central storedescriptionstring
Description of location.Example: Central shop of the worldmanaged_by_external_sourceboolean
Indicates if the third-party system is the source of truth for inventory values. If set to true, manually editing inventory in BCʼs control panel will be disabled.
Default: false
type_idstring
Describe type of given location.Allowed: PHYSICAL | VIRTUAL
Default: PHYSICAL
enabledboolean
Indicator of accessibility of the location.Default: true
time_zonestring
Time zone of location.Example: Etc/UTCaddressobject
storefront_visibilityboolean
Indicator of accessibility of location on the storefront.Default: true
special_hoursarray[object]
Update Locations
Response
Body
transaction_idstring
Unique identifier of performed action.
example
Delete Locations
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locationsRequest
Delete existing locations.
You cannot delete locations that are shipping origins or have open order transactions. The location with a location_id
of 1 is the storeʼs default shipping origin, and you cannot change the shipping origin.
You can delete locations assigned to pickup methods.
Warning:
Deleting locations that have inventory also deletes its stock.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- location_id:in in query - integerrequiredComma separated list of
location_id
.
example
Response
Body
transaction_idstring
Unique identifier of performed action.
example
See something you can improve? Edit this file on GitHub