question

chetan-purohit avatar image
chetan-purohit asked james-cha Deactivated commented

Can somebody tell me how to use bulk delete API for items?

Hi,

I am trying to delete all the items in merchant's inventory, but I am not able to do the same. When I am calling that API by passing merchantId then it gives following response:

{"message":"No item ids to delete"}

As per my knowledge there is only one parameter needed which is merchantId, can somebody tell me is there any extra parameters needed for using that API?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

james-cha avatar image
james-cha Deactivated answered james-cha Deactivated commented

You have to pass in the itemIds in your url as query params: https://sandbox.dev.clover.com/v3/mer... ID]/items?itemIds=[itemId],[itemId],[itemId]

6 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hj02 avatar image hj02 commented ·

Hi Chetan, take the square brackets out of your first query and it should work. I was able to get a working delete request this way.

1 Like 1 ·
chetan-purohit avatar image chetan-purohit commented ·

Thank you for replying James. Can you please tell me is there any way to bulk delete modifiers, taxes, modifer groups and categories?

0 Likes 0 ·
james-cha avatar image james-cha commented ·

Check out the docs here: https://docs.clover.com/build/web-api...

0 Likes 0 ·
chetan-purohit avatar image chetan-purohit commented ·

James, now I am using following way to delete all the items present in the merchant's directory:

/items?itemIds=[CSKBA8HWX0TXC],[9P7K798340Z2T],[EQXYYV7FSXGQ4],[S8DE7QH6EV5QE]

I have used the following as well:

/items?itemIds=['CSKBA8HWX0TXC'],['9P7K798340Z2T'],['EQXYYV7FSXGQ4'],['S8DE7QH6EV5QE']

I am getting the following response:

{"message":"Unable to delete all items"}
0 Likes 0 ·
james-cha avatar image james-cha commented ·

Yes Thanks hj02.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community