Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Forward slash in Product Code

$
0
0

Some of our products have forward slashes in the SKU and we are using the product SKU as the product “Code” in the Episerver catalog.  We're having a problem with this because we cannot access products using the Service API when there is a forward-slash in the product “Code”

Examples:

If we create a product with Code 123, we can then retrieve the product via the Service API on the following endpoint:

GET: {{baseUrl}}/episerverapi/commerce/entries/123

However, if we change the product Code from "123" to "123/456", the following call will not work (404 error) due to the forward-slash in the URL (obviously breaking the routing):

GET: {{baseUrl}}/episerverapi/commerce/entries/123/456

I would have thought that encoding the forward slash in the product Code to “%2F” would resolve the issue.

i.e.

GET: {{baseUrl}}/episerverapi/commerce/entries/123%2F456

But also does not (again 404, not found error).

Does anyone have a suggestion on how to retrieve a product that contains a forward slash using the Service API?

Thanks!


Viewing all articles
Browse latest Browse all 9076

Trending Articles