> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loyalty.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Savemerchanttheme

> Validate and persist the authenticated merchant's portal theme.



## OpenAPI

````yaml https://api.loyalty.dog/openapi.json put /v2/giftcards/merchants/theme
openapi: 3.1.0
info:
  title: LoyaltyDog
  description: >-

    Welcome to the LoyaltyDog API! This API provides access to our loyalty
    program features, allowing you to integrate with various platforms and
    manage your loyalty data.


    Want to query LoyaltyDog via an AI assistant (Claude, Cursor, Windsurf)? See
    the [MCP Integration guide](https://loyaltydog.ai/playground#mcp).
        
  termsOfService: https://loyalty.dog/loyalty-program-terms-service
  contact:
    name: LoyaltyDog Support
    url: https://loyalty.dog/contact-us
    email: support@loyalty.dog
  version: 1.0.1
servers:
  - url: https://api.loyalty.dog
    description: Production
security:
  - bearerAuth: []
paths:
  /v2/giftcards/merchants/theme:
    put:
      tags:
        - Gift Card Merchants
      summary: Savemerchanttheme
      description: Validate and persist the authenticated merchant's portal theme.
      operationId: saveMerchantTheme_v2_giftcards_merchants_theme_put
      parameters:
        - name: X-Eposn-Merchant-Token
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Eposn-Merchant-Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GiftCardMerchantTheme'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveMerchantThemeResponse'
        '422':
          description: Theme validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  issues:
                    items:
                      $ref: '#/components/schemas/ThemeValidationIssue'
                    type: array
                  warnings:
                    items:
                      $ref: '#/components/schemas/ThemeValidationIssue'
                    type: array
components:
  schemas:
    GiftCardMerchantTheme:
      properties:
        presetId:
          type: string
          maxLength: 100
          minLength: 1
          title: Presetid
          default: eposn-default
        primary:
          type: string
          maxLength: 7
          title: Primary
          default: '#15803d'
        primaryFg:
          type: string
          maxLength: 7
          title: Primaryfg
          default: '#ffffff'
        sidebarBg:
          type: string
          maxLength: 7
          title: Sidebarbg
          default: '#ffffff'
        sidebarText:
          type: string
          maxLength: 7
          title: Sidebartext
          default: '#4b5563'
        sidebarActiveBg:
          type: string
          maxLength: 7
          title: Sidebaractivebg
          default: '#f0fdf4'
        sidebarActiveText:
          type: string
          maxLength: 7
          title: Sidebaractivetext
          default: '#15803d'
        sidebarBadge:
          type: string
          maxLength: 7
          title: Sidebarbadge
          default: '#15803d'
        background:
          type: string
          maxLength: 7
          title: Background
          default: '#f9fafb'
        foreground:
          type: string
          maxLength: 7
          title: Foreground
          default: '#111827'
        surface:
          type: string
          maxLength: 7
          title: Surface
          default: '#ffffff'
        border:
          type: string
          maxLength: 7
          title: Border
          default: '#e5e7eb'
        muted:
          type: string
          maxLength: 7
          title: Muted
          default: '#6b7280'
        logoUrl:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Logourl
        logoAlt:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Logoalt
        fontFamily:
          anyOf:
            - type: string
              maxLength: 255
              pattern: ^[A-Za-z0-9 ,'\"._\-]+$
            - type: 'null'
          title: Fontfamily
        borderRadius:
          $ref: '#/components/schemas/GiftCardMerchantThemeBorderRadius'
          default: lg
      type: object
      title: GiftCardMerchantTheme
      description: Persisted merchant-facing theme configuration for the EPOSN portal.
    SaveMerchantThemeResponse:
      properties:
        theme:
          $ref: '#/components/schemas/GiftCardMerchantTheme'
        validation:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ThemeValidationIssue'
            type: array
          type: object
          title: Validation
        performance:
          $ref: '#/components/schemas/ThemePerformanceReport'
      type: object
      required:
        - theme
        - validation
        - performance
      title: SaveMerchantThemeResponse
    ThemeValidationIssue:
      properties:
        field:
          type: string
          title: Field
        severity:
          type: string
          title: Severity
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - field
        - severity
        - code
        - message
      title: ThemeValidationIssue
    GiftCardMerchantThemeBorderRadius:
      type: string
      enum:
        - none
        - sm
        - md
        - lg
        - full
      title: GiftCardMerchantThemeBorderRadius
    ThemePerformanceReport:
      properties:
        cssVarChanges:
          type: integer
          title: Cssvarchanges
        hasCustomFont:
          type: boolean
          title: Hascustomfont
        hasLargeLogo:
          type: boolean
          title: Haslargelogo
        issues:
          items:
            $ref: '#/components/schemas/ThemePerformanceIssue'
          type: array
          title: Issues
        score:
          type: integer
          title: Score
      type: object
      required:
        - cssVarChanges
        - hasCustomFont
        - hasLargeLogo
        - issues
        - score
      title: ThemePerformanceReport
    ThemePerformanceIssue:
      properties:
        severity:
          type: string
          title: Severity
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        estimatedMs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Estimatedms
      type: object
      required:
        - severity
        - code
        - message
      title: ThemePerformanceIssue
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from POST /v2/token.

````