Googleapi无效的饲料ID

发布于 2025-02-08 18:46:37 字数 1336 浏览 1 评论 0原文

我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文