API Documentation >> API 2.0 Main >> Entities >> Create Article Response

Contents

Create Article Response

"inserted": [
    {
      "success": true,    //insertion result, can be true or false, see section below for explanation.
      "idArticle": {}     //created Article information
  ]
}

Explanation For success field

Possible reasons:

Failure during article creation

"inserted": [
    {
      "success": false,    
      "tried": {}          //information for the article that caused the failure.
      "error": ""          //reasons why the article was not created. ex. Playsets are no longer supported, adjust product: 123
  ]
}

Additional Information for create Article Requests

A distinction must be made between soft and hard failures.
The failure cases mentioned above are soft failures meaning that in a request to create multiple articles,
the articles with correct information are created and the ones with incorrect information are reported as failures.
There are also hard failures, meaning that a request will fail completely if any of the following information is not correct:

A hard failure will just return an error message.

Hard Failure Example

{
    "error": ""  //explanation of what went wrong. ex. Product ID and Language ID must be positive integers
}