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

> The period narrows the profit / payback / statement rows, not the view's own queryset.



## OpenAPI

````yaml /openapi/metrics.json get /v1/crm/metrics/earning/general/
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/earning/general/:
    get:
      tags:
        - earning
      summary: Get general
      description: >-
        The period narrows the profit / payback / statement rows, not the view's
        own queryset.
      operationId: earning_general_retrieve
      parameters:
        - in: query
          name: car__isnull
          schema:
            type: boolean
        - in: query
          name: category
          schema:
            type: integer
        - in: query
          name: category__in
          schema:
            type: array
            items:
              type: integer
          description: Несколько значений могут быть разделены запятыми.
          explode: false
          style: form
        - in: query
          name: category__isnull
          schema:
            type: boolean
        - in: query
          name: disable__isnull
          schema:
            type: boolean
        - in: query
          name: disable__method
          schema:
            type: integer
            title: Способ
            enum:
              - 0
              - 1
              - 2
          description: |-
            * `0` - удалить
            * `1` - Архив
            * `2` - Списано
        - in: query
          name: disable__method__in
          schema:
            type: array
            items:
              type: integer
          description: Несколько значений могут быть разделены запятыми.
          explode: false
          style: form
        - in: query
          name: disabled
          schema:
            type: boolean
        - in: query
          name: end_at
          schema:
            type: string
            format: date
          description: >-
            Конец отчётного периода, включительно. Дата (ГГГГ-ММ-ДД) или момент
            времени, от которого берётся дата.
        - in: query
          name: group
          schema:
            type: integer
        - in: query
          name: group__in
          schema:
            type: array
            items:
              type: integer
          description: Несколько значений могут быть разделены запятыми.
          explode: false
          style: form
        - in: query
          name: group__isnull
          schema:
            type: boolean
        - in: query
          name: id
          schema:
            type: integer
        - in: query
          name: id__in
          schema:
            type: array
            items:
              type: integer
          description: Несколько значений могут быть разделены запятыми.
          explode: false
          style: form
        - in: query
          name: rental_point
          schema:
            type: integer
        - in: query
          name: rental_point__in
          schema:
            type: array
            items:
              type: integer
          description: Несколько значений могут быть разделены запятыми.
          explode: false
          style: form
        - in: query
          name: rental_point__isnull
          schema:
            type: boolean
        - name: search
          required: false
          in: query
          description: A search term.
          schema:
            type: string
        - in: query
          name: start_at
          schema:
            type: string
            format: date
          description: >-
            Начало отчётного периода, включительно. Дата (ГГГГ-ММ-ДД) или момент
            времени, от которого берётся дата.
        - in: query
          name: sublease_user
          schema:
            type: number
        - in: query
          name: sublease_user__in
          schema:
            type: array
            items:
              type: number
          description: Несколько значений могут быть разделены запятыми.
          explode: false
          style: form
        - in: query
          name: sublease_user__isnull
          schema:
            type: boolean
        - $ref: '#/components/parameters/TenantId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryGroupEarningAggregate'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    InventoryGroupEarningAggregate:
      type: object
      properties:
        buy_price_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        buy_price_avg:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        prediction_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        prediction_avg:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        earning_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        earning_avg:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        statement_expense_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        statement_profit_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        overdue_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        overdue_avg:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        payback_duration:
          type: string
        inventory_cnt:
          type: integer
      required:
        - buy_price_avg
        - buy_price_sum
        - earning_avg
        - earning_sum
        - inventory_cnt
        - overdue_avg
        - overdue_sum
        - payback_duration
        - prediction_avg
        - prediction_sum
        - statement_expense_sum
        - statement_profit_sum
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````