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 /stores/{store_hash}/v3/inventory/locations
Request
Create new locations.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
codestring
Location user-defined unique identifier.
Example: BIGC-1
labelstring
Location label.
Example: Central store
descriptionstring
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 world
managed_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
operating_hoursobject
Schedule with opening and closing hours for each day of the week.
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/UTC
addressobject
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 /stores/{store_hash}/v3/inventory/locations
Request
List locations. You can use optional filter parameters.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- location_id:in in query - integer
Comma separated list of
location_id
. - location_code:in in query - string
Comma separated list of
location_code
. - is_default in query - boolean
Filter whether the location is the default.
- type_id:in in query - string
Comma separated list of locations type codes.
- managed_by_external_source in query - boolean
Filter whether an external source manages location inventory levels.
- is_active in query - boolean
Filter by active locations flag; return both if not specified.
- storefront_visibility in query - boolean
Filter by storefront_visibility flag; return both if not specified.
- page in query - integer
Specifies the page number in a limited (paginated) list.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list.
example
Response
The request has been successfully processed.
Body
dataarray[object]
metaobject
example
Update Locations
PUT /stores/{store_hash}/v3/inventory/locations
Request
Update existing locations.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
Body
idinteger
requiredLocation immutable unique identifier.
Example: 2
codestring
Location user-defined unique identifier.
Example: BIGC-2
labelstring
Location label.
Example: Central store
descriptionstring
Description of location.
Example: Central shop of the world
managed_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
operating_hoursobject
Schedule with opening and closing hours for each day of the week.
time_zonestring
Time zone of location.
Example: Etc/UTC
addressobject
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.