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



## OpenAPI

````yaml /openapi/billing.json post /v1/billing/invoices/calculate/
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/billing/invoices/calculate/:
    post:
      tags:
        - invoices
      summary: Create calculate
      operationId: invoices_calculate_create
      parameters:
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantInvoiceCalculation'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TenantInvoiceCalculation'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TenantInvoiceCalculation'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantInvoiceCalculation'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    TenantInvoiceCalculation:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TenantInvoiceItem'
        target_date:
          type: string
          format: date
          writeOnly: true
          nullable: true
      required:
        - items
    TenantInvoiceItem:
      type: object
      properties:
        id:
          type: integer
        type:
          $ref: '#/components/schemas/Type56aEnum'
        integration_period:
          type: integer
        count:
          type: integer
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
      required:
        - count
        - price
        - type
    Type56aEnum:
      enum:
        - staff
        - rental_point
        - inventory_car
        - inventory_scooter
        - inventory_motorcycle
        - module
        - integration
      type: string
      description: |-
        * `staff` - Пользовательские места
        * `rental_point` - Точки аренды
        * `inventory_car` - Автомобили
        * `inventory_scooter` - Самокаты
        * `inventory_motorcycle` - Мотоциклы
        * `module` - Модуль
        * `integration` - Интеграция
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````