1

In my application using Zendesk API to interacting with customers. Upto 3 months back, our support team got the mails (Zendesk tickets). But now we are upgrading Zendesk API 2. Like below

https://<domain>.zendesk.com/api/v2/tickets.json

The problem is only old customers tickets is getting, but new users/customers tickets are not getting. I am getting the conection response code is 422 - Unprocessable Entity

HttpURLConnection connection = client.open(new URL(encoded_url));
            connection.setRequestMethod("POST");
            if (null != contentType) connection.addRequestProperty("Content-type", "application/json");

            // Write the request.
            out = connection.getOutputStream();
            out.write(data.getBytes("UTF-8"));
            out.close();

            final int statusCode = connection.getResponseCode();
            if (statusCode >= HttpURLConnection.HTTP_BAD_REQUEST) {
                onComplete.execute(false, statusCode + "|" + connection.getResponseMessage() + "|" + encoded_url, "Error " + statusCode + " while retrieving data from " + encoded_url + "\nreason phrase: " + connection.getResponseMessage());
                return;
            }

            // Read the response.
            in = connection.getInputStream();
            byte[] response = readFully(in);

Can you please help..

alex
  • 5,516
  • 2
  • 36
  • 60
user2432358
  • 31
  • 1
  • 1
  • 4
  • possible duplicate of [422 error when creating a ticket in Zendesk](http://stackoverflow.com/questions/22867369/422-error-when-creating-a-ticket-in-zendesk) – Kenny Linsky Sep 26 '15 at 22:35

1 Answers1

0

I had this when NULLs where past via my model/poco class to Zendesk

Tristan
  • 1
  • 1