Articles on: Integrations

Encoding of the forward slash “/” character in the API

Why can't we use the forward slash "/" character in product and client codes in the API?


Short answer:
The "/" character is reserved to denote hierarchies in the URL so it can be used only for that purpose.



Detailed answer:

When consulting endpoints in the API web, like for a client:


undefined GET/api/v2/customer/{customerCode}


If the client code has any spaces or other symbols, it must be encoded as UTF-8, where a client code such as:


MY CLIENT


Is encoded as:


MY%20CLIENT%0A


You can test this out in an online encoder or using your preferred encoding language.


Coding like this allows you to include characters like periods and other symbols in your client codes.

However, the "/" character is reserved for URL use to denote hierarchies, as indicated by the World Wide Web Consortium (W3C), who develop standards and guidelines:


https://www.w3.org/Addressing/URL/4_URI_Recommentations.html



The web framework we use considers forward slashes as hierarchical indicators.


To use these API endpoints effectively, we recommend removing forward slashes from your client code if they are present.


This can seem confusing, as Handy does allow you to use forward slashes in client and product codes, but this is only an issue if you choose to use the API externally.



Send us a message in the chat if you have any questions!


Updated on: 01/30/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!