OK i found the solution.
First i have to "PATCH" availableInAllTerritories with URL https://api.appstoreconnect.apple.com/v2/inAppPurchases/:inappid with and InAppPurchaseV2UpdateRequest object.
Then state change to DEVELOPER_REMOVED_FROM_SALE and i can delete the inapp with DELETE method.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: