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

# Create Limit



## OpenAPI

````yaml Wallet post /{walletId}/asset/{assetId}/operation/{operationId}/limit
openapi: 3.0.1
info:
  title: Wallet
  description: wallet
  version: 1.0.0
servers:
  - url: https://gateway.varchev.com/wallet
security:
  - default: []
paths:
  /{walletId}/asset/{assetId}/operation/{operationId}/limit:
    post:
      tags:
        - Limit
      summary: Create Limit
      operationId: walletIdAssetAssetIdOperationOperationIdLimitPOST
      parameters:
        - name: tenantId
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: walletId
          in: path
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: assetId
          in: path
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: operationId
          in: path
          required: true
          style: simple
          explode: false
          schema:
            type: string
      requestBody:
        description: Sample Payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OperationLimit'
        required: false
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationLimitResponse'
        default:
          description: unsuccessful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - default: []
components:
  schemas:
    OperationLimit:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        priority:
          type: number
          description: Highest the number highest priroty
        order:
          type: number
          description: order of condition in the group with same priority
          default: 0
        enforcementPoint:
          type: array
          items:
            type: string
            enum:
              - UI
              - Backend
              - Database
        action:
          type: string
          enum:
            - deny
            - allow_and_report
            - deny_and_report
            - ask_user
            - allow_once
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/LimitCondition'
      example:
        action: deny
        priority: 0.8008281904610115
        conditions:
          - priority: 1.4658129805029452
            operation: lessThan
            requirementType: kyc
            order: 5.962133916683182
          - priority: 1.4658129805029452
            operation: lessThan
            requirementType: kyc
            order: 5.962133916683182
        enforcementPoint:
          - UI
          - UI
        order: 6.027456183070403
    OperationLimitResponse:
      properties:
        walletId:
          type: string
        assetId:
          type: string
        tenantId:
          type: string
        oprationLimit:
          $ref: '#/components/schemas/OperationLimit'
      example:
        walletId: walletId
        assetId: assetId
        tenantId: tenantId
        oprationLimit:
          action: deny
          priority: 0.8008281904610115
          conditions:
            - priority: 1.4658129805029452
              operation: lessThan
              requirementType: kyc
              order: 5.962133916683182
            - priority: 1.4658129805029452
              operation: lessThan
              requirementType: kyc
              order: 5.962133916683182
          enforcementPoint:
            - UI
            - UI
          order: 6.027456183070403
    ErrorResponse:
      properties:
        httpCode:
          type: number
        internalCode:
          type: number
        internalType:
          type: string
        severity:
          type: string
        description:
          type: string
    Identity:
      type: object
      properties:
        tenantId:
          type: string
        ownerId:
          type: string
        entityId:
          oneOf:
            - $ref: '#/components/schemas/GlobalID'
            - $ref: '#/components/schemas/StringID'
            - $ref: '#/components/schemas/NumericID'
        auditData:
          $ref: '#/components/schemas/AuditDetail'
      example:
        auditData:
          createdAt: '2000-01-23T04:56:07.000Z'
          archivedAt: '2000-01-23T04:56:07.000Z'
          deletedAt: '2000-01-23T04:56:07.000Z'
          updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          updatedAt: '2000-01-23T04:56:07.000Z'
        tenantId: tenantId
        entityId: ''
        ownerId: ownerId
    LimitCondition:
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        priority:
          type: number
          description: Highest the number highest priroty
        order:
          type: number
          description: order of condition in the group with same priority
          default: 0
        requirementType:
          type: string
          enum:
            - kyc
            - kyb
            - peps
            - periodical_limit
            - object_ref
            - transaction_limit
            - customer_state
        operation:
          type: string
          enum:
            - lessThan
            - lessEqual
            - equal
            - isA
            - greaterTnan
            - notEqual
            - isNotA
            - betweenInclusive
            - betweenUpper
            - betweenOpen
            - betweenLower
            - contains
        objectRef:
          $ref: '#/components/schemas/AnyObject'
        value:
          $ref: '#/components/schemas/AnyObject'
      example:
        priority: 1.4658129805029452
        operation: lessThan
        requirementType: kyc
        order: 5.962133916683182
    GlobalID:
      type: object
      properties:
        v:
          type: string
          format: uuid
    StringID:
      type: object
      properties:
        v:
          type: string
    NumericID:
      type: object
      properties:
        v:
          type: string
    AuditDetail:
      properties:
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
        archivedAt:
          type: string
          format: date-time
        createdBy:
          type: string
          format: uuid
        updatedBy:
          type: string
          format: uuid
        deletedBy:
          type: string
          format: uuid
      example:
        createdAt: '2000-01-23T04:56:07.000Z'
        archivedAt: '2000-01-23T04:56:07.000Z'
        deletedAt: '2000-01-23T04:56:07.000Z'
        updatedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        createdBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        deletedBy: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        updatedAt: '2000-01-23T04:56:07.000Z'
    AnyObject:
      required:
        - name
        - type
        - value
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Identity'
        name:
          type: string
        type:
          type: string
          enum:
            - number
            - boolean
            - json
            - string
            - json_array
            - protobuf
            - binary
            - timestamp
            - date
            - currency_ref
            - id_ref
        value:
          type: string
      example:
        name: name
        type: number
        value: value
  securitySchemes:
    default:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://test.com
          scopes: {}

````