Skip to content

CAT01 - Register a catalog import task

Request

Description

Creates an asynchronous import task and returns its tracking ID for status an report queries.

Regarding the input body, ignore the requirement level and refer to the user documentation here depending on the value of the field action.

Bodyapplication/json
Array [
actionstringrequired

The action to perform for this item

Enum: "ADD", "UPDATE", "DELETE", "UPSERT"

idstringrequired

Identifier

typestringrequired

The type of item to delete

Enum: "product", "variant", "category"

Enum:"category""product""variant"
Discriminator
contentobjectrequired

Category content. Required for ADD and UPDATE commands. should be null for DELETE commands

]
curl -i -X POST \
  https://api.eu1.target2sell.mirakl.net/catalog/import \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "action": "add",
      "content": {
        "name": "Informatic",
        "parentId": "root",
        "status": "enabled"
      },
      "id": "informatic",
      "type": "category"
    },
    {
      "action": "add",
      "content": {
        "name": "Computer",
        "parentId": "informatic",
        "status": "enabled"
      },
      "id": "computer",
      "type": "category"
    },
    {
      "action": "add",
      "content": {
        "name": "Ultrabook",
        "parentId": "computer",
        "status": "enabled"
      },
      "id": "ultrabook",
      "type": "category"
    },
    {
      "action": "add",
      "content": {
        "name": "Black Friday",
        "parentId": "root",
        "status": "enabled"
      },
      "id": "black_friday",
      "type": "category"
    }
  ]'

Responses

It contains the tracking ID, used for checking the request progress status as the request processing is asynchronous

Bodyapplication/json
trackingIdstringrequired

Tracking ID

Response
{ "trackingId": "string" }