I am getting this error. Has anyone faced this? Or can point out where I am going wrong?
An error occurred during the Retail Server Request. RequestUri: XXXXXX-devret.cloud.retail.dynamics.com/.../GetTaxCodeByItem. RequestId: abd43faa-5ae8-cee7-3a07-2dd424904548. Exception: Microsoft.Dynamics.Retail.RetailServerLibrary.BadRequestException: The request URI is not valid. Since the segment 'Carts' refers to a collection, this must be the last segment in the request URI or it must be followed by an function or action that can be bound to it otherwise all intermediate segments must refer to a single resource.

My retail server code looks like this:
Controller:

EDMModelExtender

CustomizedEDMModelFactory
