Get Locations
You can query location information using the GraphQL Storefront API. The information accessible by any storefront API is controlled by the location settings for the store.
For example queries, see Query Locations with the GraphQL Storefront API.
To work with locations, the API account that generates Storefront tokens must include one of the following OAuth scopes:
UI Name | Permission | Parameter |
---|---|---|
Information & Settings | modify | store_v2_information |
Information & Settings | read-only | store_v2_information_read_only |
Use these scopes to read and change the following information:
- The storefront details for a location
- General store information
- Location addresses
- Contact details
The Buy Online, Pick up in Store pattern is designed to center a single online storefront. Buy Online, Pick up in Store is not compatible with multi-storefront channels (MSF).
Location settings
A location must be enabled and visible in order for the GraphQL Storefront API to storefront details for the location.
If a location is not enabled or visible, send a request to the Update Locations endpoint.
PUT https://api.bigcommerce.com/stores/{{store_hash}}/v3/inventory/locations
X-Auth-Token: {{access_token}}
Content-Type: application/json
Accept: application/json
[
{
"id": 2,
"enabled": true,
"storefront_visibility": true
}
]
Resources
- GraphQL Storefront API Overview
- GraphQL Storefront API Reference
- GraphQL Storefront Playground
- GraphQL Storefront Explorer