I have application for configuring e-commerce website (for example routing, page alliases, ordering, etc.). In old old times in server rendered applications I would have api like:
POST/api/things/1/position (body=2)
And I would put new position to that endpoint, to reorder things. Server would reorder all other things, so thing id1 would be second.
However now I have angular.js application, that loads all “things”, and saves it backend, like that:
GET:/api/things/ [{ id:1, order:1 }, { id: 2, order:2 }]
Then:
PUT:/api/things/ [{ id:1, order:2 }, { id: 2, order:1 }]
Basically frontend is responsible for setting correct orders, and updating both things to have changes persisted to database. I think it is good idea to do it with one request, as it can be executed in transaction, so backed state is persisted.
Of course in real life objects are much more complex, they have names, descriptions, etc. that frontend can change.