I am using getSegments and the api throws the following:
Exception error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 14 path $.segments
My code snippet is:
try {
ContactsApi api = new ContactsApi();
Long limit = 50l;
Long offset = 0l;
String sort = "asc";
GetSegments response = api.getSegments(limit, offset, sort);
} catch (Exception e) {
TaskLogging.warn(String.format("Exception error: %s ", e.getMessage()));
}
`
Any idea what I'm doing wrong?