0

我在 Shopware 4 Rest Api 文档中找到了这个,但是这个代码不起作用。

$restClient->delete(
        'articles/',
         array(
             array('id' => 2),
             array('id' => 4),
             array('id' => 6)
         )
);

有谁知道,它是怎么回事?

来源:http: //community.shopware.com/Shopware-4-REST-API-verwenden_detail_989.html#Batch_Modus_.28Stapelverarbeitung.29

4

1 回答 1

1

我刚刚用我的 API 客户端尝试了这个示例 - 它删除了三个项目:

$response = $client->delete(
    'articles/',
    array(
        array('id' => 1),
        array('id' => 2),
        array('id' => 3),
    )
);

请注意,这是在 SW 4.2 IIRC 中添加的 - 所以旧版本中可能没有它。

于 2016-07-11T11:59:04.477 回答