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



## OpenAPI

````yaml /openapi/billing.json get /v1/billing/invoices/{id}/
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/{id}/:
    get:
      tags:
        - invoices
      summary: Get invoices
      operationId: invoices_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantInvoice'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    TenantInvoice:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        tenant:
          type: integer
          readOnly: true
        card:
          type: integer
          readOnly: true
          nullable: true
          title: Карта
        card_detail:
          allOf:
            - $ref: '#/components/schemas/TenantCard'
          readOnly: true
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyEnum'
          readOnly: true
          title: Валюта
        status:
          allOf:
            - $ref: '#/components/schemas/Status14dEnum'
          readOnly: true
          title: Статус
        variant:
          allOf:
            - $ref: '#/components/schemas/VariantEnum'
          readOnly: true
          title: Платёжный провайдер
        total:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
          title: Итого
        captured_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
          title: Списано
        refund_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
          title: Возвращено
        captured_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Списано в
        start_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Начало периода
        end_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          title: Конец периода
        items:
          type: array
          items:
            $ref: '#/components/schemas/TenantInvoiceItemInfo'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TenantInvoiceError'
        transaction_url:
          type: string
          format: uri
          readOnly: true
          nullable: true
          title: Ссылка на транзакцию
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        payment_details:
          type: string
          readOnly: true
        kaspi:
          type: object
          additionalProperties: {}
          nullable: true
          description: >-
            Which Kaspi rail raised the payment, so the payer sees the right
            screen again.
          readOnly: true
      required:
        - captured_amount
        - captured_at
        - card
        - card_detail
        - created_at
        - currency
        - end_at
        - errors
        - id
        - items
        - kaspi
        - payment_details
        - refund_amount
        - start_at
        - status
        - tenant
        - total
        - transaction_url
        - variant
    TenantCard:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        tenant:
          type: integer
          readOnly: true
        active:
          type: boolean
        status:
          allOf:
            - $ref: '#/components/schemas/TenantCardStatusEnum'
          readOnly: true
        card_hash:
          type: string
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        bank_alias:
          type: string
          readOnly: true
          nullable: true
        brand_alias:
          type: string
          readOnly: true
          nullable: true
        expiry_year:
          type: string
          readOnly: true
          nullable: true
        expiry_month:
          type: string
          readOnly: true
          nullable: true
        recurring:
          type: boolean
      required:
        - bank_alias
        - brand_alias
        - card_hash
        - created_at
        - expiry_month
        - expiry_year
        - id
        - status
        - tenant
    CurrencyEnum:
      enum:
        - KZT
        - USD
        - RUB
        - EUR
        - UZS
        - KGS
        - AED
        - SAR
      type: string
      description: |-
        * `KZT` - KZT
        * `USD` - USD
        * `RUB` - RUB
        * `EUR` - EUR
        * `UZS` - UZS
        * `KGS` - KGS
        * `AED` - AED
        * `SAR` - SAR
    Status14dEnum:
      enum:
        - waiting
        - confirmed
        - rejected
        - refunded
      type: string
      description: |-
        * `waiting` - В ожидании
        * `confirmed` - Подтвержден
        * `rejected` - Отклонен
        * `refunded` - Возвращен
    VariantEnum:
      enum:
        - freedom
        - kaspi
      type: string
      description: |-
        * `freedom` - Freedom
        * `kaspi` - Kaspi Pay
    TenantInvoiceItemInfo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        integration:
          allOf:
            - $ref: '#/components/schemas/IntegrationInfo'
          readOnly: true
        variant:
          allOf:
            - $ref: '#/components/schemas/IntegrationVariant'
          readOnly: true
        period:
          allOf:
            - $ref: '#/components/schemas/IntegrationPeriod'
          readOnly: true
        label:
          type: string
          description: >-
            Same human label the purchase breakdown uses, so history and cart
            read alike.
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/Type56aEnum'
          default: integration
        start_at:
          type: string
          format: date
          nullable: true
        end_at:
          type: string
          format: date
          nullable: true
        count:
          type: integer
          maximum: 32767
          minimum: 0
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        invoice:
          type: integer
        integration_period:
          type: integer
          nullable: true
      required:
        - id
        - integration
        - invoice
        - label
        - period
        - variant
    TenantInvoiceError:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        code:
          type: string
          maxLength: 64
        description:
          type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
        invoice:
          type: integer
      required:
        - code
        - created_at
        - description
        - id
        - invoice
    TenantCardStatusEnum:
      enum:
        - ok
        - approved
        - deleted
      type: string
      description: |-
        * `ok` - Активна
        * `approved` - Подтверждена
        * `deleted` - Удалено
    IntegrationInfo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        code:
          type: string
          title: Код
          description: Код интеграции
          maxLength: 64
        slug:
          type: string
          nullable: true
          maxLength: 255
          pattern: ^[-a-zA-Z0-9_]+$
        name:
          type: string
          title: Название
          description: Название интеграции
          maxLength: 512
        comment:
          type: string
          nullable: true
          maxLength: 512
        slogan:
          type: string
          nullable: true
          title: Слоган
          description: Слоган интеграции
        type:
          allOf:
            - $ref: '#/components/schemas/IntegrationInfoTypeEnum'
          title: Тип
          description: |-
            Тип интеграции

            * `integration` - Интеграция
            * `module` - Модуль
        detail:
          type: string
          nullable: true
          title: Описание
          description: Описание интеграции
        icon:
          type: string
          format: uri
          nullable: true
          title: Иконка
          description: Иконка интеграции
        image:
          type: string
          format: uri
          nullable: true
          title: Изображение
          description: Изображение интеграции
        image_alt:
          type: string
          format: uri
          nullable: true
          title: Альтернативное изображение
          description: Альтернативное изображение интеграции
        disabled:
          type: boolean
          title: Отключено
          description: Отключено интеграцию
        extra:
          nullable: true
        demo_duration:
          type: string
          title: Демо период
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagsEnum'
        modules:
          type: array
          items:
            $ref: '#/components/schemas/ModulesEnum'
          title: Модули
          description: Модули интеграции
        visable:
          type: boolean
          title: Видимость
          description: Видимость интеграции для пользователей
      required:
        - code
        - id
        - name
    IntegrationVariant:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        code:
          type: string
          nullable: true
          maxLength: 255
        limits:
          type: array
          items:
            type: string
            maxLength: 255
      required:
        - id
        - name
    IntegrationPeriod:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        variant:
          allOf:
            - $ref: '#/components/schemas/IntegrationVariant'
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/IntegrationPeriodTypeEnum'
          title: Тип
          description: |-
            Тип тарифа

            * `period` - period
            * `amount` - amount
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyEnum'
          default: KZT
          title: Валюта
          description: |-
            Валюта тарифа

            * `KZT` - KZT
            * `USD` - USD
            * `RUB` - RUB
            * `EUR` - EUR
            * `UZS` - UZS
            * `KGS` - KGS
            * `AED` - AED
            * `SAR` - SAR
        months:
          allOf:
            - $ref: '#/components/schemas/MonthsEnum'
          default: 1
          title: Количество месяцев
          description: |-
            Длительность тарифа в месяцах

            * `1` - 1 месяц
            * `3` - 3 месяца
            * `6` - 6 месяцев
            * `12` - 12 месяцев
          minimum: -32768
          maximum: 32767
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Цена
          description: Цена тарифа
        amount:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          title: Количество
          description: Количество
        integration:
          type: integer
          title: Интеграция
          description: Интеграция
        tenant:
          type: integer
          nullable: true
          title: Компания
          description: Компания
      required:
        - id
        - integration
        - type
        - variant
    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` - Интеграция
    IntegrationInfoTypeEnum:
      enum:
        - integration
        - module
      type: string
      description: |-
        * `integration` - Интеграция
        * `module` - Модуль
    TagsEnum:
      enum:
        - free
        - promo
        - popular
        - recommend
      type: string
      description: |-
        * `free` - Бесплатно
        * `promo` - Акция
        * `popular` - Популярное
        * `recommend` - Рекомендуем
    ModulesEnum:
      enum:
        - finance
        - sales
        - marketing
        - other
        - hr
      type: string
      description: |-
        * `finance` - Финансы
        * `sales` - Продажи
        * `marketing` - Маркетинг
        * `other` - Другое
        * `hr` - HR
    IntegrationPeriodTypeEnum:
      enum:
        - period
        - amount
      type: string
      description: |-
        * `period` - period
        * `amount` - amount
    MonthsEnum:
      enum:
        - 1
        - 3
        - 6
        - 12
      type: integer
      description: |-
        * `1` - 1 месяц
        * `3` - 3 месяца
        * `6` - 6 месяцев
        * `12` - 12 месяцев
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````