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

# addLearningRule



## OpenAPI

````yaml post /addLearningRule
openapi: 3.0.1
info:
  title: EzzyRest API
  version: 1.0.0
servers:
  - url: https://app.ezzydoc.com/EzzyService.svc/Rest/
    description: Production Server
security: []
paths:
  /addLearningRule:
    post:
      tags:
        - EzzyRest
      summary: addLearningRule
      operationId: addLearningRule
      parameters:
        - name: invoiceid
          in: query
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LearningRule'
          text/json:
            schema:
              $ref: '#/components/schemas/LearningRule'
          application/*+json:
            schema:
              $ref: '#/components/schemas/LearningRule'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Servicestatus'
            application/json:
              schema:
                $ref: '#/components/schemas/Servicestatus'
            text/json:
              schema:
                $ref: '#/components/schemas/Servicestatus'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    LearningRule:
      type: object
      properties:
        invoiceNumber:
          $ref: '#/components/schemas/LearningKeywordRule'
        extractDescription:
          $ref: '#/components/schemas/LearningKeywordRule'
        learningSettings:
          $ref: '#/components/schemas/LearningSettingsData'
        supplierName:
          $ref: '#/components/schemas/LearningKeywordRule'
        customerName:
          $ref: '#/components/schemas/LearningKeywordRule'
        taxNumber:
          $ref: '#/components/schemas/LearningKeywordRule'
        invoiceTotal:
          $ref: '#/components/schemas/LearningKeywordRule'
        locale:
          $ref: '#/components/schemas/LearningIntValue'
        aitask:
          $ref: '#/components/schemas/LearningIntValue'
        workflow:
          $ref: '#/components/schemas/LearningStringValue'
        docSubType:
          $ref: '#/components/schemas/LearningKeywordRule'
        Hint:
          type: string
        isSet:
          type: boolean
        extra_keywords:
          $ref: '#/components/schemas/LearningExtraKeywords'
    Servicestatus:
      type: object
      properties:
        invoice_id:
          type: integer
        message:
          type: string
        status:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          x-enumNames:
            - OK
            - FAILED
            - NO_MORE_INVOICES
            - NOT_PERMITTED
    LearningKeywordRule:
      type: object
      properties:
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          x-enumNames:
            - unknown
            - keyword
            - assignment
            - condition_invoice_starts_with_c
        keyword:
          type: string
        position:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          x-enumNames:
            - UNKNOWN
            - LEFT
            - RIGHT
            - ABOVE
            - BELOW
    LearningSettingsData:
      type: object
      properties:
        OverideInvoiceClassification:
          type: string
        CustomizeInvoiceRule:
          type: string
    LearningIntValue:
      type: object
      properties:
        value:
          type: integer
        specified:
          type: boolean
    LearningStringValue:
      type: object
      properties:
        value:
          type: string
        specified:
          type: boolean
    LearningExtraKeywords:
      type: object
      properties:
        name:
          type: string
        custom_name:
          type: string
        custom_operator:
          type: string
        custom_hint:
          type: string
        keywords:
          type: string
        weight:
          type: number
        exclusive:
          type: boolean
        position:
          type: integer
        create:
          type: boolean
        type:
          type: integer
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````