Templates
A Template is the content and copy layer for the Gamopanda end-user widget. It controls every piece of text and imagery that an end user sees — from the logged-in/logged-out titles down to the "Copied!" confirmation when they tap a coupon code. You create one Template per account and it is served to every end user and guest visitor who views the widget.
All text fields in a Template are localisable. Supply a languageCode query parameter when fetching the template to receive translated strings. This makes it straightforward to serve a fully localised widget with a single API call.
How it works
- Create a template — set the core
nameanddescription, then configure every EUD (end-user display) field with your brand copy and icons. - Widget loads — when a user opens the Gamopanda widget (logged in or not), it fetches the template to render titles, section headings, button labels, and empty-state messages.
- Logged-in vs logged-out — the widget automatically shows different copy depending on whether the user has an active session.
loggedInTitle/loggedInSubTitleare shown to authenticated users;loggedOutTitle/loggedOutSubTitleplus the sign-up and login CTAs are shown to guests. - Localisation — all fields are returned in the language requested via the
languageCodequery parameter. Falls back to the default language if no translation exists. - Guest access — templates are readable by unauthenticated visitors so the widget can render even before a user logs in.
Fields
Basic information
| Field | Type | Required | Max length | Description |
|---|---|---|---|---|
name | string | ✅ | 256 | Internal name for this template |
description | string | ✅ | 1 024 | Internal description for this template |
End-user display (EUD)
All fields below are localisable — they are stored per language and returned in the requested locale.
Logged-in state
Shown when an end user has an active session.
| Field | Default | Max length | Description |
|---|---|---|---|
loggedInTitle | — | 128 | Main title shown to authenticated users |
loggedInSubTitle | — | 256 | Subtitle shown to authenticated users |
Logged-out state
Shown when a visitor is not authenticated.
| Field | Default | Max length | Description |
|---|---|---|---|
loggedOutTitle | — | 128 | Main title shown to guests |
loggedOutSubTitle | — | 256 | Subtitle shown to guests |
joinNowButtonText | Join Now | 32 | CTA button label for new sign-ups |
signupUrl | — | — | URL (type: URL) the sign-up button points to |
alreadyHaveAccountText | Already have an account? | 128 | Prompt text shown alongside the login button |
loginButtonText | Login | 32 | CTA button label for returning users |
loginUrl | — | — | URL (type: URL) the login button points to |
Section headings & empty states
| Field | Default | Max length | Description |
|---|---|---|---|
streakSectionTitle | Streaks | 32 | Heading for the streaks section in the widget |
noStreaksTextMessage | There are no streaks available at the moment. Please check back later! | 256 | Shown when no active streaks exist |
challengeSectionTitle | Challenges | 32 | Heading for the challenges section in the widget |
noChallengesTextMessage | There are no challenges available at the moment. Please check back later! | 256 | Shown when no active challenges exist |
genericErrorMessage | Something went wrong. Please try again later! | 256 | Fallback message shown when any API error occurs |
Rewards
| Field | Default | Max length | Description |
|---|---|---|---|
rewardsPageTitle | Your Rewards | 32 | Title of the rewards tab/page |
rewardsViewAllButtonText | View All | 32 | Label for the "view all rewards" button |
noRewardsTextMessage | No rewards are available. Please participate in streaks and challenges to earn rewards! | 256 | Shown when the user has no reward logs |
rewardRedeemedLabel | Redeemed | 32 | Badge label for a redeemed reward |
rewardExpiredLabel | Expired | 32 | Badge label for an expired reward |
copiedText | Copied! | 32 | Confirmation text shown after a coupon code is copied to clipboard |
rewardIcon | (default reward icon) | — | Icon displayed alongside rewards. Allowed: PNG, JPEG, JPG, GIF, SVG · Max size: 100 KB |
Real-world examples
🛍️ E-commerce — English template
Code
To serve Spanish copy, update the template's language variant with ?languageCode=es:
Code
Unset language fields fall back to the default language automatically.
Fetching the template
As a guest (no authentication required):
Code
With localisation:
Code
As a logged in end user:
Code
Access & permissions
| Caller | Allowed operations | Notes |
|---|---|---|
| Admin | CREATE · GET · LIST · UPDATE · DELETE | Full control over templates |
| End user | GET | Read-only access to the template |
| Guest user | GET | Template is publicly readable — widget works before login |
Related resources
| Resource | Description |
|---|---|
| Streak | Streaks rendered in the streakSectionTitle section of the widget |
| Challenge | Challenges rendered in the challengeSectionTitle section |
| Reward Log | Rewards displayed in the rewardsPageTitle section |
| Floating Widget | The embeddable widget that uses this template for its copy |
API reference
See the API Reference for full request/response schemas and interactive examples for:
GET /schema/template/record— get the template (supports?languageCode=)POST /schema/template/record— create a templatePATCH /schema/template/record/{id}— update a templateDELETE /schema/template/record/{id}— delete a template