I have a resource called clients. We are now creating a system where we can link clients with other clients to create subclients. We are creating a table to represent this called clientconnections, which contains clientId and subclientId.
Now to establish this, we are doing it via an invite system (so we'll need an invite action api).
What is the best way to represent this in a restful way?
There's a bunch of different ways to think about this, I don't think there's one valid approach but I think I would do one of the following:
There is no real right or wrong here. My main advice would be is: keep it simple.