Shopify:通过API调用从集合中删除产品

Shopify:通过API调用从集合中删除产品,api,shopify,Api,Shopify,我正在尝试使用Shopify API从集合中删除产品 在docs()概述中,它说: DELETE /admin/collects/#{id}.json Remove a Collect from the database Remove a product from a collection Destroy the link between a product an a collection DELETE /admin/collects/#{id}.json 当你跳转到描述时,它会说: DEL

我正在尝试使用Shopify API从集合中删除产品

在docs()概述中,它说:

DELETE /admin/collects/#{id}.json
Remove a Collect from the database
Remove a product from a collection
Destroy the link between a product an a collection
DELETE /admin/collects/#{id}.json
当你跳转到描述时,它会说:

DELETE /admin/collects/#{id}.json
Remove a Collect from the database
Remove a product from a collection
Destroy the link between a product an a collection
DELETE /admin/collects/#{id}.json
那么,我可以使用它从集合中删除产品,还是从DB中删除集合

如果有可能从一个集合中删除一个产品-我想做的是-我应该传递集合ID还是产品ID-实际上我认为我必须传递两者,否则它将如何工作


谢谢你的帮助

Collect是产品和集合之间多对多关系的联接表。它有自己的id。要从集合中删除产品,您只需删除联接,因此您只需使用集合id,而不必使用产品id或集合id

如果您有产品id和收集id,您可以通过以下方式获取收集id:

GET /admin/collects.json?product_id=1925263361&collectionid=29722105

API中有许多未记录或不正确的元素。CustomCollections和SmartCollections使用相同的集合。您必须注意不要手动删除SmartCollection,因为这将导致错误。但是,目前很难确定Collect是来自CustomCollection还是SmartCollection。