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

# Create derogation



## OpenAPI

````yaml /openapi.json post /derogations/branches/{branchId}
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /derogations/branches/{branchId}:
    post:
      tags:
        - derogations
      summary: Create derogation
      operationId: DerogationController_createDerogation
      parameters:
        - name: branchId
          required: true
          in: path
          description: Id of the branch
          schema:
            type: string
        - name: action
          required: true
          in: query
          description: Action for the derogation
          schema:
            $ref: '#/components/schemas/DerogationAction'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DerogationCreateOutput'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/BranchNotFoundErrorDto'
              examples:
                BRANCH_NOT_FOUND:
                  $ref: '#/components/schemas/BranchNotFoundErrorDto'
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/NoDerogationToCreateErrorDto'
                  - $ref: '#/components/schemas/DerogationAlreadyExistsErrorDto'
              examples:
                NO_DEROGATION_TO_CREATE:
                  $ref: '#/components/schemas/NoDerogationToCreateErrorDto'
                DEROGATION_ALREADY_EXISTS:
                  $ref: '#/components/schemas/DerogationAlreadyExistsErrorDto'
          description: ''
components:
  schemas:
    DerogationAction:
      type: string
      enum:
        - QUOTE
        - CONFIRM
        - SIGN
    DerogationCreateOutput:
      type: object
      properties:
        type:
          type: string
          description: type of entity
        id:
          type: string
          description: id of the entity
      required:
        - type
        - id
    BranchNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - BRANCH_NOT_FOUND
        message:
          type: string
          example: Branch {branchId} not found
        details:
          $ref: '#/components/schemas/BranchNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    NoDerogationToCreateErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - NO_DEROGATION_TO_CREATE
        message:
          type: string
          example: No derogation needs to be created for {action} on branch {branchId}
        details:
          $ref: '#/components/schemas/NoDerogationToCreateDto'
      required:
        - code
        - message
        - details
    DerogationAlreadyExistsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - DEROGATION_ALREADY_EXISTS
        message:
          type: string
          example: >-
            Derogation already exists for branch {branchId} when trying to
            perform {action}
        details:
          $ref: '#/components/schemas/DerogationAlreadyExistsDto'
      required:
        - code
        - message
        - details
    BranchNotFoundDetailsDto:
      type: object
      properties:
        branchId:
          type: string
      required:
        - branchId
    NoDerogationToCreateDto:
      type: object
      properties:
        branchId:
          type: string
        action:
          allOf:
            - $ref: '#/components/schemas/DerogationAction'
      required:
        - branchId
        - action
    DerogationAlreadyExistsDto:
      type: object
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/DerogationAction'
        branchId:
          type: string
      required:
        - action
        - branchId

````