In Magento 1, the credit memo api was taking only item id and qty for items data and shipping amount, adjustment positive or negative at header level for creating a credit memo record. But in Magento2, it is expecting to give each and every value if we don't give the values it is creating the credit memo with zero dollar. Is this expected behavior? It is also not validating prices refunded while creating from API.
Same behavior is observed in Invoice REST API where complete information needs to be passed to Magento to create a record.
Can you please let me know if this behavior is expected to stay?