Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Document storeConfig endpoint #2893

Merged
merged 2 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _data/toc/graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@ pages:
- label: Customer endpoint
url: /graphql/reference/customer.html

- label: storeConfig endpoint
url: /graphql/reference/store-config.html

- label: urlResolver endpoint
url: /graphql/reference/url-resolver.html
88 changes: 88 additions & 0 deletions guides/v2.3/graphql/reference/store-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
group: graphql
title: storeConfig endpoint
---

The `storeConfig` endpoint returns information about a store's configuration, including its locale, currency codes, and the secure and unsecure URLs.

## Query structure

`storeConfig: StoreConfig`

## Supported attributes

Attribute | Data Type | Description
--- | --- | ---
`id` | Integer | The ID number assigned to the store
`code` | String | A unique identifier for the store
`website_id` | Integer | The ID number assigned to the parent website
`locale` | String | The store's locale, such as `en_US`
`base_currency_code` | String | The code representing the currency in which Magento processes all payment transactions, such as `USD`
`default_display_currency_code` | String | The code representing the currency displayed on the store, such as `USD`
`timezone` | String | The store's time zone, such as `America/Chicago`
`weight_unit` | String | The weight unit for products, such as `lbs` or `kgs`
`base_url` | String | The store's fully-qualified base URL, such as `http://magentohost.example.com/`
`base_link_url` | String | A fully-qualified URL that is used to create relative links to the `base_url`
`base_static_url` | String | The fully-qualified URL that specifies the location of static view files, such as `http://magentohost.example.com/pub/static/`
`base_media_url` | String | The fully-qualified URL that specifies the location of user media files, such as `http://magentohost.example.com/pub/media/`
`secure_base_url` | String | The store's fully-qualified secure base URL, such as `https://magentohost.example.com/`
`secure_base_link_url` | String | A fully-qualified URL that is used to create relative links to the `base_url`
`secure_base_static_url` | String | The secure fully-qualified URL that specifies the location of static view files, such as `https://magentohost.example.com/pub/static/`
`secure_base_media_url` | String | The secure fully-qualified URL that specifies the location of user media files, such as `https://magentohost.example.com/pub/media/`
{:style="table-layout:auto;"}

## Example usage

The following call returns all details of a store's configuration.

**Request**

```
{
storeConfig{
id,
code,
website_id,
locale,
base_currency_code,
default_display_currency_code,
timezone,
weight_unit,
base_url,
base_link_url,
base_static_url,
base_media_url,
secure_base_url,
secure_base_link_url,
secure_base_static_url,
secure_base_media_url
}
}
```

**Response**

``` json
{
"data": {
"storeConfig": {
"id": 1,
"code": "default",
"website_id": 1,
"locale": "en_US",
"base_currency_code": "USD",
"default_display_currency_code": "USD",
"timezone": "America/Chicago",
"weight_unit": "lbs",
"base_url": "http://magento2.vagrant193/",
"base_link_url": "http://magento2.vagrant193/",
"base_static_url": "http://magento2.vagrant193/pub/static/version1536249714/",
"base_media_url": "http://magento2.vagrant193/pub/media/",
"secure_base_url": "http://magento2.vagrant193/",
"secure_base_link_url": "http://magento2.vagrant193/",
"secure_base_static_url": "http://magento2.vagrant193/pub/static/version1536249714/",
"secure_base_media_url": "http://magento2.vagrant193/pub/media/"
}
}
}
```