> POST /orders/42/pay
> POST /orders/42/ship
You don't put verbs in your URLs. This is really REST 101. I highly recommend Nobody understands REST or HTTP [1]. The above is exactly why you don't put verbs in URLs. Consider instead:
POST /payment { orderId=42, etc }
POST /shipment { orderId=42, etc }
is a much sounder RESTful API design.And in case anyone feels the need to suggest SOAP, I highly recommend the satiricial (but disturbingly accurate) The S stands for Simple [2].
[1]: http://blog.steveklabnik.com/posts/2011-07-03-nobody-underst...
[2]: http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-...