Get all product attributes via API not returning all attributes sometimes

GroeierGroeier Member Posts: 3
edited May 2021 in Development


I read this API documentation ( and wrote a script for it to get all the product attributes for each product. But sometimes it does not return all the product attributes. For example if I make the call. It gives me 5 product attributes while the product has 6 attributes in that case. But sometimes a product has 9 attributes and it returns 9 attributes so sometimes it returns all the attributes and sometimes some attributes are missing. Someone has had this problem too?

I am getting the attributes via my php script beneath. product_id 26469894 has 6 attributes but it returns only 5 attributes.


  //$product_ids = [26469894,119349985,113177925];

  $product_ids = [26469894];

  foreach($product_ids as $product_id) {

        $url = 'https://KEY:[email protected]/en/products/'.$product_id.'/attributes.json';

    // Takes raw data from the request

    $json = file_get_contents($url);

    // Converts it into a PHP object

    $data = json_decode($json);

    echo '<pre>';


    echo '</pre>';



Sign In or Register to comment.