
If you're using linked services for integration, you're bound by their limitations and can't dynamically adjust parameters like companyid. However, if you're able to make direct web calls to the OData API, you can substitute the companyid variable at runtime.
For on-premise setups, there's an alternative: you can set a default company on the NST by configuring the ServicesDefaultCompany parameter. This allows you to omit the company specification in the OData URI altogether.
If you find this answer helpful please mark it as the suggested answer.