Skip to main content

Hi,  

Trying to get customer data out via API request and am having an issue when the key data I’m including has an &.  Specifically trying to get customer and/or customer contact information and the endpoint for customer works fine for IDs with no special character, but a bunch of customers on this implementation have an & in the customer code and when I execute the same command via postman using those customer IDs an error is returned.  I did some digging and did try a few workarounds, etc. I found on the web most involving using %26 in place of the &, but everything I’ve seen on the web I’ve tried and still get the same error returned.  Has anyone encountered this and is there workaround or specific syntax I need to use?  Thanks, pasting the URL, just using the ‘base’ endpoint that comes with the system, engaging the customer endpoint (and eventually contact information as well).

 

Works fine and customer data is returned
 

 

Returns errors
 

 

Hi @rskieresz88 have you been able to find a resolution? Thank you!


Thanks, actually in my troubleshooting with Postman, I did notice that if I applied the customer id as a filter, it did work with the &.  I was just wondering/hoping that with the url as currently constructed, there was some syntax I could use to make the & work and as i said, I have tried a few variations I found online and none seemed to work.  Thanks for the reply


You might want to use the filter parameter instead of putting the value directly in the URL.

Due to the way it is being parsed, the & symbol in the URL gets used as a delimiter instead of part of the value.

Here is an example of how it could work

{{BaseUrl}}/entity/Default/22.200.001/Customer?$filter=CustomerID eq 'CB%26F010'


Reply