For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
19 1 1 2

415 Unsupported media type

Hi, I'm getting 415 response when I try to create a case..

It's working in Postman, however I cannot replicate it in my script. I do not see any difference between pre-requests script in postman and mine. Since I was able to call "top-lvl-groups", the two functions visible in screen (getGMT & calculate_HMAC_256_64base) work.. same headers, body, everything..

Would someone be able to see what's wrong? (see screen)

world-checkworld-check-oneerror-404error-415
123.png (87.8 KiB)
icon clock
10 |1500

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

Upvote
Accepted
19 1 1 2

All right, we figured it out; content-type is "application/json;charset=UTF-8" instead of "application/x-www-form-urlencoded" (original question answered finally) thank you for your assistance :)

icon clock
10 |1500

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

Upvotes
4.5k 4 8 8

@755358f4-b854-4baf-93b9-f0ca5d1b3d17,

Thank you for your query.

Can you please provide the code in raw format without the API key and secret to have a look into it?

icon clock
10 |1500

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

Upvotes
19 1 1 2

All right, here are examples ahk-wcapi-subroutine-sample-copy.txt, get_template does not work & create_case


icon clock
10 |1500

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

@755358f4-b854-4baf-93b9-f0ca5d1b3d17 ,

Thank for the code sample.

Can you please try using - WinHTTP.SetRequestHeader("Content-Type","application/x-www-form-urlencoded") instead of WinHTTP.SetRequestHeader("Content-Type","application/json") in the request header and see if that helps?

Do let us know if that helps.

Upvotes
19 1 1 2

Thank you, that helped with the 415 error, but I'm getting empty 400 on template, create case & delete case calls. Could you advise me in what sequence of calls would I need to do a single consumer search? I was hoping this would be simple and I wouldn't have to do 7 calls, creating case checking adding deleting etc., maybe WC1 API is not what we need at all. All we need is to find out what information world-check currently has on particular name which we submit; absolutely no on-going screening, audit-logs or any need to keep records on our searches; and if the matching results are too high, more criteria can be added. How many calls does this require?

321.png


321.png (6.6 KiB)
icon clock
10 |1500

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

Upvotes
4.5k 4 8 8

@755358f4-b854-4baf-93b9-f0ca5d1b3d17,

Error 400 means that the request which you are sending is invalid.

- Can you please send us the response and the request headers for the failed API calls?
- Can you please share the request payload for the Create case API call?
- For deleting a case, the case has to be archived first and only then can it be deleted.

You do not have to use all the API calls everytime. The API call - 'Top level groups', 'ISO country listing', 'Case template' and few others needs to be sent only once and not everytime you want to screen a case.

Please note - If any changes are made in the group settings, you will have to call the API call - 'Top level group' everytime a change is made in the settings, so that the updated details are fetched and used.

For screening a case, you can use 2 workflows -
1. Synchronous Screening
2. Asynchronous screening

You can find the details of both the screeing workflows in the below link -
https://developers.thomsonreuters.com/customer-and-third-party-screening/world-check-one-api/quick-start

In order to use the API call to get the results, you may use the Sync API call which save the case, screens a case and fetches the result using a single API call.

From the above link, on the left section please select the 'World-Check One API sync screening steps' to know the steps of synchronous API call.

Hope this helps.

icon clock
10 |1500

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

Upvotes
19 1 1 2

Hi, the code is the same as in my previous response, I'm attaching it now again. You can see my request headers and payload and response there.

ahk-script-wc1api.txt


icon clock
10 |1500

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

Upvotes
4.5k 4 8 8

@755358f4-b854-4baf-93b9-f0ca5d1b3d17,

Can you please try sending the payload in the format provided in the link and see if that helps?

For the Error 404 in case template - You have to use the caseTemplate instead of CaseTemplate in 2 places -
1. datatosign - "groups/group-id/caseTemplate`n"
2. base_URL. - . "/caseTemplate"

Once you have updated to the correct format, you should get 200 OK response code.

Hope this helps.

icon clock
10 |1500

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

Upvotes
19 1 1 2

Hi, thank you very much, changing "CaseTemplate" to "caseTemplate" actually solved the problem; I was also able to do more calls; however API with payload still returns 404; I tried using the format provided in the link. Also variations of using the quotation marks differently before creating signature and after for payload only (still getting 404). Attempts visible in attached code. Maybe I misunderstood what you have kindly suggested?

create-case-call.txt


icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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