Nested APIs with path parameters

I need to support APIs with a URL structure like:
/user/{userId} (User data for specific user)
/user/{userId}/contacts (Contact list for specific user)
/user/{userId}/contacts/{contactId} (Contact details for specific contact for specific user)
I don’t want to map all APIs that begin with “/user” to that same API definition. Rather, each of the URL patterns that I mentioned above should be a separate API with a separate API definition.

Does Tyk support this?

Hi

Yes that is possible, let us know if you have any trouble getting set up.

Thanks
Josh

I have no idea how to set it up.
I tried to define three APIs, each with its own SLUG.
The SLUGs had regular expressions in them, and they overlapped.
Tyk accepted my configuration, but my API requests did not successfully match against the configured APIs.

Is this even the right approach? If it is not the right approach, could you please explain what the right approach is?
If it is the right approach, is there any documentation of how pattern matching works in SLUGs?
Is there any documentation of which API is chosen when multiple SLUGs match?
If there is no documentation, could you explain it, please?