---
title: "Update tasks"
method: PATCH
path: "/v1/tasks"
tags: ["Tasks"]
---

# Update tasks

`PATCH /v1/tasks`

## Request

- Base URL: `https://ac.cnstrc.com`
- URL: `https://ac.cnstrc.com/v1/tasks`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

**🔐 This endpoint requires [HTTP authentication](https://docs.constructor.com/reference/main-authentication) (either [Basic](https://docs.constructor.com/reference/main-authentication#basic-authentication) or [Bearer](https://docs.constructor.com/reference/main-authentication#bearer-authentication)).**
For authenticating with Bearer token, required scopes are: `catalog(w)`.

Update the status of a list of tasks to queue or cancel them.

## Query parameters

- `key` string, required: The key of the index to use.
- `c` string: The ID of the client and version that the request is coming from, such as `cio-js-2.90`.

## Request body

- TaskListPatchRequestBody
  - `tasks` TaskBatchItem[], required: This will have the list of tasks that you want to update, each task is a JSON that have id and status fields, maximum length of tasks is 1000.
    - `id` integer, required: This contains the task id that you want to update, note that if one of the ids does not exists, the whole batch won't be updated.
    - `status` 'QUEUED' | 'CANCELED', required: This contains the new status that you want to update the task with, the only allowed values are: ['QUEUED', 'CANCELED'].

## Response `200`

OK

- TaskListPatchResponse
  - `tasks` TaskResponse[], required
    - union
      - IngestionTaskResponse
        - `id` integer, required: The ID of the task.
        - `status` 'QUEUED' | 'CANCELED' | 'IN_PROGRESS' | 'DONE' | 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'ingestion', required
        - `filename` string: The name of the file uploaded to Constructor.
        - `protocol` 'ftp' | 'http': Describes if the ingestion was created via FTP, HTTP API or other source (then null).
        - `result` IngestionResult
          - `changelog` DirectUploadChangelog, required
            - `item_groups_updated` integer
            - `item_groups_deleted` integer
            - `total_item_groups_changed` integer
            - `sections` object
          - `index_built` boolean, required: Shows if changes from the task have been indexed.
          - `ingestion_warnings` IngestionWarning[]: A list of the warnings produced during ingestion.
            - `code` string, required: Warning code
            - `message` string, required: Warning message
            - `data` object: Additional data related to warning
      - IngestionTaskErrorResponse
        - `id` integer, required: The ID of the task.
        - `status` 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'ingestion', required
        - `error` union: Data about errors in case of task failure.
          - string
          - object
        - `filename` string: The name of the file uploaded to Constructor.
        - `protocol` 'ftp' | 'http': Describes if the ingestion was created via FTP, HTTP API or other source (then null).
      - UserDataRequestTaskResponse
        - `id` integer, required: The ID of the task.
        - `status` 'QUEUED' | 'CANCELED' | 'IN_PROGRESS' | 'DONE' | 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'user_data_request', required
        - `user_id` string
        - `result` UserDataRequestResult
          - `data_url` string: Link to file with user's data.
      - UserDataRequestTaskErrorResponse
        - `id` integer, required: The ID of the task.
        - `status` 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'user_data_request', required
        - `error` union: Data about errors in case of task failure.
          - string
          - object
        - `user_id` string
      - CopyDataTaskResponse
        - `id` integer, required: The ID of the task.
        - `status` 'QUEUED' | 'CANCELED' | 'IN_PROGRESS' | 'DONE' | 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'copy_data', required
        - `result` CopyDataResult: Object of each section which has the succeeded and failed resources to copy.
      - CopyDataTaskErrorResponse
        - `id` integer, required: The ID of the task.
        - `status` 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'copy_data', required
        - `error` union: Data about errors in case of task failure.
          - string
          - object
      - CatalogExportTaskResponse: Response for a catalog export task.
        - `id` integer, required: The ID of the task.
        - `status` 'QUEUED' | 'CANCELED' | 'IN_PROGRESS' | 'DONE' | 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'catalog_export', required: The type of the task.
        - `section` string: The catalog section used for the export. Valid values are the catalog section names configured for the index, such as `Products`; this mirrors the `section` request parameter.
        - `catalog_part` 'items' | 'variations' | 'item_groups' | 'items_with_variations': The part of the catalog that was exported.
        - `result` CatalogExportResult: Contains the export file URL and entity count for a catalog export task result.
          - `url` string, nullable, required: An expiring download URL for the export file. The URL expires three days after the export file is generated. May be `null` when the export contains no entities.
          - `count` integer: Count of exported entities, such as items, variations, or item groups. For catalog export task results created before counts were returned, this key is omitted rather than returned as `null`.
      - CatalogExportTaskErrorResponse: Error response for a catalog export task.
        - `id` integer, required: The ID of the task.
        - `status` 'FAILED', required: Current status of the task.
        - `submission_time` string, date-time, required: Time of task submission.
        - `last_update` string, date-time, nullable: Last time the status of this task was updated. May be `null` if the task has never been run before.
        - `start_time` string, date-time, nullable: Starting time of the task. May be `null` if the task has not been run yet.
        - `type` 'catalog_export', required: The type of the task.
        - `error` union: Data about errors in case of task failure.
          - string
          - object
        - `section` string: The catalog section used for the export. Valid values are the catalog section names configured for the index, such as `Products`; this mirrors the `section` request parameter.
        - `catalog_part` 'items' | 'variations' | 'item_groups' | 'items_with_variations': The part of the catalog that was exported.

## Other responses

- `400`: Validation Error
- `401`: Credentials are not passed or action is forbidden.
- `403`: The supplied token does not have the required permissions.
- `404`: Not Found
- `409`: Conflict
- `429`: Rate limit breached

---

[API](https://skmtc.dev/constructor/apis/catalog-management.md) - [All operations](https://skmtc.dev/constructor/apis/catalog-management/llms.txt) - [OpenAPI document](https://skmtc.dev/constructor/apis/catalog-management/revisions/3a9833796fc6?raw)
