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

# Create bonuses



## OpenAPI

````yaml /openapi/main.json post /v1/crm/clients/{client_id}/bonuses/
openapi: 3.0.3
info:
  title: Yume API — Основное
  version: 1.0.0
  description: Базовые сущности и бизнес-логика CRM.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/crm/clients/{client_id}/bonuses/:
    post:
      tags:
        - clients
      summary: Create bonuses
      operationId: clients_bonuses_create
      parameters:
        - in: path
          name: client_id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BonusTransaction'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/BonusTransaction'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BonusTransaction'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BonusTransaction'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    BonusTransaction:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        bonus:
          type: integer
          readOnly: true
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        request:
          type: integer
          nullable: true
        type:
          allOf:
            - $ref: '#/components/schemas/BonusTransactionTypeEnum'
          minimum: -2147483648
          maximum: 2147483647
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        created_by:
          type: integer
          readOnly: true
          nullable: true
        request_status:
          type: integer
          readOnly: true
      required:
        - bonus
        - created_at
        - created_by
        - id
        - request_status
    BonusTransactionTypeEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Списание бонусов
        * `1` - Начисление бонусов
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````