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

# Patch groups



## OpenAPI

````yaml /openapi/main.json patch /v1/crm/groups/{id}/
openapi: 3.0.3
info:
  title: Yume API — Основное
  version: 1.0.0
  description: Базовые сущности и бизнес-логика CRM.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/crm/groups/{id}/:
    patch:
      tags:
        - groups
      summary: Patch groups
      operationId: groups_partial_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedInventoryGroupUpdate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedInventoryGroupUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedInventoryGroupUpdate'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryGroupUpdate'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    PatchedInventoryGroupUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          nullable: true
          title: Название
          maxLength: 512
        comment:
          type: string
          nullable: true
          title: Комментарий
          maxLength: 512
        category:
          type: integer
          nullable: true
          title: Категория
        unique_id:
          type: string
          nullable: true
          title: Артикул
          maxLength: 255
        barcode:
          type: string
          nullable: true
          title: Штрихкод
          maxLength: 255
        image:
          type: string
          format: uri
          nullable: true
          title: Изображение
        extra:
          title: Доп. данные
        published:
          type: boolean
          title: Опубликовано
        type:
          allOf:
            - $ref: '#/components/schemas/Type9ddEnum'
          title: Тип
          minimum: 0
          maximum: 32767
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        discount:
          type: integer
          nullable: true
          title: Скидка
        tarif_form:
          type: array
          items:
            $ref: '#/components/schemas/BaseTariffUpdate'
        inventory_form:
          $ref: '#/components/schemas/InventoryClone'
        unit_type:
          allOf:
            - $ref: '#/components/schemas/UnitTypeEnum'
          title: Единица измерения
        unit_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Цена за единицу
        unit_count:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Количество единиц
        unit_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Итого за единицы
        points:
          type: array
          items:
            type: integer
            maximum: 2147483647
            minimum: -2147483648
          title: Баллы
        lifetime:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          title: Срок службы, дней
    InventoryGroupUpdate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          nullable: true
          title: Название
          maxLength: 512
        comment:
          type: string
          nullable: true
          title: Комментарий
          maxLength: 512
        category:
          type: integer
          nullable: true
          title: Категория
        unique_id:
          type: string
          nullable: true
          title: Артикул
          maxLength: 255
        barcode:
          type: string
          nullable: true
          title: Штрихкод
          maxLength: 255
        image:
          type: string
          format: uri
          nullable: true
          title: Изображение
        extra:
          title: Доп. данные
        published:
          type: boolean
          title: Опубликовано
        type:
          allOf:
            - $ref: '#/components/schemas/Type9ddEnum'
          title: Тип
          minimum: 0
          maximum: 32767
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        discount:
          type: integer
          nullable: true
          title: Скидка
        tarif_form:
          type: array
          items:
            $ref: '#/components/schemas/BaseTariffUpdate'
        inventory_form:
          $ref: '#/components/schemas/InventoryClone'
        unit_type:
          allOf:
            - $ref: '#/components/schemas/UnitTypeEnum'
          title: Единица измерения
        unit_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Цена за единицу
        unit_count:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Количество единиц
        unit_sum:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Итого за единицы
        points:
          type: array
          items:
            type: integer
            maximum: 2147483647
            minimum: -2147483648
          title: Баллы
        lifetime:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
          title: Срок службы, дней
      required:
        - id
    Type9ddEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Аренда
        * `1` - Продажа
    BaseTariffUpdate:
      type: object
      properties:
        id:
          type: integer
        weekdays:
          type: array
          items:
            type: integer
        start:
          type: string
          format: time
          nullable: true
        end:
          type: string
          format: time
          nullable: true
        order:
          type: integer
        name:
          type: string
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        time_period:
          type: integer
          nullable: true
      required:
        - name
        - price
    InventoryClone:
      type: object
      properties:
        count:
          type: integer
          maximum: 1000
        rental_point:
          type: integer
          nullable: true
        buy_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          nullable: true
        buy_date:
          type: string
          format: date
          nullable: true
        sublease_user:
          type: integer
        sublease_percent:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        extra: {}
      required:
        - count
    UnitTypeEnum:
      enum:
        - litre
        - kg
        - g
        - ml
        - piece
        - m3
      type: string
      description: |-
        * `litre` - Литр
        * `kg` - Килограмм
        * `g` - Грамм
        * `ml` - Миллилитр
        * `piece` - Штука
        * `m3` - Кубический метр
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````