Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVDOCS-6034 [update]: Settings API, update docs for channel overrides #448

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
42 changes: 37 additions & 5 deletions reference/settings.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,13 @@ paths:
get:
summary: Get Locale Settings
operationId: getSettingsLocale
description: Returns global locale settings.
description: Return locale settings for the global store or a channel.
parameters:
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/ChannelIdParam'
responses:
'200':
description: ''
description: 'If a channel uses global settings, `data` returns as `null`'
content:
application/json:
examples:
Expand All @@ -821,10 +822,13 @@ paths:
summary: Update Locale Settings
operationId: updateSettingsLocale
description: |-
Updates global locale settings.
Update locale settings for the global store or a channel.

To remove channel overrides, set all the request body fields to `null` and use the `channel_id` query parameter.
parameters:
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/ContentType'
- $ref: '#/components/parameters/ChannelIdParam'
requestBody:
content:
application/json:
Expand All @@ -835,7 +839,7 @@ paths:
shopper_language_selection_method: default_shopper_language
store_country: United States
schema:
$ref: '#/components/schemas/Locale'
$ref: '#/components/schemas/Locale_Req'
responses:
'200':
description: ''
Expand Down Expand Up @@ -2037,14 +2041,15 @@ components:
description: Describes whether out-of-stock messages are shown on product listing pages.
default: false
example: true
Locale:
Locale_Req:
description: 'The basic locale settings for a store, used to give shopper information about languages, countries, etc.'
type: object
properties:
default_shopper_language:
type: string
example: 'en, en-us'
default: en
nullable: true
shopper_language_selection_method:
description: |-
Determines whether to display the storefront content in the shopperʼs browser language or the shopperʼs selected default language.
Expand All @@ -2058,11 +2063,38 @@ components:
enum:
- browser
- default_shopper_language
nullable: true
store_country:
type: string
default: United States
nullable: true
required:
- default_shopper_language
Locale:
description: 'The basic locale settings for a store, used to give shopper information about languages, countries, etc.'
type: object
nullable: true
properties:
default_shopper_language:
type: string
example: 'en, en-us'
default: en
shopper_language_selection_method:
description: |-
Determines whether to display the storefront content in the shopperʼs browser language or the shopperʼs selected default language.

Available values:
* `browser` - language updates automatically based on the shopper browser language. Multiple languages are supported.
* `default_shopper_language` - content is displayed in a single language based on the set `default_shopper_language`. Only the selected language is supported.
type: string
example: default_shopper_language
default: default_shopper_language
enum:
- browser
- default_shopper_language
store_country:
type: string
default: United States
x-internal: false
LogoSettings:
type: object
Expand Down
Loading