Googleapi Invalid feed id

144 Views Asked by At

I'm working with googleapi for nodeJS and as I'm trying to insert a new product I get this error:

{ error:
  { code: 400
  , message: '[feedId] Invalid feed id: **feed id**'
  , errors: [ { message: '[feedId] Invalid feed id: **feed id**', domain: 
  'content.ContentErrorDomain', reason: 'invalid_parameter' } ]
  }
}

My code looks like this:

endpoint.datafeeds.list(
    { merchantId        : config[args.shop].google.merchant_id
    , maxResults        : 250
    })

Which returns this feed to me:

[
   { kind: 'content#datafeed'
   , id: '**feed id**'
   , name: '**feed name**'
   , contentType: 'products'
   , targets: [ { country: 'DE', language: 'en', includedDestinations: [ 
       'SurfacesAcrossGoogle', 'LocalSurfacesAcrossGoogle' ] } ]
   , fileName: '**filename**'
   , fetchSchedule: { paused: true, hour: 0, timeZone: 'America/Los_Angeles', fetchUrl: 
       'drive://**drive**' }
   , format: { quotingMode: 'normal character' }
   }
]

I then take that feed id and parses it to my insert call

endpoint.products.insert(
   { merchantId    : config[args.shop].google.merchant_id
   , feedId        : feed_id
   , requestBody   : prd
   })

Which produced this call:

https://shoppingcontent.googleapis.com/content/v2.1/**merchant id**/products?feedId=**feed id**

Any idea as to why the feed id is suddenly invalid?

0

There are 0 best solutions below