secondaryFields[1].dateTimeValue' has an invalid value

API Used: World check one API and World check one API v2.44(checked with both)

Language: java

Environment : windows

Response from API : INFO: [{"error":"INVALID_MESSAGE_FIELD_FORMAT","cause":"Message field '.secondaryFields[1].dateTimeValue' has an invalid value."}]

API accessed : cases/screeningRequest

GSON and ObjectMapper used for serialization
Error : Cannot deserialize instance of ScreeningStatusRequest when requesting.
ScreeningStatusResponse same issue occuring when dateTimeValue removed from request.


ScreeningStatusRequest and ScreeningStatusResponse are generated from io.swagger.codegen.v3 via maven.

Kindly help resolving deserialization issue or at least help with an alternate way.

Thank you



Best Answer

  • Hi @waqar.khan

    It looks like your secondaryFields "SFCT_2" has invalid values, hence you were getting the error. Therefore, kindly refer the below screenshot for desired values.


    1660897865914.png
    Moreover, kindly let us know if you have any additional questions and concerns.


Answers

  • Request Object
    <-------------------------------------------------------------------------------->

    {"groupId":"5jb6xeu1xuo61ggav7n1iqovv","entityType":"INDIVIDUAL","caseId":"","providerTypes":["WATCHLIST"],"caseScreeningState":{"WATCHLIST":"INITIAL"},"name":"James Smith","nameTransposition":false,"secondaryFields":[{"typeId":"SFCT_1","value":"MALE"},{"typeId":"SFCT_2","dateTimeValue":{"timelinePrecision":"ON","pointInTimePrecision":"DAY","utcDateTime":316310400000,"timeZone":null}},{"typeId":"SFCT_3","value":"USA"},{"typeId":"SFCT_4","value":"AUS"},{"typeId":"SFCT_5","value":"ABW"}]}