Good day to you team and hope you are doing well. We have a user having some issue with writeback for their Magento 2 platform, now they have found out the situation why it happens , however, they have stated:
• This error is coming when you send stock id=> 1 (default Warehouse). If anyone not using default warehouse it will give the error. Please note that from Magento 2.4 there is new Magento built-in feature called Multi source inventory system where you can have as many sources as you want.
• Quick Fix for Us: if you are sending stock id or even not, please send stock_id=9 instead of 1.
• Actual Fix: Your DHL Express Commerce system must be compatible with Magento Multi Source Inventory.
Please note that quick fix will only work for us and it can cause the issues with your other clients. So we strongly recommend the developers meeting in this case.