question

Upvotes
Accepted
18 0 0 0

How do I know what screeningRequest is related to whish ongoingScreeningUpdates?

When I to a call on POST /cases/screeningRequest I get a big json result, I use Python so it looks like this (I have partly cropped the Id:s and I use a former politician on the watchlist as an example):

{ # endpoint = "/cases/screeningRequest"
    "caseId": "...t0re",
    "name": "Mohammad Nawaz Sharif",
    "providerTypes": [
        "WATCHLIST"
    ],
    "customFields": [],
    "secondaryFields": [
        {
            "typeId": "SFCT_5",
            "value": "SWE",
            "dateTimeValue": None
        },
        {
            "typeId": "SFCT_2",
            "value": None,
            "dateTimeValue": "1932-09-01"
        }
    ],
    "groupId": "...qh04",
    "entityType": "INDIVIDUAL",
    "caseSystemId": "...t0rf",
    "caseScreeningState": {
        "WATCHLIST": "INITIAL"
    },
    "lifecycleState": "UNARCHIVED",
    "creator": {},
    "modifier": {},
    "assignee": None,
    "creationDate": "2021-02-24T20:48:24.699Z",
    "modificationDate": "2021-02-24T20:48:26.546Z",
    "nameTransposition": False,
    "outstandingActions": False,
    "results": [
        {
            "resultId": "...7pj9x",
            "referenceId": "e_tr_wci_7674",
            "matchStrength": "EXACT",
            "matchedTerm": "Mohammad Nawaz SHARIF",
            "submittedTerm": "Mohammad Nawaz Sharif",
            "matchedNameType": "PRIMARY",
            "secondaryFieldResults": [
                {
                    "field": {
                        "typeId": "SFCT_5",
                        "value": "PAK",
                        "dateTimeValue": None
                    },
                    "typeId": "SFCT_5",
                    "submittedValue": "SWE",
                    "submittedDateTimeValue": None,
                    "matchedValue": "PAK",
                    "matchedDateTimeValue": None,
                    "fieldResult": "NOT_MATCHED"
                },
                {
                    "field": {
                        "typeId": "SFCT_2",
                        "value": None,
                        "dateTimeValue": "1949-12-25"
                    },
                    "typeId": "SFCT_2",
                    "submittedValue": None,
                    "submittedDateTimeValue": "1932-09-01",
                    "matchedValue": None,
                    "matchedDateTimeValue": "1949-12-25",
                    "fieldResult": "NOT_MATCHED"
                }
            ],
            "sources": [
                "b_trwc_PEP N"
            ],
            "categories": [
                "PEP"
            ],
            "creationDate": "2021-02-24T20:48:26.545Z",
            "modificationDate": "2021-02-24T20:48:26.545Z",
            "resolution": {
                "statusId": "...qh1s",
                "riskId": None,
                "reasonId": None,
                "resolutionRemark": None,
                "resolutionDate": None
            },
            "resultReview": {
                "reviewRequired": False,
                "reviewRequiredDate": "2020-10-08T00:00:00.000Z",
                "reviewRemark": None,
                "reviewDate": None
            },
            "primaryName": "Mohammad Nawaz SHARIF",
            "events": [
                {
                    "address": None,
                    "allegedAddresses": [],
                    "day": 25,
                    "fullDate": "1949-12-25",
                    "month": 12,
                    "type": "BIRTH",
                    "year": 1949
                }
            ],
            "countryLinks": [
                {
                    "country": {
                        "code": "PAK",
                        "name": "PAKISTAN"
                    },
                    "countryText": "PAKISTAN",
                    "type": "NATIONALITY"
                },
                {
                    "country": {
                        "code": "SAU",
                        "name": "SAUDI ARABIA"
                    },
                    "countryText": "SAUDI ARABIA",
                    "type": "LOCATION"
                },
                {
                    "country": {
                        "code": "PAK",
                        "name": "PAKISTAN"
                    },
                    "countryText": "PAKISTAN",
                    "type": "LOCATION"
                },
                {
                    "country": {
                        "code": "PAK",
                        "name": "PAKISTAN"
                    },
                    "countryText": "PAKISTAN",
                    "type": "POB"
                },
                {
                    "country": {
                        "code": "GBR",
                        "name": "UNITED KINGDOM"
                    },
                    "countryText": "UNITED KINGDOM",
                    "type": "LOCATION"
                }
            ],
            "identityDocuments": [
                {
                    "entity": None,
                    "expiryDate": None,
                    "issueDate": None,
                    "issuer": None,
                    "locationType": {
                        "country": {
                            "code": "PAK",
                            "name": "PAKISTAN"
                        },
                        "name": "COMPUTERIZED NATIONAL IDENTIFICATION CARD",
                        "type": "PK-CNIC"
                    },
                    "number": "3520153698367",
                    "type": None
                },
                {
                    "entity": None,
                    "expiryDate": None,
                    "issueDate": None,
                    "issuer": None,
                    "locationType": {
                        "country": {
                            "code": "PAK",
                            "name": "PAKISTAN"
                        },
                        "name": "NATIONAL TAX NUMBER",
                        "type": "PK-NTN"
                    },
                    "number": "0667649-9",
                    "type": None
                }
            ],
            "category": "CRIME - FINANCIAL",
            "providerType": "WATCHLIST",
            "gender": "MALE"
        }
    ]
}

Then I do a ongoing screening request on /cases/ongoingScreeningUpdates then I get this:

{ # endpoint = "/cases/ongoingScreeningUpdates"
    "query": "updateDate>='2021-01-01T00:00:00Z'",
    "sort": [
        {
            "columnName": "updateDate",
            "order": "DESCENDING"
        }
    ],
    "totalResultCount": 3,
    "pagination": {
        "currentPage": 1,
        "itemsPerPage": 50,
        "totalItems": 3
    },
    "results": [
        {
            "caseSystemId": "...evuq",
            "numberOfNewResults": 0,
            "numberOfUpdatedResults": 1,
            "updateDate": "2021-01-23T18:43:54.806Z"
        },
        {
            "caseSystemId": "...evuq",
            "numberOfNewResults": 2,
            "numberOfUpdatedResults": 3,
            "updateDate": "2021-01-22T19:42:24.203Z"
        },
        {
            "caseSystemId": "...evuq",
            "numberOfNewResults": 7,
            "numberOfUpdatedResults": 12,
            "updateDate": "2021-01-15T12:43:29.843Z"
        }
    ]
}

Then I use the caseSystemId from those on /cases/systemCaseId and the results is this:

{ # endpoint = "/cases/systemCaseId"
    "caseId": "...evup",
    "name": "Mohammad Nawaz Sharif",
    "providerTypes": [
        "WATCHLIST"
    ],
    "customFields": [],
    "secondaryFields": [],
    "groupId": "...qh04",
    "entityType": "INDIVIDUAL",
    "caseSystemId": "...evuq",
    "caseScreeningState": {
        "WATCHLIST": "INITIAL"
    },
    "lifecycleState": "UNARCHIVED",
    "creator": {},
    "modifier": {},
    "assignee": None,
    "creationDate": "2020-05-28T10:43:33.803Z",
    "modificationDate": "2021-02-19T13:50:48.394Z",
    "nameTransposition": False,
    "outstandingActions": True
}

The name in the last call matches the name of the user that was screened in the first call but the caseSystemId do not match.


My assumption is that they are supposed to match but don't because my database have been purged several times and I do not have the original caseSystemId from the first screening.

If there is an update in ongoingScreeningUpdates will then the caseSystemId from my latest /cases/screeningRequest be included?

I am lost because I think I am right but have not been able to confirm that I am right.

world-checkscreeningscreening-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
1.1k 3 1 2

@johan


That is correct

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
18 0 0 0

I forgot to mention that I also enable ongoing screening after the first screening with

PUT /cases/{caseSystemId}/ongoingScreening

and I get 204 as status code back.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
1.1k 3 1 2

@johan

So your API consumption sequence is current.

When you screen a case i.e. /cases/screeningRequest you get back case Id and CaseSytem ID in the response which are mapped to the same case.

1. caseId- is a unique identifier that is used to locate the cases on the WC1 UI.

2. caseSystemId- Is again a unique identifier that is used to perform various operation on a case post the first screening like for e.g, enable ongoing screening i.e.

PUT /cases/{caseSystemId}/ongoingScreening

Here you are enabling the case for OGS by passing the caseSystemId in the url for that particular case.

Now to answer your question, if there is any update on any of the cases that you have enabled for ongoing screening you would see their respective caseSystemId in the response of the "/cases/ongoingScreeningUpdates " API call, you take those caseSystemIds and fetch the respective updated results accordingly.

Hope this answers your query.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
18 0 0 0

So if this guy have another thing happen to him, the caseSystemId ending with "t0rf" will show up in "results" in /cases/ongoingScreeningUpdates?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea