0

I am using php, I have created datafeed using content API which is of contentType "local products".

$apiUrl = "https://www.googleapis.com/content/v2.1/[Merchant_Id]/datafeeds?access_token=".[API_token];
$request = array(
   "contentType"=>"local products",
       "fileName"=>"local_datafeedfile",
       "name"=>"Local Datafeed",
       "targets"=>array(
          array(
           "country"=>"IN",
           "language"=>"EN"
          )
       )
   );

Now I need to add products to this datafeed. I am using this api to add product

https://www.googleapis.com/content/v2.1/[Merchant_Id]/products?feedId=[Feed_id]&access_token=".[API_token];

The problem is the [Feed_id] which always show [feedId] Invalid feed id: xxxxxxxx I am using the same id for feed_id generated on adding local product datafeed from above request

  • You made a typo, you missed `&` after the `[Feed_id]`. Correct url `https://www.googleapis.com/content/v2.1/[Merchant_Id]/products?feedId=[Feed_id]&access_token=".[API_token];` This question must be closed, as the solutions are code specific. – krylov123 Aug 13 '20 at 15:06
  • @krylov123 No, that is not the issue, I did it while posting this question I have to remove the actual ids to maintain privacy in doing do by mistake & was removed. But the issue still remains the same – Rajkumar Soy Aug 13 '20 at 18:24
  • Then provide the actual code you use. Because what you show is not a valid php code, so we could'nt reproduce it. Help others help you. – krylov123 Aug 14 '20 at 12:13

0 Answers0