Googleapi无效的饲料ID
我正在使用googleapi
nodejs,并且在尝试插入一个新产品时,我会收到此错误:
{ error:
{ code: 400
, message: '[feedId] Invalid feed id: **feed id**'
, errors: [ { message: '[feedId] Invalid feed id: **feed id**', domain:
'content.ContentErrorDomain', reason: 'invalid_parameter' } ]
}
}
我的代码看起来像这样:
endpoint.datafeeds.list(
{ merchantId : config[args.shop].google.merchant_id
, maxResults : 250
})
返回给我
[
{ 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' }
}
]
它将此提要 并将其解析到我的插入电话中,
endpoint.products.insert(
{ merchantId : config[args.shop].google.merchant_id
, feedId : feed_id
, requestBody : prd
})
该呼叫产生了这个电话:
https://shoppingcontent.googleapis.com/content/v2.1/**merchant id**/products?feedId=**feed id**
关于饲料ID突然无效的原因有什么想法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论