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



## OpenAPI

````yaml /openapi/orders.json post /v1/crm/requests/penalties/
openapi: 3.0.3
info:
  title: Yume API — Аренда
  version: 1.0.0
  description: Управление арендой, заявками и заказами.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/crm/requests/penalties/:
    post:
      tags:
        - penalties
      summary: Create penalties
      operationId: penalties_create
      parameters:
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequestPenalty'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OrderRequestPenalty'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OrderRequestPenalty'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderRequestPenalty'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    OrderRequestPenalty:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        request:
          type: integer
          nullable: true
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/OrderRequestPenaltyDate'
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        updated_at:
          type: string
          format: date-time
          readOnly: true
          title: Обновлен
        type:
          allOf:
            - $ref: '#/components/schemas/OrderRequestPenaltyTypeEnum'
          readOnly: true
          title: Тип
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Сумма
        amount_paid:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        reason:
          type: string
          nullable: true
          title: Причина
          maxLength: 512
        custom:
          type: boolean
          title: Вручную
        tenant:
          type: integer
        client:
          type: integer
          nullable: true
          title: Клиент
        request_inventory:
          type: integer
          nullable: true
          title: Позиция аренды
        created_by:
          type: integer
          readOnly: true
          nullable: true
          title: Создал
        penalty:
          type: integer
          nullable: true
          title: Гос. штраф
      required:
        - created_at
        - created_by
        - id
        - type
        - updated_at
    OrderRequestPenaltyDate:
      type: object
      properties:
        id:
          type: integer
          nullable: true
        date:
          type: string
          format: date-time
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
      required:
        - amount
        - date
    OrderRequestPenaltyTypeEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Автоматический
        * `1` - Вручную
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````