What if in application you can add new product in 2 ways:
- send product details like: name, quantity
- send: id of existing product, quantity
So, we should have "POST /products" endpoint for creation, but how to differentiate if we have 2 ways?
What if in application you can add new product in 2 ways:
So, we should have "POST /products" endpoint for creation, but how to differentiate if we have 2 ways?