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

# Update organisation credit note template

> Updates organisation-level credit note template (global default). Request body: same as invoice template (boolean flags for grouping, line description formula with placeholders from GET line-item-description-fields, optional lineDescriptionTagGroupId, attachment strategy).



## OpenAPI

````yaml /api-reference/specs/billing.json put /finance/credit-note-template
openapi: 3.0.1
info:
  title: Billing Service
  description: Billing API for FlowPayroll
  contact:
    name: FlowPayroll
    email: support@flowpayroll.com
  version: v1
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1/billing
security:
  - X-Auth-Token: []
tags:
  - name: Account codes
    description: Create, update, archive, and delete accounting ledger codes.
  - name: Tax rates
    description: Manage default and custom tax rates.
  - name: Invoice & credit note templates
    description: >-
      Configure invoice and credit note templates, and list the available
      reference and description tokens.
  - name: Finance defaults
    description: >-
      Organisation finance defaults, pay element mappings, and attachment
      limits.
  - name: Invoices
  - name: Credit Notes
  - name: Clients
  - name: Integrations
  - name: Accounting Sync
paths:
  /finance/credit-note-template:
    put:
      tags:
        - Invoice & credit note templates
      summary: Update organisation credit note template
      description: >-
        Updates organisation-level credit note template (global default).
        Request body: same as invoice template (boolean flags for grouping, line
        description formula with placeholders from GET
        line-item-description-fields, optional lineDescriptionTagGroupId,
        attachment strategy).
      operationId: PutCreditNoteTemplate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentTemplateDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_DocumentTemplateDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_String'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_String'
components:
  schemas:
    DocumentTemplateDto:
      type: object
      properties:
        showSubsectionHeader:
          type: boolean
        showSubtotalInSubsection:
          type: boolean
        showSubtotalVatInSubsection:
          type: boolean
        showQuantitySumInSubsection:
          type: boolean
        showBottomSubtotals:
          type: boolean
        showVatInBottomSubtotals:
          type: boolean
        showQuantitySumInBottomSubtotals:
          type: boolean
        lineItemSortOrder:
          enum:
            - None
            - ByEmployee
            - ByPayElementThenEmployee
          type: string
        lineDescriptionFormula:
          type: string
          nullable: true
        lineDescriptionTagGroupId:
          type: string
          nullable: true
        attachmentStrategy:
          enum:
            - ExcessLost
            - MergeOnIntegration
          type: string
        includeAttachmentsWithOnlineInvoice:
          type: boolean
      additionalProperties: false
    ApiResponse_DocumentTemplateDto:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content_DocumentTemplateDto'
        metadata:
          $ref: '#/components/schemas/Metadata'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          nullable: true
        message:
          $ref: '#/components/schemas/Message'
      additionalProperties: false
    ApiResponse_String:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content_String'
        metadata:
          $ref: '#/components/schemas/Metadata'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
          nullable: true
        message:
          $ref: '#/components/schemas/Message'
      additionalProperties: false
    Content_DocumentTemplateDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/DocumentTemplateDto'
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: false
    Metadata:
      type: object
      properties:
        dateFormat:
          type: string
          nullable: true
        dateTimeFormat:
          type: string
          nullable: true
      additionalProperties: false
    Error:
      type: object
      properties:
        field:
          type: string
          nullable: true
        reasonText:
          type: string
          nullable: true
        reasonId:
          type: string
          nullable: true
        reasonParameters:
          type: array
          items:
            $ref: '#/components/schemas/Pair'
          nullable: true
      additionalProperties: false
    Message:
      type: object
      properties:
        text:
          type: string
          nullable: true
        textId:
          type: string
          nullable: true
        textParameters:
          type: array
          items:
            $ref: '#/components/schemas/Pair'
          nullable: true
      additionalProperties: false
    Content_String:
      type: object
      properties:
        data:
          type: string
          nullable: true
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: false
    Pair:
      type: object
      properties:
        key:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: Authentication token for API access
      name: X-Auth-Token
      in: header

````