> ## 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.

# Update Pass Template Information

> ### Update Pass Template Information

Updates the information of a specific pass template.

**Parameters:**
- `data` (UpdateTemplatePayload): The updated template data.
- `template` (Template): The template to update.

**Returns:**
- `dict`: The updated pass template information.



## OpenAPI

````yaml https://api.loyalty.dog/openapi.json put /v2/templates/{templateId}
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/templates/{templateId}:
    put:
      tags:
        - Pass Templates > Information
      summary: Update Pass Template Information
      description: |-
        ### Update Pass Template Information

        Updates the information of a specific pass template.

        **Parameters:**
        - `data` (UpdateTemplatePayload): The updated template data.
        - `template` (Template): The template to update.

        **Returns:**
        - `dict`: The updated pass template information.
      operationId: update_pass_template_information_v2_templates__templateId__put
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            anyOf:
              - $ref: '#/components/schemas/PydanticObjectId'
              - type: string
            title: Templateid
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTemplatePayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PydanticObjectId:
      type: string
      maxLength: 24
      minLength: 24
      pattern: ^[0-9a-f]{24}$
      example: 5eb7cf5a86d9755df3a6c593
    UpdateTemplatePayload:
      properties:
        name:
          type: string
          title: Name
        passType:
          anyOf:
            - type: string
            - type: 'null'
          title: Passtype
        description:
          anyOf:
            - $ref: '#/components/schemas/TemplatePass'
            - type: 'null'
        disablePush:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Disablepush
        placeholders:
          anyOf:
            - items:
                $ref: '#/components/schemas/TemplatePlaceholder'
              type: array
            - type: 'null'
          title: Placeholders
        branding:
          anyOf:
            - $ref: '#/components/schemas/TemplateBranding'
            - type: 'null'
        payment:
          anyOf:
            - $ref: '#/components/schemas/TemplatePayment'
            - type: 'null'
        restrictions:
          anyOf:
            - $ref: '#/components/schemas/TemplateRestrictions'
            - type: 'null'
        actions:
          anyOf:
            - $ref: '#/components/schemas/TemplateAction'
            - type: 'null'
        translations:
          anyOf:
            - $ref: '#/components/schemas/TemplateTranslation'
            - type: 'null'
        allowPassImages:
          anyOf:
            - items:
                $ref: '#/components/schemas/PassImageType'
              type: array
            - type: 'null'
          title: Allowpassimages
        stripImage:
          anyOf:
            - $ref: '#/components/schemas/TemplateStripImage'
            - type: 'null'
      type: object
      required:
        - name
      title: UpdateTemplatePayload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TemplatePass:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          default: ''
        suppressStripShine:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Suppressstripshine
        sharing:
          anyOf:
            - $ref: '#/components/schemas/PassSharing'
            - type: 'null'
        appLaunchURL:
          anyOf:
            - type: string
            - type: 'null'
          title: Applaunchurl
        associatedApps:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Associatedapps
        associatedStoreIdentifiers:
          items:
            type: integer
          type: array
          title: Associatedstoreidentifiers
        associatedPlayIdentifiers:
          items:
            type: string
          type: array
          title: Associatedplayidentifiers
        beacons:
          items:
            $ref: '#/components/schemas/PassBeacon'
          type: array
          title: Beacons
        locations:
          items:
            $ref: '#/components/schemas/PassLocation'
          type: array
          title: Locations
        barcodes:
          items:
            $ref: '#/components/schemas/PassBarcode'
          type: array
          title: Barcodes
        barcode:
          anyOf:
            - $ref: '#/components/schemas/PassBarcode'
            - type: 'null'
        labelColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Labelcolor
        backgroundColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Backgroundcolor
        foregroundColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Foregroundcolor
        logoText:
          anyOf:
            - type: string
            - type: 'null'
          title: Logotext
        relevantDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Relevantdate
        expirationDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirationdate
        voided:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Voided
        userInfo:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Userinfo
        generic:
          anyOf:
            - $ref: '#/components/schemas/PassInformation'
            - type: 'null'
        coupon:
          anyOf:
            - $ref: '#/components/schemas/PassInformation'
            - type: 'null'
        storeCard:
          anyOf:
            - $ref: '#/components/schemas/PassInformation'
            - type: 'null'
        eventTicket:
          anyOf:
            - $ref: '#/components/schemas/PassInformation'
            - type: 'null'
        boardingPass:
          anyOf:
            - $ref: '#/components/schemas/PassInformation'
            - type: 'null'
      type: object
      title: TemplatePass
    TemplatePlaceholder:
      properties:
        name:
          type: string
          title: Name
        type:
          $ref: '#/components/schemas/TemplatePlaceholderType'
          default: text
        displayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayname
        defaultValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Defaultvalue
        points:
          anyOf:
            - type: integer
            - type: 'null'
          title: Points
        options:
          anyOf:
            - type: string
            - type: 'null'
          title: Options
        required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Required
      type: object
      required:
        - name
      title: TemplatePlaceholder
    TemplateBranding:
      properties:
        titleText:
          anyOf:
            - type: string
            - type: 'null'
          title: Titletext
        headerText:
          anyOf:
            - type: string
            - type: 'null'
          title: Headertext
        bodyTextColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Bodytextcolor
        footerTextColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Footertextcolor
        footerBackgroundColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Footerbackgroundcolor
        footerImage:
          anyOf:
            - $ref: '#/components/schemas/ImageObject'
            - type: 'null'
      type: object
      title: TemplateBranding
    TemplatePayment:
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        provider:
          anyOf:
            - $ref: '#/components/schemas/TemplatePaymentProvider'
            - type: 'null'
        providerSettings:
          anyOf:
            - $ref: '#/components/schemas/TemplatePaymentSettings'
            - type: 'null'
      type: object
      title: TemplatePayment
    TemplateRestrictions:
      properties:
        quantityRestriction:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quantityrestriction
        redemptionRestriction:
          anyOf:
            - type: integer
            - type: 'null'
          title: Redemptionrestriction
        passwordProtection:
          anyOf:
            - type: string
            - type: 'null'
          title: Passwordprotection
        sharingRestriction:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Sharingrestriction
        dateRestriction:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Daterestriction
        returningUserRestriction:
          anyOf:
            - $ref: '#/components/schemas/ReturningUserRestrictionType'
            - type: 'null'
        passSharingMethod:
          anyOf:
            - $ref: '#/components/schemas/TemplateSharingMethod'
            - type: 'null'
      type: object
      title: TemplateRestrictions
    TemplateAction:
      properties:
        redeem:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redeem
        reactivate:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Reactivate
        updateFields:
          items:
            type: string
          type: array
          title: Updatefields
      type: object
      title: TemplateAction
    TemplateTranslation:
      properties:
        baseLanguage:
          type: string
          title: Baselanguage
          default: en
        strings:
          additionalProperties:
            additionalProperties:
              type: string
            type: object
          type: object
          title: Strings
      type: object
      title: TemplateTranslation
    PassImageType:
      type: string
      enum:
        - logo
        - icon
        - strip
        - footer
        - background
        - thumbnail
      title: PassImageType
      description: |-
        Supported images
            Boarding pass:  logo, icon, footer
            Coupon:         logo, icon, strip
            Event ticket:   logo, icon, strip, background, thumbnail
                            If you specify a strip image, do not specify a background image or a thumbnail.
            Generic:        logo, icon, thumbnail
            Store card:     logo, icon, strip

        Args:
            StrEnum (_type_): _description_
    TemplateStripImage:
      properties:
        generator:
          anyOf:
            - $ref: '#/components/schemas/TemplateStripImageGenerator'
            - type: 'null'
        placeholder:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeholder
        stamps:
          anyOf:
            - type: integer
            - type: 'null'
          title: Stamps
        backgroundColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Backgroundcolor
        backgroundImage:
          anyOf:
            - $ref: '#/components/schemas/ImageObject'
            - type: 'null'
        stampedColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Stampedcolor
        stampedImage:
          anyOf:
            - $ref: '#/components/schemas/ImageObject'
            - type: 'null'
        unstampedColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Unstampedcolor
        unstampedImage:
          anyOf:
            - $ref: '#/components/schemas/ImageObject'
            - type: 'null'
      type: object
      title: TemplateStripImage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PassSharing:
      properties:
        method:
          $ref: '#/components/schemas/PassSharingMethod'
          default: PKPassSharingMethodDisabled
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
      type: object
      title: PassSharing
    PassBeacon:
      properties:
        proximityUUID:
          type: string
          title: Proximityuuid
        major:
          anyOf:
            - type: integer
            - type: 'null'
          title: Major
        minor:
          anyOf:
            - type: integer
            - type: 'null'
          title: Minor
        relevantText:
          anyOf:
            - type: string
            - type: 'null'
          title: Relevanttext
      type: object
      required:
        - proximityUUID
      title: PassBeacon
    PassLocation:
      properties:
        latitude:
          type: number
          title: Latitude
          default: 0
        longitude:
          type: number
          title: Longitude
          default: 0
        altitude:
          type: number
          title: Altitude
          default: 0
        distance:
          anyOf:
            - type: number
            - type: 'null'
          title: Distance
        relevantText:
          anyOf:
            - type: string
            - type: 'null'
          title: Relevanttext
      type: object
      title: PassLocation
    PassBarcode:
      properties:
        format:
          $ref: '#/components/schemas/PassBarcodeFormat'
        message:
          type: string
          title: Message
        messageEncoding:
          type: string
          title: Messageencoding
          default: iso-8859-1
        altText:
          anyOf:
            - type: string
            - type: 'null'
          title: Alttext
        verifier:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Verifier
        disabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Disabled
      type: object
      required:
        - format
        - message
      title: PassBarcode
    PassInformation:
      properties:
        headerFields:
          items:
            $ref: '#/components/schemas/PassField'
          type: array
          title: Headerfields
        primaryFields:
          items:
            $ref: '#/components/schemas/PassField'
          type: array
          title: Primaryfields
        secondaryFields:
          items:
            $ref: '#/components/schemas/PassField'
          type: array
          title: Secondaryfields
        backFields:
          items:
            $ref: '#/components/schemas/PassField'
          type: array
          title: Backfields
        auxiliaryFields:
          items:
            $ref: '#/components/schemas/PassField'
          type: array
          title: Auxiliaryfields
        transitType:
          anyOf:
            - $ref: '#/components/schemas/PassTransitType'
            - type: 'null'
      type: object
      title: PassInformation
    TemplatePlaceholderType:
      type: string
      enum:
        - text
        - email
        - number
        - date
        - selection
        - json
      title: TemplatePlaceholderType
    ImageObject:
      properties:
        key:
          anyOf:
            - type: string
            - type: 'null'
          title: Key
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      type: object
      title: ImageObject
    TemplatePaymentProvider:
      type: string
      enum:
        - PayPalNVP
        - Stripe
        - PAYMILL
      title: TemplatePaymentProvider
    TemplatePaymentSettings:
      properties:
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
        signature:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature
        sandbox:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Sandbox
        itemName:
          anyOf:
            - type: string
            - type: 'null'
          title: Itemname
        publishableKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Publishablekey
        secretKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Secretkey
        publicKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Publickey
        privateKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Privatekey
      type: object
      title: TemplatePaymentSettings
    ReturningUserRestrictionType:
      type: string
      enum:
        - user_decides
        - show_existing
        - create_new
      title: ReturningUserRestrictionType
    TemplateSharingMethod:
      type: string
      enum:
        - pass
        - url
        - disabled
      title: TemplateSharingMethod
    TemplateStripImageGenerator:
      type: string
      enum:
        - stamp
      title: TemplateStripImageGenerator
    PassSharingMethod:
      type: string
      enum:
        - PKPassSharingMethodURL
        - PKPassSharingMethodDisabled
      title: PassSharingMethod
    PassBarcodeFormat:
      type: string
      enum:
        - PKBarcodeFormatPDF417
        - PKBarcodeFormatQR
        - PKBarcodeFormatAztec
        - PKBarcodeFormatCode128
      title: PassBarcodeFormat
      description: >-
        The pass barcodes have 2 fields, 'barcode' is legacy so limit it to the
        legacy formats, 'barcodes' supports all.

        Legacy formats: PDF417, QR, and AZTEC
    PassField:
      properties:
        key:
          type: string
          title: Key
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: string
              format: date-time
          title: Value
        attributedValue:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: string
              format: date-time
            - type: 'null'
          title: Attributedvalue
        changeMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Changemessage
        textAlignment:
          anyOf:
            - $ref: '#/components/schemas/PassTextAlignment'
            - type: 'null'
        dataDetectorTypes:
          anyOf:
            - items:
                $ref: '#/components/schemas/PassDataDetectorType'
              type: array
            - type: 'null'
          title: Datadetectortypes
        dateStyle:
          anyOf:
            - $ref: '#/components/schemas/PassDateStyle'
            - type: 'null'
        timeStyle:
          anyOf:
            - $ref: '#/components/schemas/PassDateStyle'
            - type: 'null'
        isRelative:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isrelative
        ignoresTimeZone:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ignorestimezone
        numberStyle:
          anyOf:
            - $ref: '#/components/schemas/PassNumberStyle'
            - type: 'null'
        currencyCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Currencycode
        googleHideOnCard:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Googlehideoncard
        googleHideOnBack:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Googlehideonback
        googleFieldType:
          anyOf:
            - type: string
            - type: 'null'
          title: Googlefieldtype
        googleUri:
          anyOf:
            - type: string
            - type: 'null'
          title: Googleuri
        googleLabel:
          anyOf:
            - type: string
            - type: 'null'
          title: Googlelabel
        googleValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Googlevalue
      type: object
      required:
        - key
        - value
      title: PassField
    PassTransitType:
      type: string
      enum:
        - PKTransitTypeAir
        - PKTransitTypeTrain
        - PKTransitTypeBus
        - PKTransitTypeBoat
        - PKTransitTypeGeneric
      title: PassTransitType
    PassTextAlignment:
      type: string
      enum:
        - PKTextAlignmentLeft
        - PKTextAlignmentCenter
        - PKTextAlignmentRight
        - PKTextAlignmentJustified
        - PKTextAlignmentNatural
      title: PassTextAlignment
    PassDataDetectorType:
      type: string
      enum:
        - PKDataDetectorTypePhoneNumber
        - PKDataDetectorTypeLink
        - PKDataDetectorTypeAddress
        - PKDataDetectorTypeCalendarEvent
      title: PassDataDetectorType
    PassDateStyle:
      type: string
      enum:
        - PKDateStyleNone
        - PKDateStyleShort
        - PKDateStyleMedium
        - PKDateStyleLong
        - PKDateStyleFull
      title: PassDateStyle
    PassNumberStyle:
      type: string
      enum:
        - PKNumberStyleDecimal
        - PKNumberStylePercent
        - PKNumberStyleScientific
        - PKNumberStyleSpellOut
      title: PassNumberStyle
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token obtained from POST /v2/token.

````