Start a conversation

Resolving "Unable to Parse JSON Request" Error in "Create Customer" KBS API when using non-ASCII characters

Overview

The customer encountered issues with the "Create Customer" API, receiving the error "Unable to parse json request." This was due to a charset issue, not a restriction on special characters. The API accepts any character in the Customer Name field as long as it contains at least one ASCII letter or digit and does not exceed 180 characters. The solution involved using UTF-8 encoding and ensuring correct authentication details.

Solution

Follow these steps to resolve the "Unable to parse json request" error:

  1. Verify Character Allowance:
    • Ensure the Customer Name field is present and not empty.
    • Confirm the string contains at least one ASCII letter (A-Z/a-z) or digit (0-9).
    • Ensure the total length does not exceed 180 characters.
  2. Use UTF-8 Encoding:
    • Add the request header: Content-Type: application/json; charset=UTF-8
  3. Check Authentication Details:
    • Ensure the authentication details are correct to avoid 401 Unauthorized errors.
    • Verify the Authentication tab is not empty and contains valid credentials.
  4. Test API Request:
    • Recreate the API request using the correct charset and authentication details.
    • Verify the request and response to ensure no parsing errors occur.

Note: If issues persist, consider testing the request with different applications to rule out application-specific issues.

Frequently Asked Questions

1. What characters are allowed in the Customer Name field?
Any character is allowed as long as the field is present, contains at least one ASCII letter or digit, and does not exceed 180 characters.
2. How do I resolve the "Unable to parse json request" error?
Ensure you are using UTF-8 encoding by adding the request header Content-Type: application/json; charset=UTF-8 and verify your authentication details are correct.
3. What should I do if I receive a 401 Unauthorized error?
Double-check the authentication details in your request. Ensure the Authentication tab is not empty and contains valid credentials.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments