There are answers out there but my question is different as I'm trying to find out a uri when I've detail on a product or when I've to return detail on a product plus it's customers. I need a standard solution for following 4 api calls. I need a standard naming convention for this particular situation, please fix them from the following.
Plural (with s)
GET /products
- List all products
GET /products/1
- Detail of the product ONLY (no customers)
Singular
GET /product/1
- Detail of a product plus it's customers
GET /product/1/customers
ONLY customers of product 1
From the above I'm trying to find a solution for these two.
GET /products/1
- Detail of the product ONLY (no customers)
GET /product/1
- Detail of a product plus it's customers