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

# Put v1hubprofit logicrules



## OpenAPI

````yaml https://api.comm.com/docs/api.json put /v1/hub/profit-logic/rules/{rule}
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/hub/profit-logic/rules/{rule}:
    put:
      tags:
        - SellerProfitLogicRules
      operationId: hub.profit-logic.rules.update
      parameters:
        - name: rule
          in: path
          required: true
          description: The rule ID
          schema:
            type: string
            format: uuid
      requestBody:
        description: '`SellerProfitLogicRuleDataRequest`'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SellerProfitLogicRuleDataRequest'
      responses:
        '200':
          description: '`SellerProfitLogicRuleData`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SellerProfitLogicRuleData'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    SellerProfitLogicRuleDataRequest:
      type: object
      properties:
        current_profit:
          type: number
        country_id:
          type:
            - integer
            - 'null'
        id:
          type:
            - string
            - 'null'
        network_id:
          type:
            - integer
            - 'null'
        client_company_id:
          type:
            - string
            - 'null'
          format: uuid
        network_brand_id:
          type:
            - string
            - 'null'
          format: uuid
        margin_type:
          anyOf:
            - $ref: '#/components/schemas/SmsMarginTypeEnum'
            - type: 'null'
        old_profit:
          type:
            - number
            - 'null'
        upcoming_profit:
          type:
            - number
            - 'null'
        applied_at:
          type:
            - string
            - 'null'
      required:
        - current_profit
      title: SellerProfitLogicRuleDataRequest
    SellerProfitLogicRuleData:
      type: object
      properties:
        current_profit:
          type: number
        country_id:
          type:
            - integer
            - 'null'
        id:
          type:
            - string
            - 'null'
        network_id:
          type:
            - integer
            - 'null'
        client_company_id:
          type:
            - string
            - 'null'
          format: uuid
        network_brand_id:
          type:
            - string
            - 'null'
          format: uuid
        margin_type:
          anyOf:
            - $ref: '#/components/schemas/SmsMarginTypeEnum'
            - type: 'null'
        old_profit:
          type:
            - number
            - 'null'
        upcoming_profit:
          type:
            - number
            - 'null'
        applied_at:
          type:
            - string
            - 'null'
      required:
        - current_profit
        - country_id
        - id
        - network_id
        - client_company_id
        - network_brand_id
        - margin_type
        - old_profit
        - upcoming_profit
        - applied_at
      title: SellerProfitLogicRuleData
    SmsMarginTypeEnum:
      type: string
      enum:
        - percentage
        - fixed
      title: SmsMarginTypeEnum
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````