---
title: "Get (batch) task"
method: GET
path: "/ws/tasks/{taskId}"
tags: ["TaskManager"]
---

# Get (batch) task

`GET /ws/tasks/{taskId}`

When a merchant creates a `Product` and/or `Listing`, we have to check there is no problem _i.e._  that all the mandatory information has been provided. For every creation a `batch ID` will be provided thus allowing you to check the corresponding batch (all errors will be returned).

You will have to check the batch every time you perform a POST request on:

`https://www.backmarket.fr/ws/listings/`.

To create `Listings` and/or `Products` (or update several `Listings`), you need to provide a CSV file through this HTTP POST. You will then get a `batch ID` in the response of your call.

Afterwards you can do another API call on this endpoint (_after an average delay of 5 minutes_) to get the result of the corresponding batch. The field `action_status` will be equal to 9 if the batch is completed with
success, or else it will be equal to 0.

If the batch is done, you will get the result for each SKU/EAN. If the creation of the `Listing`/`Product` has failed, the errors details will be returned to you.

## Path parameters

- `taskId` integer, required

## Response `200`

OK

- object
  - `task_id` integer, required
  - `action_status` 0 | 2 | 3 | 7 | 8 | 9, required — Current task status (0 and 2: todo or in progress, 8: failed, 9: success). Check the TaskStatus enum to get the others.
  - `last_action_error` union, required — Only filled when the processing has a major failure (status '8').
    - unknown
    - string
  - `result` unknown, required
  - `statuscode` integer, required

## Other responses

- `401` — Unauthorized. The client making the request is not authenticated.
- `404` — Task does not exist, or is not accessible for the authenticated user.

---

[API](https://skmtc.net/backmarket/apis/back-market-api-guidelines.md) · [All operations](https://skmtc.net/backmarket/apis/back-market-api-guidelines/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/backmarket/back-market-api-guidelines/revisions/6a1303364143/schema)
