Skip to content

Get a settings section

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/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_idstringRequired

    The settings section, as the dashboard's Settings page names it.

    One of delivery_settingssignup_widgetnotification_channelsnotification_templatespreorder_notificationspreorder_pagespreorder_storefront_textintegrationslanguages

Returns

The settings object.

Errors

404
not_found

The path is valid but nothing with that id exists in this store.

422
validation_failed

The 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.

GET/account/settings/{section_id}
curl "https://app.stoqapp.com/api/v2/external/account/settings/{section_id}" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "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
    }
  }
}