getConfiguration

Get your loyalty SDK configuration

Description

Get all the informations of your Loyalty Web Kit SDK Configuration.

Response

Returns a Promise containing an object with the configuration of your SDK. Example:

{
  theme: {
    fonts: {
      main: 'Trebuchet MS',
    },
    colors: {
      text: '#2B2B2B',
      primary: '#05264D',
      tertiary: '#FFE36C',
      secondary: '#12C39D',
    },
    images: {
      'url-empty-list':
        '{{emptyListUrl}}'
    },
  },
  tiers: [], //array of tier objects
  rewards: [], //array of reward objects
  missions: [], //array of mission objects
  settings: {
    isActive: true,
    allowAmplitudeEvents: true,
    isMobileWalletsActivated: true,
    displayAddRewardToCartButton: true,
  },
  aboutLink: '{{aboutLink}}',
  program_id: 1,
  translation: {
    fr: {}, // translations overrides for french
    en: {}, // translations overrides for english
  },
  unconnected: {
    signin: 'https://splio.com', //login link
    signup: 'https://splio.com', //signup link
  },
  configuration_name: 'My Loyalty SDK config',
};

Code example

splioSDK.getConfiguration().then((configuration) => {
  console.log("Configuration name of this program", configuration.configuration_name);
});