HTTP 400 half the time when using accents in name

Hi,
When calling the ScreeningRequest API with a name containing accents, I'm having one time in two HTTP 400.
I'm doing the following when sending my request:
- The content body is converted to UTF-8.
- We calculate the length of the UTF-8 encoded content since UTF-8 payload length is different than the normal payload body.
- We're using the normal payload/content body in the dataToSign variable.
- Then we use the content length of the UTF-8 encoded in the dataToSign variable.
- Next, we're sending the UTF-8 encoded content/payload in the API request.
- At last, we send the content length of the UTF-8 encoded in the request header.
For instance with "Stéphane Bern", I'm having a result the first time, then the second time, I'm having an HTTP 400.
Here what I'm sending:
==> POST https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/cases/screeningRequest HTTP/1.1
- entity [Content-Type: application/json; charset=UTF-8,Content-Length: 185,Chunked: false]
- body : {"groupId":"ZZZ","entityType":"INDIVIDUAL","providerTypes":["WATCHLIST"],"name":"Stéphane Bern","secondaryFields":[{"typeId":"SFCT_1","value":"MALE"}]}
- headerGroup (request) : [Date: Thu, 23 Jan 2020 14:21:57 GMT, Authorization: Signature keyId="XXX",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="YYY", Content-Type: application/json]
- The answer : HttpResponseProxy{HTTP/1.1 400 [Transfer-Encoding: chunked, Date: Thu, 23 Jan 2020 14:12:22 GMT, X-Cnection: close, Server: ""] ResponseEntityProxy{[Chunked: true]}}
When the return is HTTP 200 :
==> POST https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/cases/screeningRequest HTTP/1.1
- entity [Content-Type: application/json; charset=UTF-8,Content-Length: 185,Chunked: false]
- body : {"groupId":"ZZZ","entityType":"INDIVIDUAL","providerTypes":["WATCHLIST"],"name":"Stéphane Bern","secondaryFields":[{"typeId":"SFCT_1","value":"MALE"}]}
- headerGroup (request) : [Date: Thu, 23 Jan 2020 14:21:20 GMT, Authorization: Signature keyId="XXX",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="YYY", Content-Type: application/json]
- The answer : HttpResponseProxy{HTTP/1.1 200 [Cache-Control: no-cache, no-store, max-age=0, must-revalidate, Pragma: no-cache, Expires: 0, X-XSS-Protection: 1; mode=block, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Date: Thu, 23 Jan 2020 14:13:57 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Server: ""] ResponseEntityProxy{[Content-Type: application/json;charset=UTF-8,Chunked: true]}}
Is there something I am missing?
Best Answer
-
The dev team have responded that the issue has been resolved. I have tested this and found all my screening requests with non english characters to be successful.
Please re test and let us know if the issue persists.
0
Answers
-
50 percent of the screening requests containing non English characters are failing with 400: Bad request. This has been already identified as an issue and currently worked on by our development team to resolve it.
0 -
Hello,
Could you tell us if this problem is solved?
I have the same problem as Cao-Trung. If I use accents in the name or surname, I always get a 400 error.
I use the follow String to calculate the length in the signature and in the API request.
{"groupId":"XXX","entityType":"INDIVIDUAL","providerTypes":["WATCHLIST"],"name":"Marlène Schiappa","secondaryFields":[]}
You can find an attached picture of my implementation (accent error.JPG).
Thank you very much,
0 -
Hi @eric.simeoni,
Thanks for reaching out to us! I was wondering if you could provide the sequence of API calls being sent along with request/response headers (please make sure to blur/delete API key/secret) that you are using? I just want to make sure nothing is being missed!
Thanks,
Judith
0 -
Hello,
This weekend, we find a solution.
For others, in our Java application, we juste added :
Normalizer.normalize(value, Normalizer.Form.NFD);
To normalize the lastname and firstname.
Thank you,
0 -
@eric.simeoni That's great! Please reach out again via email or through a question in the forum if you need further assistance.
Thanks,
Judith
0 -
There is a simple way to fix this, you can change
payload.length()
to
payload.getBytes().length
on generateAuthHeaders implementation.
The content-length will be correct after this.0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 560 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 721 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛