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

# Get deposits



## OpenAPI

````yaml /openapi/metrics.json get /v1/crm/metrics/deposits/
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/metrics/deposits/:
    get:
      tags:
        - deposits
      summary: Get deposits
      operationId: deposits_list
      parameters:
        - in: query
          name: created_at__date__gte
          schema:
            type: string
            format: date
        - in: query
          name: created_at__date__lte
          schema:
            type: string
            format: date
        - name: ordering
          required: false
          in: query
          description: Which field to use when ordering the results.
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: pageSize
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
        - in: query
          name: request__rental_point
          schema:
            type: integer
        - in: query
          name: returned_at__date__gte
          schema:
            type: string
            format: date
        - in: query
          name: returned_at__date__lte
          schema:
            type: string
            format: date
        - name: search
          required: false
          in: query
          description: A search term.
          schema:
            type: string
        - in: query
          name: status
          schema:
            type: integer
            title: Статус
            enum:
              - 0
              - 1
              - 2
          description: |-
            * `0` - Ожидает внесения
            * `1` - Принято
            * `2` - Возвращён
        - in: query
          name: type
          schema:
            type: integer
            title: Тип
            enum:
              - 0
              - 1
          description: |-
            * `0` - Предмет
            * `1` - Сумма
        - $ref: '#/components/parameters/TenantId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMetricsDepositList'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    PaginatedMetricsDepositList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/MetricsDeposit'
    MetricsDeposit:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        rental_point:
          type: integer
          readOnly: true
        client:
          $ref: '#/components/schemas/BaseClient'
        transaction_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        amount_in:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        amount_out:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        amount_held:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        amount_charged:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        amount_returned:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        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/MetricsDepositTypeEnum'
          title: Тип
          minimum: -32768
          maximum: 32767
        status:
          allOf:
            - $ref: '#/components/schemas/MetricsDepositStatusEnum'
          title: Статус
          minimum: -32768
          maximum: 32767
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Сумма
        deposit:
          type: string
          title: Залоговый предмет
          maxLength: 255
        returned_at:
          type: string
          format: date-time
          nullable: true
          title: Возвращён
        deposit_finance:
          type: boolean
          title: Залог как деньги на хранении
        tenant:
          type: integer
        request:
          type: integer
          title: Аренда
        created_by:
          type: integer
          title: Создал
        payment_type:
          type: integer
          nullable: true
          title: Способ оплаты
      required:
        - amount_charged
        - amount_held
        - amount_in
        - amount_out
        - amount_returned
        - client
        - created_at
        - created_by
        - deposit
        - id
        - rental_point
        - request
        - transaction_amount
        - updated_at
    BaseClient:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          title: Название
          maxLength: 512
        type:
          allOf:
            - $ref: '#/components/schemas/Type433Enum'
          title: Тип
          minimum: 0
          maximum: 2147483647
        avatar:
          type: string
          format: uri
          nullable: true
          title: Фото
        agreement_id:
          type: string
          readOnly: true
          nullable: true
        signed:
          type: boolean
        sign_date:
          type: string
          format: date
          nullable: true
        sign_expires:
          type: string
          format: date
          nullable: true
        phone:
          type: string
          title: Телефон
          maxLength: 32
        email:
          type: string
          format: email
          nullable: true
          maxLength: 254
        legal_type:
          nullable: true
          title: Форма организации
          minimum: 0
          maximum: 2147483647
          oneOf:
            - $ref: '#/components/schemas/LegalTypeEnum'
            - $ref: '#/components/schemas/NullEnum'
        extra:
          title: Доп. данные
      required:
        - agreement_id
        - id
        - name
        - phone
    MetricsDepositTypeEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Предмет
        * `1` - Сумма
    MetricsDepositStatusEnum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: |-
        * `0` - Ожидает внесения
        * `1` - Принято
        * `2` - Возвращён
    Type433Enum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Физ. лицо
        * `1` - Юр. лицо
    LegalTypeEnum:
      enum:
        - 0
        - 1
        - 2
        - 3
      type: integer
      description: |-
        * `0` - ИП
        * `1` - ТОО
        * `2` - АО
        * `3` - ПК
    NullEnum:
      enum:
        - null
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````