
As per the API Documentation of Microsoft Dynamics Nav Business Central, only the companies and subscriptions resource have URIs like endpoints/entity but for the rest of the resources like Employees, Accounts, Items, etc., operations are performed on a particular company and the URIs are like endpoints/companies({id})/entity. How can we determine that from metadata, which property defines that?
You won't be able to know this by just looking at the metadata for the API, the metadata just lists the different entities available, it seems. "companies" looks the same as "customers", for instance, but one is in not the context of the company and the other one is.
One of the reasons, I believe, is that you can define a default company (not in SaaS, but onprem) and then the endpoints can be the same, because the "customers" endpoint will use the default company to provide you with the data.
The best way of "knowing", I think is to assume that all endpoints are in the "companies" context, except for a few system endpoints, such as "companies".