Search

deleteAssortment

Delete an assortment.

An assortment defines which products a particular store is allowed to sell and/or to purchase.

To retrieve a list of assortments, see getAssortments. To edit an assortment or add a new one, see saveAssortment. To manipulate with the products associated with an assortment, see API calls getAssortmentProducts, addAssortmentProducts, editAssortmentProducts and removeAssortmentProducts. To retrieve all products that can be sold in location according to product status in assortment and it’s card see getSellableProducts.

This API call is available only if “Assortments” module has been enabled on your account.

Input parameters

Parameter nameDescriptionPossible valueRequired
assortmentIDsA comma-separated list of assortment IDs to be deleted.String (comma-separated list of integers) yes

Response

Field nameTypeDescription
deletedIDsStringComma-separated IDs of assortments that were found and successfully deleted.
nonExistingIDsStringComma-separated list of values that were not numeric, or IDs which did not refer to valid, existing assortments.
notDeletableIDsStringComma-separated list of assortments that are still associated with stores (locations) and cannot be deleted. To fix this, use API calls getWarehouses and saveWarehouse to see which locations belong to this assortment, and apply a different assortment to them (or remove assortment ID from these locations).

This API call returns error code 1006 if "Assortments" module has not been enabled on your account.