---
title: "Retrieve task"
method: GET
path: "/v1/tasks/{task_id}"
tags: ["Tasks"]
---

# Retrieve task

`GET /v1/tasks/{task_id}`

**🔐 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(r)`.

Retrieve a task.

## Path parameters

- `task_id` integer, required

## Query parameters

- `key` string, required — The key of the index to use.

## Response `200`

OK

- 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 — 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 — 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 — 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 — 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 — 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 — 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 — 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 — 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 — 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 — 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 — 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 — 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', 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
- `429` — Rate limit breached

---

[API](https://skmtc.dev/constructor/apis/autocomplete.md) · [All operations](https://skmtc.dev/constructor/apis/autocomplete/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/constructor/autocomplete/revisions/2d33330633b6/schema)
