question

legaultjulien avatar image
legaultjulien asked

delete a store using c# API

Hi,

I'm trying to delete a store with the C# admin API.

To accomplish this, i'm using a UpdateStoreItemsRequest and SetStoreItems.

According to the documentation for UpdateStoreItemsRequest,

If there is an existing store with the same storeId, it will be deleted and replaced with only the items specified in this call.

I'm getting an Error 400 bad request when i use

 new List<StoreItem>

in the request for the store.

I noticed stores can't be empty when using the website.

How can i delete a store using the C# API ?

Thank you

apis
1 comment
10 |1200

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

legaultjulien avatar image legaultjulien commented ·

I'm aware there is a DeleteStore and it's the first thing i tried but with depenencies to the catalog item it wouldn't delete.

0 Likes 0 ·

1 Answer

·
legaultjulien avatar image
legaultjulien answered

The solution i found was to update the catalog first to remove any dependencies to the store then use deleteStore.

10 |1200

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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