News for hackers. Stuff that matters.
Re:One-to-one relationships and subresources in REST APIs by bjrnjs on Monday February 23, 2015 @11:33AM (#9095142)
I would've thought of it this way;

Is the user bringing a cart (/user/<USER_ID>/cart/<CART_ID>)?

Is he bringing his own cart (/user/<USER_ID>/cart)?

Is the store supplying a cart for the user (/cart)?

Applying real world objects and thinking, makes more sense in my mind. The third option instinctively is the most suitable way to go (IMO).

There are no comments on this comment yet.