Retrieves configurations for the specified organization and site.
If you would like to get a raw Response object use the other getConfigurations function.
An object containing the options for this method.
A promise of type SiteConfiguration.
Retrieves configurations for the specified organization and site.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type SiteConfiguration otherwise.
Generated using TypeDoc
Shopper Configurations
*Download API specification
API Overview
In commerce, there is a need to provide information to the shopper facing application to allow for making decisions on execution. This is highly cache-able data that rarely changes.
It encompasses toggles, preferences, and configuration that allow the application to be reactive to changes performed by the merchant, admin, or support engineer.
Use Cases
Example
{ "configurations":[ { "configurationType":"siteConfiguration", "id":"id", "value":"TestWapi" }, { "configurationType":"siteConfiguration", "id":"name", "value":"Test WAPI" }, { "configurationType":"siteConfiguration", "id":"status", "value":"online" }, { "configurationType":"siteConfiguration", "id":"timezone", "value":"Etc/UTC" }, { "configurationType":"siteConfiguration", "id":"timezoneOffset", "value":0 }, { "configurationType":"siteConfiguration", "id":"defaultCurrency", "value":"USD" }, { "configurationType":"siteConfiguration", "id":"allowedCurrencies", "value":[ "USD", "EUR" ] }, { "configurationType":"siteConfiguration", "id":"defaultLocale", "value":"default" }, { "configurationType":"siteConfiguration", "id":"allowedLocales", "value":[ { "country":"", "default":true, "displayCountry":"", "displayLanguage":"", "displayName":"default", "id":"default", "iso3Country":"", "iso3Language":"", "language":"", "name":"default" }, { "country":"DE", "default":false, "displayCountry":"Deutschland", "displayLanguage":"Deutsch", "displayName":"Deutsch (Deutschland)", "id":"de-DE", "iso3Country":"DEU", "iso3Language":"deu", "language":"de", "name":"German (Germany)" }, { "country":"", "default":false, "displayCountry":"", "displayLanguage":"Deutsch", "displayName":"Deutsch", "id":"de", "iso3Country":"", "iso3Language":"deu", "language":"de", "name":"German" }, { "country":"US", "default":false, "displayCountry":"United States", "displayLanguage":"English", "displayName":"English (United States)", "id":"en-US", "iso3Country":"USA", "iso3Language":"eng", "language":"en", "name":"English (United States)" }, { "country":"CA", "default":false, "displayCountry":"Canada", "displayLanguage":"English", "displayName":"English (Canada)", "id":"en-CA", "iso3Country":"CAN", "iso3Language":"eng", "language":"en", "name":"English (Canada)" }, { "country":"", "default":false, "displayCountry":"", "displayLanguage":"English", "displayName":"English", "id":"en", "iso3Country":"", "iso3Language":"eng", "language":"en", "name":"English" }, { "country":"", "default":false, "displayCountry":"", "displayLanguage":"español", "displayName":"español", "id":"es", "iso3Country":"", "iso3Language":"spa", "language":"es", "name":"Spanish" } ] }, { "configurationType":"globalConfiguration", "id":"SalesforcePaymentsAllowed", "value":true }, { "configurationType":"globalConfiguration", "id":"gcp", "value":"test-gcp-key" } ] }Caching
Caching capabilities are available for the Shopper Configuration APIs. For details, see Server-Side Web-Tier Caching.*
Simple example:
API Version: 0.0.33import { ShopperConfigurations } from "commerce-sdk-isomorphic"; const clientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; const shopperConfigurationsClient = new ShopperConfigurations(clientConfig);Last Updated: