Hi Ayberk,
I would say that depends on your business requirements. If you are using the objects just for creating your structure for the REST service call, there may be no need to commit anything into the database. In this case, I would also configure the entities as non persistent.
If you have any need to access to the sent header and input dater later on, you may want to commit them.
Best,
Holger
Ok, so I think there is no need for you to do a commit of these entities. As they are non persistent, a commit would only "save" the values in memory. But there is no need for you to do so.
For more information, have a look in the documentation here.