Skip to main content
Version: 2.0.0

sodexo-bookings-template

The sodexo-bookings-template component displays all user transactions and booking history. This template includes built-in API integration, i18n, cart management, and theme provider.

Authentication Required

This template requires a valid authentication token to access booking and transaction data.

Properties

PropertyHTML AttributeTypeDefaultDescription
themethemeThemeDefault Sodexo themeCustomization variables for Sodexo components theme
apiKeyapi-keystring-X-API-key for Sodexo API
tokentokenstring-Authentication token for Sodexo API

Usage

<!DOCTYPE html>
<html>
<body>
<sodexo-bookings-template
api-key="your-api-key"
token="user-auth-token"
></sodexo-bookings-template>

<script>
const element = document.querySelector('sodexo-bookings-template');

// Apply custom theme
element.theme = {
'--sodexo-primary-color': '#283897',
'--sodexo-primary-text-color': '#283897',
'--sodexo-primary-background-color': '#f7f8ff',
'--sodexo-font-family': 'Open Sans',
};
</script>

</body>
</html>

Property Naming Convention

Naming Syntax

When using properties:

  • In HTML: Use kebab-case (e.g., api-key, token)
  • In JavaScript: Use camelCase (e.g., apiKey, token)