'Rollback solution for a REST service

We provide various update and insert REST services as a central point for processing data on the mainframe. The REST Resources are hosted on one server and are served by different delivery systems.

Now we are facing the challenge to provide a rollback facility for when the transaction processed by ours cannot be processed by the delivery system (return JSON) (for whatever reason).

Are there any proven architecture solutions for this? We are currently talking about providing a "delete service" for such cases, which seems too cumbersome to me.

To me the best choice seems to be the method that we wait with the permanent write to the host until the delivery system has also finally processed our return and commits it to us.

Can someone explain the pros and cons of this solution?

Or is there a much better method for the problem?

-- As it is obvious from the question, I am anything but an expterte in the subject. Please therefore understand my borrowed wording :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source