Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Avelero/avelero/llms.txt

Use this file to discover all available pages before exploring further.

Get theme

Retrieve the complete theme configuration (styles and content) for the active brand.
const theme = await trpc.brand.theme.get.query();

Response

themeStyles
object
Complete theme styles configuration including colors, typography, and component styling
themeConfig
object
Theme content configuration including branding, menus, CTAs, and section visibility
googleFontsUrl
string | null
Google Fonts URL for loading custom fonts, if configured
updatedAt
string | null
ISO 8601 timestamp of last theme update

Default values

If no theme is configured, returns:
{
  "themeStyles": {},
  "themeConfig": {},
  "googleFontsUrl": null,
  "updatedAt": null
}

Update theme config

Update the theme content configuration (menus, banner, social links, section visibility, carousel settings).
This endpoint updates content configuration only, not theme styles. Image URLs in the config are automatically normalized to storage paths.
const result = await trpc.brand.theme.update.mutate({
  config: {
    branding: {
      headerLogoUrl: "/api/storage/theme-images/logo.png"
    },
    menus: {
      primary: [
        { label: "About", url: "https://acme.com/about" },
        { label: "Contact", url: "https://acme.com/contact" }
      ],
      secondary: []
    },
    sections: {
      showProductDetails: true,
      showImpact: true,
      showMaterials: true,
      showJourney: true,
      showCTABanner: false
    },
    carousel: {
      productCount: 4,
      showPrice: true,
      showTitle: true
    }
  }
});

Input parameters

config
object
required
Theme configuration object (stored as JSONB)Note: Validation is performed client-side. The API accepts any object structure.

Behavior

  • Image path normalization: URLs in the config are converted to storage paths before saving
  • Cache revalidation: All Digital Product Passport pages for the brand are revalidated (fire-and-forget)
  • Validation failures: Revalidation errors don’t affect the response—config update succeeds regardless

Errors

  • 500 Internal Server Error: Failed to update theme config

Theme config structure

Complete structure of the ThemeConfig object:

Branding

branding.headerLogoUrl
string
URL or storage path for the header logo image
menus.primary
array
Primary navigation menu itemsEach item contains:
  • label (string) - Menu item text
  • url (string) - Link destination
menus.secondary
array
Secondary navigation menu itemsSame structure as primary menu

CTA banner

cta.bannerBackgroundImage
string
Background image URL for the CTA banner
cta.bannerHeadline
string
Main headline text for the banner
cta.bannerSubline
string
Subheadline text for the banner
cta.bannerCTAText
string
Call-to-action button text
cta.bannerCTAUrl
string
Call-to-action button URL
cta.showHeadline
boolean
Toggle headline visibilityDefault: true
cta.showSubline
boolean
Toggle subline visibilityDefault: true
cta.showButton
boolean
Toggle CTA button visibilityDefault: true
social.showInstagram
boolean
Show Instagram icon in footerDefault: false
social.showFacebook
boolean
Show Facebook icon in footerDefault: false
social.showTwitter
boolean
Show Twitter/X icon in footerDefault: false
social.showPinterest
boolean
Show Pinterest icon in footerDefault: false
social.showTiktok
boolean
Show TikTok icon in footerDefault: false
social.showLinkedin
boolean
Show LinkedIn icon in footerDefault: false
social.instagramUrl
string
Instagram profile URL
social.facebookUrl
string
Facebook page URL
social.twitterUrl
string
Twitter/X profile URL
social.pinterestUrl
string
Pinterest profile URL
social.tiktokUrl
string
TikTok profile URL
social.linkedinUrl
string
LinkedIn company page URL

Section visibility

sections.showProductDetails
boolean
Show product details section on DPPDefault: true
sections.showPrimaryMenu
boolean
Show primary navigation menuDefault: false
sections.showSecondaryMenu
boolean
Show secondary navigation menuDefault: false
sections.showImpact
boolean
Show environmental impact sectionDefault: true
sections.showMaterials
boolean
Show materials composition sectionDefault: true
sections.showJourney
boolean
Show product journey/traceability sectionDefault: true
sections.showSimilarProducts
boolean
Show similar products carouselDefault: false
sections.showCTABanner
boolean
Show CTA banner sectionDefault: false

Materials section

materials.showCertificationCheckIcon
boolean
Show check icon next to certified materialsDefault: true
Number of products to display in carouselDefault: 4
Display product prices in carouselDefault: true
Display product titles in carouselDefault: true
Round prices to nearest whole numberDefault: true
FilterState structure for selecting which products to showOptional - Applies product filters to carousel selection
Array of product UUIDs to include in carouselOptional - Explicitly include specific products
Array of product UUIDs to exclude from carouselOptional - Explicitly exclude specific products

Build docs developers (and LLMs) love