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

# Authorise Credit Note

> Locks the credit note (status → AUTHORISED) and makes it available for allocation to invoices. Syncs to external accounting provider if connected.



## OpenAPI

````yaml /api-reference/specs/billing.json post /clients/{clientId}/credit-notes/{creditNoteId}/authorise
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:
  /clients/{clientId}/credit-notes/{creditNoteId}/authorise:
    post:
      tags:
        - Credit Notes
      summary: Authorise Credit Note
      description: >-
        Locks the credit note (status → AUTHORISED) and makes it available for
        allocation to invoices. Syncs to external accounting provider if
        connected.
      operationId: AuthoriseCreditNote
      parameters:
        - name: clientId
          in: path
          required: true
          schema:
            type: string
        - name: creditNoteId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthoriseRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_CreditNoteDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_String'
        '404':
          description: Not Found
          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:
    AuthoriseRequest:
      type: object
      additionalProperties: false
    ApiResponse_CreditNoteDto:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content_CreditNoteDto'
        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_CreditNoteDto:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreditNoteDto'
        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
    CreditNoteDto:
      type: object
      properties:
        id:
          type: string
        creditNoteNumber:
          type: string
          nullable: true
        clientId:
          type: string
        organisationId:
          type: string
        type:
          enum:
            - SalesCredit
            - PurchaseCredit
          type: string
        date:
          type: string
        status:
          enum:
            - Draft
            - Authorised
            - Paid
            - Voided
          type: string
        lineAmountTypes:
          enum:
            - Exclusive
            - Inclusive
            - NoTax
          type: string
        subTotal:
          type: number
          format: double
        totalTax:
          type: number
          format: double
        amount:
          type: number
          format: double
        balanceDue:
          type: number
          format: double
        reference:
          type: string
          nullable: true
        invoiceReference:
          type: string
          nullable: true
        linkedInvoiceId:
          type: string
          nullable: true
        groupingKey:
          type: string
          nullable: true
        invoiceFormat:
          enum:
            - None
            - Date
            - PayElementId
            - PoNumber
            - TagGroup
            - PayrollConfigId
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        currencyCode:
          type: string
        currencyRate:
          type: number
          format: double
        subtotalGroups:
          type: array
          items:
            $ref: '#/components/schemas/SubtotalGroupDto'
          nullable: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/DocumentAttachmentDto'
          nullable: true
        linesWithoutAttachmentsCount:
          type: integer
          format: int32
        linesWithoutPoNumberCount:
          type: integer
          format: int32
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/AllocationDto'
        externalId:
          type: string
          nullable: true
        externalProvider:
          type: string
          nullable: true
        lastSyncedAt:
          type: string
          nullable: true
        syncStatus:
          enum:
            - NotSynced
            - Synced
            - SyncFailed
            - Pending
          type: string
        syncErrorMessage:
          type: string
          nullable: true
        syncErrorCode:
          type: string
          nullable: true
        externalProviderStatus:
          type: string
          nullable: true
        emailSent:
          type: boolean
        emailSentAt:
          type: string
          nullable: true
        emailSentBy:
          type: string
          nullable: true
        createdDate:
          type: string
        createdBy:
          type: string
        updatedDate:
          type: string
          nullable: true
        updatedBy:
          type: string
          nullable: true
      additionalProperties: false
    Pair:
      type: object
      properties:
        key:
          type: string
          nullable: true
        value:
          type: string
          nullable: true
      additionalProperties: false
    SubtotalGroupDto:
      type: object
      properties:
        label:
          type: string
        amount:
          type: number
          format: double
        taxAmount:
          type: number
          format: double
        totalAmount:
          type: number
          format: double
        sortOrder:
          type: integer
          format: int32
      additionalProperties: false
    DocumentAttachmentDto:
      type: object
      properties:
        id:
          type: string
        fileName:
          type: string
        url:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        s3Key:
          type: string
          nullable: true
        contentType:
          type: string
          nullable: true
        fileSize:
          type: integer
          format: int64
          nullable: true
        uploadedDate:
          type: string
          nullable: true
        uploadedBy:
          type: string
          nullable: true
        downloadUrl:
          type: string
          nullable: true
        downloadUrlExpiresAt:
          type: string
          nullable: true
      additionalProperties: false
    AllocationDto:
      type: object
      properties:
        allocationId:
          type: string
        creditNoteId:
          type: string
        invoiceId:
          type: string
        amount:
          type: number
          format: double
        date:
          type: string
        invoice:
          $ref: '#/components/schemas/AllocationInvoiceDto'
      additionalProperties: false
    AllocationInvoiceDto:
      type: object
      properties:
        invoiceId:
          type: string
        invoiceNumber:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      description: Authentication token for API access
      name: X-Auth-Token
      in: header

````