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

# Invalidate a branch



## OpenAPI

````yaml /openapi.json post /policies/{policyId}/branches/{branchId}/invalidate
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /policies/{policyId}/branches/{branchId}/invalidate:
    post:
      tags:
        - branch
      summary: Invalidate a branch
      operationId: BranchController_invalidateBranch
      parameters:
        - name: policyId
          required: true
          in: path
          description: Unique identifier for the policy
          schema:
            type: string
        - name: branchId
          required: true
          in: path
          description: Unique identifier for the branch
          schema:
            type: string
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvalidateBranchInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidateBranchOutput'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ConflictingBranchStatusErrorDto'
              examples:
                CONFLICTING_BRANCH_STATUS:
                  $ref: '#/components/schemas/ConflictingBranchStatusErrorDto'
          description: ''
components:
  schemas:
    InvalidateBranchInputBody:
      type: object
      properties:
        reason:
          allOf:
            - $ref: '#/components/schemas/BranchCloseReasons'
      required:
        - reason
    InvalidateBranchOutput:
      type: object
      properties: {}
    PolicyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - POLICY_NOT_FOUND
        message:
          type: string
          example: Policy {policyId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/PolicyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    ConflictingBranchStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - CONFLICTING_BRANCH_STATUS
        message:
          type: string
          example: Branch status {requirement} {branchStatus} to perform {action}
        details:
          $ref: '#/components/schemas/ConflictingBranchStatusDetailsDto'
      required:
        - code
        - message
        - details
    BranchCloseReasons:
      type: string
      enum:
        - BROKER_REQUEST
        - CUSTOMER_REQUEST
        - FORKED
        - ASSET_START_PASSED
        - CONCURRENT_BRANCH_MERGED
        - QUOTE_INVALIDATED
        - PARTITION_DROPPED
        - RENEWAL_REFUSED
        - CRM_ABOVE_LIMIT
        - TELEMATICS_SCORE_MISSING
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    ConflictingBranchStatusDetailsDto:
      type: object
      properties:
        branchStatus:
          allOf:
            - $ref: '#/components/schemas/BranchStatus'
        requirement:
          allOf:
            - $ref: '#/components/schemas/OperationRequirement'
        action:
          allOf:
            - $ref: '#/components/schemas/Action'
      required:
        - branchStatus
        - requirement
        - action
    BranchStatus:
      type: string
      enum:
        - BRANCH_OPEN
        - BRANCH_MERGED
        - BRANCH_CLOSED
    OperationRequirement:
      type: string
      enum:
        - must be
        - must NOT be
        - must contain
        - must NOT contain
    Action:
      type: string
      enum:
        - PERFORM THIS ACTION
        - CREATE POLICY
        - CREATE ASSET
        - CREATE ASSET WITH START DATE
        - REPLACE ASSET
        - REMOVE ASSET
        - CHOOSE ASSET OPTIONS
        - STOP ASSET
        - EDIT ASSET
        - EDIT ASSET WITH START DATE
        - CREATE BRANCH
        - CREATE DEROGATION
        - CREATE MTA BRANCH
        - FORK TO NEW MTA BRANCH
        - FORK TO NEW NB BRANCH
        - FORK TO NEW RENEWAL BRANCH
        - FORK TO NEW REPRICING BRANCH
        - DEFINE PARENT POLICY ID
        - INITIALIZE CUSTOMER
        - EDIT CUSTOMER
        - DELETE CUSTOMER FROM POLICY
        - DECLARE CLAIMS HISTORY
        - SIGN
        - EDIT POLICY
        - EDIT POLICY EXTERNAL ID
        - CONFIRM POLICY
        - QUOTE POLICY
        - RETRIEVING QUOTE
        - STOP POLICY
        - SUSPEND POLICY
        - ACTIVATE POLICY
        - GENERATE MANDATE SIGNATURE REQUEST
        - GENERATE PAYMENT METHOD SECRET
        - CREATE CLAIM
        - FINALIZE RENEWAL
        - SEND CONTRACT TO SIGNATURE
        - GENERATE SIGNATURE REQUEST
        - GENERATE DOCUMENTS FOR SIGNATURE
        - APPROVE DISTRIBUTION REQUEST
        - DENY DISTRIBUTION REQUEST
        - REVOKED_DISTRIBUTION_REQUEST
        - DELETE DISTRIBUTION REQUEST
        - WAITING FOR SIGNATURE DISTRIBUTION REQUEST
        - UPDATE POLICY QUOTE

````