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

> Пакетная смена статуса: PATCH со списком id.

PATCH, а не POST: `CustomDjangoModelPermissions` спрашивает `todo.change_task`, а не право на
создание. Права на конкретные задачи проверять отдельно не нужно — `get_queryset` уже оставляет
только те, где пользователь автор или исполнитель, то есть то же правило, что и у карточки.



## OpenAPI

````yaml /openapi/todo.json patch /v1/todo/tasks/bulk/
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/todo/tasks/bulk/:
    patch:
      tags:
        - tasks
      summary: Patch bulk
      description: >-
        Пакетная смена статуса: PATCH со списком id.


        PATCH, а не POST: `CustomDjangoModelPermissions` спрашивает
        `todo.change_task`, а не право на

        создание. Права на конкретные задачи проверять отдельно не нужно —
        `get_queryset` уже оставляет

        только те, где пользователь автор или исполнитель, то есть то же
        правило, что и у карточки.
      operationId: tasks_bulk_partial_update
      parameters:
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedTaskBulkStatus'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedTaskBulkStatus'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedTaskBulkStatus'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskBulkStatus'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    PatchedTaskBulkStatus:
      type: object
      description: >-
        Пакетная смена статуса. Сам набор задач сужает вид — здесь только форма
        запроса.
      properties:
        ids:
          type: array
          items:
            type: integer
            minimum: 1
          maxItems: 200
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          default: done
        result:
          type: string
    TaskBulkStatus:
      type: object
      description: >-
        Пакетная смена статуса. Сам набор задач сужает вид — здесь только форма
        запроса.
      properties:
        ids:
          type: array
          items:
            type: integer
            minimum: 1
          maxItems: 200
        status:
          allOf:
            - $ref: '#/components/schemas/StatusEnum'
          default: done
        result:
          type: string
      required:
        - ids
    StatusEnum:
      enum:
        - open
        - in_progress
        - done
        - cancelled
      type: string
      description: |-
        * `open` - Открыто
        * `in_progress` - В работе
        * `done` - Выполнено
        * `cancelled` - Отменено
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````