Get a settings section
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/account/settings/{section_id}Costs 1 rate-limit point · Rate limits
One settings section: label, description, settings (the output of the read actions behind it, keyed by block, e.g. settings.widget is GET /back_in_stock/settings/widget), columns (field path => model column) and raw (field path => stored value). Sections: delivery_settings, signup_widget, notification_channels, notification_templates, preorder_notifications, preorder_pages, preorder_storefront_text, integrations, languages.
Read only: change a field with the PATCH of the block it comes from. Blocks that don't apply are left out (delivery_settings has locations only while a location filter is on). A block whose read fails is listed under unavailable with its error; the rest still return. Template sections are read in the alert language, given as settings.locale. labels names each field as the dashboard shows it. An unknown section_id fails with 422 validation_failed.
Also searched asapp settingscurrent settingssettings sectionnotification settingsdelivery settingssignup widget settings
Path parameters
section_idstringRequiredThe settings section, as the dashboard's Settings page names it.
One ofdelivery_settingssignup_widgetnotification_channelsnotification_templatespreorder_notificationspreorder_pagespreorder_storefront_textintegrationslanguages
Returns
The settings object.
Errors
not_foundThe path is valid but nothing with that id exists in this store.
validation_failedThe action refused the request for a reason that is not a single bad field.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/account/settings/{section_id}" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/account/settings/{section_id}", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/account/settings/{section_id}",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/account/settings/{section_id}")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"label": "Languages",
"description": "Dashboard language, alert language and multi-language support.",
"settings": {
"languages": {
"default_locale": "en",
"app_locale": "en",
"multi_language_enabled": true,
"product_translations_enabled": true
}
},
"columns": {
"languages.default_locale": "default_locale",
"languages.app_locale": "app_locale",
"languages.multi_language_enabled": "multi_language_enabled",
"languages.product_translations_enabled": "product_translations_enabled"
},
"raw": {
"languages.default_locale": "en",
"languages.app_locale": "en",
"languages.multi_language_enabled": true,
"languages.product_translations_enabled": true
},
"labels": {
"languages.multi_language_enabled": {
"label": "Multi-language support",
"label_id": "settings.multi_language_support",
"menu_path": [
"Back in stock alerts"
],
"group": "Multi-language"
},
"languages.product_translations_enabled": {
"label": "Use translations",
"label_id": "settings.product_translations_support",
"menu_path": [
"Back in stock alerts"
],
"group": "Multi-language",
"shown_when": {
"column": "multi_language_enabled",
"label": "Multi-language support",
"label_id": "settings.multi_language_support",
"equals": true,
"state": "on",
"path": "languages.multi_language_enabled"
},
"effect": "Use translated product and variant titles based on the customer's language in all notifications.",
"shown_now": true
}
}
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Offer not found"
],
"code": "not_found",
"details": [
{
"code": "not_found",
"message": "Offer not found",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}