I'm building a REST api and want to make sure to follow the best practices. I need to expose a method which will return a 'Document' entity by its 'Lot' number.
It is possible that for a specific 'Lot', there's no 'Document' entity found. Also, property 'LotId' is not the key for 'Document' entity, it has his own key called 'DocumentId. What url structure shoul I use:
As it is posible to have no 'Document' attqached to a 'Lot', I don't want to return a
404 NotFound if there's no document found, I would return a
200 Ok with null