01T12:00:00Z,RouteId='ROUT0003938',ProductSizeId='HB65',ProductColorId='SP100',ProductionSiteId='85',ProductConfigurationId='219875',ProductStyleId='3',ItemNumber='HIDN-TED200%252F2-SLV')?cross-company=true
Note: ExpRouteVersions is a custom entity built by the company I work for - it's in our custom F&O model.
Please note that you don't need to do an actual PATCH to repro this. You can simply copy/paste that URL into the address bar of a browser and see the same error.
Now contrast the URL above with the following URL, which is structurally identical to the one above, but this one is successful: https://HIDDEN.sandbox.operations.dynamics.com/data/ExpRouteVersions(dataAreaId='ita',ValidFromQuantity=1,ValidFromDate=1900-01-01T12:00:00Z,RouteId='ROUT0000805',ProductSizeId='HB',ProductColorId='SP100',ProductionSiteId='85',ProductConfigurationId='217566',ProductStyleId='3',ItemNumber='HIDN-TED300_3')?cross-company=true
I believe the problem is data related. Please notice the ItemNumber value for each. For the non-working URL, the value contains a double-encoded forward-slash (/): HIDN-TED200%252F2-SLV If you double-decode /HIDN-TED200%252F2-SLV/ you will get the following: /HIDN-TED200/2-SLV/ (notice the forward-slash). That unescaped slash character is illegal and must be double-encoded to work. But in this case it is throwing this error:
Bad Request - Invalid URL
HTTP Error 400. The request URL is invalid.
This customer likes to put slashes in their F&O items, which has caused difficulty for our VAR solution. But in the past we have always been able to solve the problem by double-encoding the slash. In this case, however, F&O chokes on it.
Any ideas?