通过一次 API 调用将多个产品添加到集合

Add multiple products to collection with one API call

想知道 Shopify API 是否允许在一次调用中将多个产品添加到自定义集合中? 我已经成功地通过 PHP 将每次调用添加到自定义集合中的一种产品。但是我不能一次添加多个产品。

下面是我对“/admin/collects.json”的调用示例。

$producs_array = array(
        "collect"=>array(
            "product_id"=>123456789,
            "product_id"=>123456789,
            "product_id"=>123456789,
        "collection_id"=> "123456789")
    );

以前有人设法做到这一点吗?

您可以 PUT 到现有集合。参见 https://help.shopify.com/api/reference/customcollection#update