Fix for API support for emails of format - [email protected]

Modified on: Mon, 3 Oct, 2022 at 2:39 PM

Scope

error_msg": "wrong format" in List Customer API for email [email protected] format



Summary 


The List Customer API does not support emails of the format- [email protected]. When a list customer request is made with the email id= this format, it returns an error error_msg": "wrong format"


Reason

The error is happening due to the email address not being encoded in the URL.

Solution

Taking Bhaskar-test as an example Chargebee domain name- Instead of making a request to

https://bhaskar-test.chargebee.com/api/v2/customers?email[is]=[email protected]

it needs to be made to

https://bhaskar-test.chargebee.com/api/v2/customers?email[is]=t%[email protected]

This implies the + sign shall be replaced by a % sign to encode this.

HTML URL Encoding Reference for more information.


Related Documentation

How to list more than 10 items when listing information via API?


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×