Loyalty Portal Config
Admin-facing endpoints for reading and updating a workspace's loyalty portal configuration — the branding, visible sections, and custom CSS that drive the public loyalty portal. Both endpoints are workspace-scoped and require Bearer-token auth from a member of the workspace.
These manage the internal config record (including
logo_file_idand audit fields). The end-user-facing, slug-keyed view of the same data is served by the Public Loyalty Portal API.
Get Loyalty Portal Config
GET /wallethero-api/workspace/:workspaceId/loyalty-portal-config
Returns the workspace's loyalty portal config. If none exists yet, a default config is created (enabled, all sections shown) and returned.
Auth: Bearer token — workspace member
Path Parameters
| Parameter | Type | Description |
|---|---|---|
workspaceId | string (UUID) | Workspace identifier |
Example Request
curl "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/loyalty-portal-config" \
-H "Authorization: Bearer YOUR_TOKEN"Response (200)
{
"data": {
"id": "lpc00000-0000-0000-0000-000000000001",
"workspace_id": "WORKSPACE_ID",
"is_enabled": true,
"logo_file_id": "f1000000-0000-0000-0000-000000000001",
"primary_color": "#1a1a1a",
"background_color": "#ffffff",
"welcome_title": "Welcome back!",
"welcome_subtitle": "Track your points and rewards.",
"show_tier": true,
"show_rewards": true,
"show_redemption_history": true,
"show_referral": true,
"cta_label": "View rewards",
"custom_css": null,
"date_created": "2026-01-10T12:00:00.000Z",
"date_updated": "2026-02-01T08:30:00.000Z",
"user_created": "u1000000-0000-0000-0000-000000000001",
"user_updated": "u1000000-0000-0000-0000-000000000001"
}
}SDK
const { data: config } = await wh.loyaltyPortalConfig.get(workspaceId);Update Loyalty Portal Config
PUT /wallethero-api/workspace/:workspaceId/loyalty-portal-config
Updates the workspace's loyalty portal config. The config record is created first if it does not exist, then the supplied fields are applied. All body fields are optional; only the provided fields are changed.
Auth: Bearer token — workspace member
Path Parameters
| Parameter | Type | Description |
|---|---|---|
workspaceId | string (UUID) | Workspace identifier |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
is_enabled | boolean | No | Whether the public loyalty portal is enabled |
logo_file_id | string (UUID) | null | No | Directus file ID of the portal logo |
primary_color | string | null | No | Primary brand color (max 20 chars; hex/CSS color value) |
background_color | string | null | No | Background color (max 20 chars; hex/CSS color value) |
welcome_title | string | null | No | Welcome heading (max 255 chars) |
welcome_subtitle | string | null | No | Welcome subheading (max 2000 chars) |
show_tier | boolean | No | Show the tier section |
show_rewards | boolean | No | Show the rewards section |
show_redemption_history | boolean | No | Show the redemption history section |
show_referral | boolean | No | Show the referral section |
cta_label | string | null | No | Call-to-action button label (max 120 chars) |
custom_css | string | null | No | Custom CSS injected into the portal (max 50000 chars) |
Example Request
curl -X PUT "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/loyalty-portal-config" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"is_enabled": true,
"primary_color": "#1a1a1a",
"welcome_title": "Welcome back!",
"show_referral": false
}'Response (200)
{
"data": {
"id": "lpc00000-0000-0000-0000-000000000001",
"workspace_id": "WORKSPACE_ID",
"is_enabled": true,
"logo_file_id": "f1000000-0000-0000-0000-000000000001",
"primary_color": "#1a1a1a",
"background_color": "#ffffff",
"welcome_title": "Welcome back!",
"welcome_subtitle": "Track your points and rewards.",
"show_tier": true,
"show_rewards": true,
"show_redemption_history": true,
"show_referral": false,
"cta_label": "View rewards",
"custom_css": null,
"date_updated": "2026-02-15T10:00:00.000Z",
"user_updated": "u1000000-0000-0000-0000-000000000001"
}
}SDK
const { data: config } = await wh.loyaltyPortalConfig.update(workspaceId, {
is_enabled: true,
primary_color: "#1a1a1a",
welcome_title: "Welcome back!",
show_referral: false,
});