We are developing a REST API where client (application) will make call to our REST APIs.
The client (application) will handle the business logic with rollback capabilities (eg. client can rollback if update "Shipment" services [pass] and update "Stock" services [failed]).
There are many online articles about TCC [Try/Confirm/Cancel] which describe reserving/cancelling a resource via POST/DELETE method but none describe how to handle PUT request (eg. update "Stock" count by 1 and rollback on failure).
Anyone know of a solution to handle a PUT rollback (since PUT request overwrite the original data, how can we rollback to the original data)?