mailjet / mailjet-apiv3-java

[API v3] Mailjet Java API Wrapper
https://dev.mailjet.com
MIT License
66 stars 36 forks source link

Contactstatistics: JSONException: JSONObject["Contact"] not found. #190

Closed Pfenya closed 1 year ago

Pfenya commented 1 year ago

the class for the Contactstatistics https://github.com/mailjet/mailjet-apiv3-java/blob/master/src/main/java/com/mailjet/client/resource/Contactstatistics.java uses the field public static String CONTACT = "Contact"; for the Contact ID, in the API this field is now called 'ContactID' though, which leads to a JSONException when used via the contactstatistics. See https://dev.mailjet.com/email/reference/statistics/#v3_get_contactstatistics

vitalii-chornobryvyi commented 1 year ago

Hi @Pfenya, thanks for raising this issue! Sorry for the late reply. Since I can't reproduce this issue, just want to clarify something. Mailjet client does not use "Contact" or "ContactID" for request to retrieve a list of overall aggregated delivery and engagement statistics, grouped by contact https://dev.mailjet.com/email/reference/statistics/#v3_get_contactstatistics. Yes, it returns "ContactID" in response. But it should not affect anything and it's not depending on constants in Contactstatistics.class. Can you please provide a code snipped of your implementation maybe then I can help you?

vitalii-chornobryvyi commented 1 year ago

the issue has been commented on and is closed due to the lack of an answer