Changes in Icecat JSON File Structure (Pull-API)

Avatar for Anastasiia
By
Likethumbsup(4)Dislikesthumbsdown(0)

From the 2th of June, the structure of the Icecat JSON files in our Pull-API (API-out) will be changed slightly. The impact of this update is very low.

Currently, we may have for the same tag sometimes an object and sometimes an array depending on if there is data for the object or not. An empty array is used when there is no data in the object, but when there is data it’s represented by an object. You can see an example below regarding ProductFamily tag:

Empty object: 
"GeneralInfo": {       
            "ProductFamily": [],       
            "ProductSeries": {         
           "SeriesID": "1"       
       }    
   }
Populated object:
"GeneralInfo": {     
        "ProductFamily": {         
                "ProductFamilyID": "67439",         
                "Value": "OMEN",         
                "Language": "EN"    
           },    
        "ProductSeries": {         
                "SeriesID": "5821",         
               "Value": "880",         
              "Language": "EN"    
          } 
    }

In the new structure, we will always publish an object’s array, even when it is an empty one without data. The situation with data populated objects will stay as it is right now:

 "GeneralInfo": {       
            "ProductFamily": {},       
            "ProductSeries": {         
           "SeriesID": "1"       
       }    
   }
 "GeneralInfo": {     
        "ProductFamily": {         
                "ProductFamilyID": "67439",         
                "Value": "OMEN",         
                "Language": "EN"    
           },    
        "ProductSeries": {         
                "SeriesID": "5821",         
               "Value": "880",         
              "Language": "EN"    
          } 
    } 

For some entities which are scalar, we are using an array. We will still use an array there even with an empty data set. Example: GTIN.

"GeneralInfo": {     
       "GTIN": [         
                    "08710103824428",         
                    "8710103824428"    
            ] 
     } 

Or:

"GeneralInfo": {     
      "GTIN": [] 
 }

Subscribe to our newsletter and stay updated.
Loading

  • commented on May 24, 2020 by Koen

    imho, a simple `null` value would seem more logical instead of an empty object.

    Likethumbsup(0)Dislikesthumbsdown(0)
    • Would be an approach. Our dev team: "I think we tried to make that consistent across all methods/calls we have, that's why we had to stick to empty object afair "

      Likethumbsup(0)Dislikesthumbsdown(0)
  • commented on May 27, 2020 by Egil Hansen

    About time 😛

    Getting tired of this:
    [JsonConverter(typeof(SingleOrArrayConverter))]
    public List BulletPoints { get; set; }

    Likethumbsup(0)Dislikesthumbsdown(0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Icecat xml

Open Catalog Interface (OCI): Manual for Open Icecat XML and Full Icecat XML

This document describes the Icecat XML method of Icecat's Open Catalog Inte...
 November 3, 2019
Manual

Manual for Icecat Live: Real-Time Product Data in Your App

Icecat Live is a (free) service that enables you to insert real-time produc...
 June 10, 2022
 October 4, 2018
Manual for Icecat CSV Interface

Manual for Icecat CSV Interface

This document describes the manual for Icecat CSV interface (Comma-Separate...
 September 28, 2016
Manual

Manual for Open Icecat JSON Product Requests

JSON (JavaScript Object Notation) is an increasingly popular means of trans...
 September 17, 2018
Icecat Addons plugins

Icecat Add-ons include Magento, PrestaShop, Shopify, Magento, Google Shopping, Pimcore, Bol.com. NEW: Mirakl

Icecat has a huge list of integration partners, making it easy for clients ...
 November 24, 2022
 January 20, 2020
LIVE JS

How to Create a Button that Opens Video in a Modal Window

Recently, our Icecat Live JavaScript interface was updated with two new fun...
 November 3, 2021
New Standard video thumbnail

Autheos video acquisition completed

July 21, Icecat and Autheos jointly a...
 September 7, 2021

Iceclog: Content Log New Ideas like a Free Vendor Central

“Iceclog” (Icecat content log) is the Icecat ...
 June 26, 2019