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.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
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ʼs
type_id
isPHYSICAL
.storefront_visibilityboolean
Default: true
special_hoursarray[object]
Create Locations
Response
Locations have been successfully created.
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.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
The request has been successfully processed.
Body
dataarray[object]
example
Update Locations
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locationsRequest
Update existing locations.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
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
The request has been successfully processed.
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 headerrequired
Parameters
- store_hash in path - string
- location_id:in in query - integerrequired
Comma separated list of
location_id
.
example
Response
Request has been successfully processed.
Body
transaction_idstring
Unique identifier of performed action.