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



## OpenAPI

````yaml /openapi/orders.json post /v1/crm/requests/{request_id}/deposits/{id}/charge/
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/{request_id}/deposits/{id}/charge/:
    post:
      tags:
        - deposits
      summary: Create charge
      operationId: deposits_charge_create
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - in: path
          name: request_id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequestDeposit'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OrderRequestDeposit'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OrderRequestDeposit'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderRequestDeposit'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    OrderRequestDeposit:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        created_by:
          type: integer
          readOnly: true
          title: Создал
        payment_type:
          type: integer
          nullable: true
          title: Способ оплаты
        type:
          allOf:
            - $ref: '#/components/schemas/OrderRequestDepositTypeEnum'
          title: Тип
          minimum: -32768
          maximum: 32767
        status:
          allOf:
            - $ref: '#/components/schemas/OrderRequestDepositStatusEnum'
          title: Статус
          minimum: -32768
          maximum: 32767
        request:
          type: integer
          readOnly: true
          title: Аренда
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        deposit:
          type: string
          title: Залоговый предмет
          maxLength: 255
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Сумма
        returned_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Возвращён
        transaction_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        deposit_finance:
          type: boolean
          title: Залог как деньги на хранении
        amount_in:
          type: number
          format: double
          readOnly: true
        amount_out:
          type: number
          format: double
          readOnly: true
        amount_charged:
          type: number
          format: double
          readOnly: true
        amount_returned:
          type: number
          format: double
          readOnly: true
        amount_held:
          type: number
          format: double
          readOnly: true
        remaining:
          type: number
          format: double
          readOnly: true
        with_transaction:
          type: boolean
          writeOnly: true
          default: false
      required:
        - amount_charged
        - amount_held
        - amount_in
        - amount_out
        - amount_returned
        - created_at
        - created_by
        - deposit
        - id
        - remaining
        - request
        - returned_at
        - transaction_amount
        - type
    OrderRequestDepositTypeEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Предмет
        * `1` - Сумма
    OrderRequestDepositStatusEnum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: |-
        * `0` - Ожидает внесения
        * `1` - Принято
        * `2` - Возвращён
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````