latestOpenAPI 3.0.32026-08-193973220.1 KB

6a1303364143

TaskManager

Get (batch) task

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.

get/ws/tasks/{taskId}

Path parameters

taskIdinteger required

Response

OK

task_idinteger required
action_status0 | 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.

{"stackTrail":"paths:/ws/tasks/{taskId}:get:responses:200:content:application/json:schema:properties:result","oasType":"schema","type":"unknown","description":"Report of task processing. Content depends on the task action.","example":{}}
statuscodeinteger required

Example response

{
  "task_id": 1011013,
  "action_status": 9,
  "last_action_error": "Task has been interrupted.",
  "result": {},
  "statuscode": 200
}