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

# Update plan template

> Update a plan template and its items for an organisation



## OpenAPI

````yaml https://api.halth.com/v1/api-yaml patch /v1/organisations/{organisationId}/plans/templates/{planTemplateId}
openapi: 3.0.0
info:
  title: HaltH API
  description: The API for the HaltH platform business services
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.halth.com
    description: Production
  - url: https://api.stg.halth.com
    description: Staging
security: []
tags: []
paths:
  /v1/organisations/{organisationId}/plans/templates/{planTemplateId}:
    patch:
      tags:
        - Plan Template
      summary: Update plan template
      description: Update a plan template and its items for an organisation
      operationId: PlanTemplateController_update
      parameters:
        - name: organisationId
          required: true
          in: path
          schema:
            type: string
        - name: planTemplateId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanTemplateUpdateParams'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanTemplate'
components:
  schemas:
    PlanTemplateUpdateParams:
      type: object
      properties:
        name:
          type: string
          maxLength: 500
        description:
          type: string
        price:
          type: number
          minimum: 0
        discountRate:
          type: number
          minimum: 0
          maximum: 1
        discountAmount:
          type: number
          minimum: 0
        currency:
          type: string
          minLength: 3
          maxLength: 3
        billingType:
          type: string
          enum:
            - one_off
            - recurring
        items:
          type: array
          items:
            $ref: '#/components/schemas/PlanTemplateItemParams'
    PlanTemplate:
      type: object
      properties:
        discountRate:
          type: number
          description: >-
            The discount rate applied to the plan, as a fraction between 0 and
            1.
          example: 0.1
        discountAmount:
          type: number
          description: The discount amount applied to the plan, in cents.
          example: 10000
        billingType:
          enum:
            - one_off
            - recurring
          type: string
          description: >-
            Whether the plan is intended to be billed as a one-off or on a
            recurring basis.
          example: recurring
        popularityRank:
          type: number
          description: >-
            Based on the number of subscriptions created from this plan
            template. Used for ranking plans by popularity.
        id:
          type: string
        createdAt:
          type: string
        name:
          type: string
        description:
          type: string
        price:
          type: number
        currency:
          type: string
        deleted:
          type: boolean
        items:
          type: array
          items:
            $ref: '#/components/schemas/PlanTemplateItem'
      required:
        - discountRate
        - discountAmount
        - billingType
        - popularityRank
        - id
        - createdAt
        - name
        - price
        - currency
        - deleted
        - items
    PlanTemplateItemParams:
      type: object
      properties:
        basePrice:
          type: number
          minimum: 0
          description: The original price of the item.
          example: 10000
        price:
          type: number
          minimum: 0
          description: The effective price of the item.
          example: 120000
        appointmentTypeId:
          type: string
          nullable: true
        billableItemId:
          type: string
          nullable: true
        providerId:
          type: string
          nullable: true
        sortOrder:
          type: number
          minimum: 0
      required:
        - basePrice
        - price
    PlanTemplateItem:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
        planTemplateId:
          type: string
        sortOrder:
          type: number
        appointmentTypeId:
          type: string
          nullable: true
        providerId:
          type: string
          nullable: true
        billableItemId:
          type: string
          nullable: true
        basePrice:
          type: number
        price:
          type: number
      required:
        - id
        - createdAt
        - planTemplateId
        - sortOrder
        - appointmentTypeId
        - providerId
        - billableItemId
        - basePrice
        - price

````