Class ByProjectKeyMeShoppingListsKeyByKeyDelete

All Implemented Interfaces:
ConflictingTrait<ByProjectKeyMeShoppingListsKeyByKeyDelete>, Deprecatable200Trait<ByProjectKeyMeShoppingListsKeyByKeyDelete>, ErrorableTrait<ByProjectKeyMeShoppingListsKeyByKeyDelete>, ExpandableTrait<ByProjectKeyMeShoppingListsKeyByKeyDelete>, VersionedTrait<ByProjectKeyMeShoppingListsKeyByKeyDelete>, ClientRequestCommand<ShoppingList>, CreateHttpRequestCommand, HttpRequestCommand<ShoppingList>, RequestCommand<ShoppingList>

Deletes the ShoppingList for a given key. Returns a 200 OK status if successful.

A ResourceNotFound error is returned in the following scenarios:

  • If no ShoppingList exists for the given key.
  • If a ShoppingList exists but does not contain either an anonymousId that matches the anonymous_id:{id} scope, or a customer with id value that matches the customer:{id} scope.


   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.shopping_list.ShoppingList>> result = apiRoot
            .withProjectKey("{projectKey}")
            .me()
            .shoppingLists()
            .withKey("{key}")
            .delete()
            .withVersion(version)
            .execute()