I am integrating with World Check One Api using c#. The problem is the same request sometimes give me response and sometimes gives empty response!
Hello @ayahya ,
Kindly note the API call to screen the case is an asynchronous request, hence as soon as the API is called, WC1 API places the request in the queue and screens the case according to the available capacity of the system. In short, the screening of the case is not instantaneous.
Most likely you are calling the API "Get case results" before the case has been screened completely so you get an empty response. I advise you to call another API "SEQ-8: Retrieve the audit log for a case" to find out whether the case has been screened or not.
An excerpt of the response body of the API "Retrieve the audit log for a case" is given below.
{ "id": "0a3687cf-61fc-110b-9893-47000c2402", "objectId": "0a3687d0-61fc-1a893-46a00002148d", "eventDate": "2018-03-22T09:50:42.377Z", "actionedByUserId": "0a387cf-611f-1466-5974000011c2", "actionedByUserName": "Irfan Khan", "note": null, "entityType": "CASE", "actionType": "SCREENED_CASE", "auditEventToDate": null, "details": { "detailsType": "ScreenCaseAuditDetails", "userId": null, "statusCode": "COMPLETED", "screeningState": "INITIAL", "noOfNewResults": 4, "noOfReviewRequiredResults": 0, "noOfExcludedResults": 0, "noOfAutoResolvedResults": 0, "providerTypes": [ "WATCHLIST" ], "caseScreenRequestor": null, "caseSystemId": "0a3687d0-69893-46a00002148d" }
You need to check for the key "actionType" and its value as "Screened Case" in the response body to be sure that the case has been screened. If you do not see the value of "actionType" as Screened Case or if the response of the API "Retrieve the audit log for a case" is empty, it means that the case has not been screened yet.
After this check, you can call the API "Get case results" and it will always return the collection of results related to the case.
Kindly let me know if the solution worked for you by accepting the answer.
Can you please let us know the API that you are calling?
Also, please elaborate on the expected outcome of the API and the error that you receive when the API fails.
Hello Irfan,
I am calling 3 apis, save simple case, screen case and then get case result. In get case result, sometimes I am receiving correct result and sometimes I receive empty response [] not an error for the same person.
This solved the issue. Thank you soo much